Sentence embedding for STS task by fine-tuning bert

I tried to fine-tune the BERT model as an embedding model, which maps sentences to a space where the cosine similarity between two sentence embedding vectors can be interpreted as the sentence similarity level. Specifically, the embedding vectors (corresponds to [CLS]) of every sentence pair is first normalized to have unit L-2 norm. Next, the dot product (i.e. cosine similarity) between each embedding pair is multiplied by 5, then aligned with the labels by using MSE loss. Learning rate has been changed to 1e-5 to mitigate convergence problem.
After 20 epochs of fine-tuning, the resulting 12-layer model only get a 0.66 pearson correlation coefficient on the validation set, which performs far worse than a BERT model fine-tuned in the simple regression manner (12-layer, pearson = 0.89).
My question is, is there any suggestion about fine-tuning BERT for sentence embeddings? Thanks!

method
PPMPP (dev)

bert, no FT, cosine similarity between sentence embedding ([CLS])
0.29

bert, FT, simple regression
0.89

bert, FT, cosine similarity between sentence embedding ([CLS])
0.66

bert, no FT, cosine similarity between mean-pooled sequence embeddings (mean_pool([CLS], tok1, ..., [SEP]))
0.59

average word vector (spaCy, en_core_web_lg)
0.54

From here :

I quote from google-research/bert#164 (comment)

And even if they are decent representations when fed into a DNN trained for a downstream task, it doesn't mean that they will be meaningful in terms of cosine distance. (Since cosine distance is a linear space where all dimensions are weighted equally).

Suggestion from my side, if you want to use cosine distance anyway, then please focus on the rank not the absolute value. Namely, do not use:
cosine(A, B) > 0.9 then A and B are similar

please consider the following instead:
if cosine(A, B) > cosine(A, C) then A is more similar to B than C.

You can't use cosine distance directly between the embeddings produced by BERT. You need to apply another layer between the distance and BERT.
So on top of BERT, you put your custom layer (I used LSTM, but a simple Feed Forward network might be enough depending on what you're trying to achieve), and use the output of this custom layer to compute the cosine distance.

@Colanim Thank you very much for this hint. BTW have you validated the resulting embeddings on STS-B validation set after adding a custom layer such as LSTM? How much is the pearson correlation coefficient?

I used a Siamese-type network, separating the sentence representation by BERT.
Basically, I input one sentence into BERT, get the feature vectors for this sentence, input this feature vectors into LSTM. Do the same for the second sentence, then compare the output of LSTMs with distance (I used Manhattan distance, but cosine distance works as well).
My vanilla network is less good than the end-to-end BERT : I could reach 0.78 (Pearson correlation). This is because in my model, BERT represent sentence one by one, and not the sentence pair together.

0.78 looks better than my method.

After a few improvements (ensembling), I could reach 0.82, but that's all.
Why exactly are you using cosine similarity ? I believe this approach is not good compared to the end-to-end BERT.

I have a dataset which comprises 1e6 sentences and I need to be able to calculate the similarity between any two samples. If I use the end-to-end BERT, I'll have to forward 1e12 sentence pairs which takes hundreds of years. But if I choose to calculate cosine similarity after extracting embeddings for every sentence, an amount of time could be saved. That's because matrix multiplication is much faster compared to BERT forward.

0.78 looks better than my method.

This come from the fact that you use your distance metric directly on BERT embeddings. You need an additional layer.

I have a dataset which comprises 1e6 sentences and I need to be able to calculate the similarity between any two samples. If I use the end-to-end BERT, I'll have to forward 1e12 sentence pairs which takes hundreds of years. But if I choose to calculate cosine similarity after extracting embeddings for every sentence, an amount of time could be saved. That's because matrix multiplication is much faster compared to BERT forward.

Do you actually have a label for the 1e12 sentence pairs ??
You right, if you extract embeddings for every sentence and use it later to compare between 2 sentences, you will save time. However, by doing so, you will also loose accuracy, because BERT will treat each sentence independently and not as a pair anymore (so information between sentence parity will be lost).

0.78 looks better than my method.

This come from the fact that you use your distance metric directly on BERT embeddings. You need an additional layer.

I have a dataset which comprises 1e6 sentences and I need to be able to calculate the similarity between any two samples. If I use the end-to-end BERT, I'll have to forward 1e12 sentence pairs which takes hundreds of years. But if I choose to calculate cosine similarity after extracting embeddings for every sentence, an amount of time could be saved. That's because matrix multiplication is much faster compared to BERT forward.

Do you actually have a label for the 1e12 sentence pairs ??

I don't have label, what I need to do is to predict similarity values for the 1e12 pairs.

You right, if you extract embeddings for every sentence and use it later to compare between 2 sentences, you will save time. However, by doing so, you will also loose accuracy, because BERT will treat each sentence independently and not as a pair anymore (so information between sentence parity will be lost).
Just out of curiosity, how long time is need to extract 1e6 sentences embeddings from BERT ? What about memory ?

Less than 8 hours. Using Titian X (Pascal) x 1. Max sequence length was 32, IIRC.

You indeed have a lot of data ^^
Then I think you can try adding a custom layer after BERT. But expect Pearson correlation decrease.

fyi, starting from 1.6.1, bert-as-service supports serving fine-tuned model out of the box. See: https://github.com/hanxiao/bert-as-service#serving-a-fine-tuned-bert-model
To upgrade, please do:
pip install -U bert-serving-server bert-serving-client

I tried to fine-tune the BERT model as an embedding model, which maps sentences to a space where the cosine similarity between two sentence embedding vectors can be interpreted as the sentence similarity level. Specifically, the embedding vectors (corresponds to [CLS]) of every sentence pair is first normalized to have unit L-2 norm. Next, the dot product (i.e. cosine similarity) between each embedding pair is multiplied by 5, then aligned with the labels by using MSE loss. Learning rate has been changed to 1e-5 to mitigate convergence problem.
After 20 epochs of fine-tuning, the resulting 12-layer model only get a 0.66 pearson correlation coefficient on the validation set, which performs far worse than a BERT model fine-tuned in the simple regression manner (12-layer, pearson = 0.89).
My question is, is there any suggestion about fine-tuning BERT for sentence embeddings? Thanks!

I am doing something similar. I used bert embedding with max pooling and compute cosine similarity, and it is better than using glove embedding.
I wonder what is your current approach to sentence similarity now. I have similar concern, and I do not want to input two sentences to bert model at a time cause that will dramatically increase my training sample number.

I used a Siamese-type network, separating the sentence representation by BERT.
Basically, I input one sentence into BERT, get the feature vectors for this sentence, input this feature vectors into LSTM. Do the same for the second sentence, then compare the output of LSTMs with distance (I used Manhattan distance, but cosine distance works as well).
My vanilla network is less good than the end-to-end BERT : I could reach 0.78 (Pearson correlation). This is because in my model, BERT represent sentence one by one, and not the sentence pair together.
After a few improvements (ensembling), I could reach 0.82, but that's all.
Why exactly are you using cosine similarity ? I believe this approach is not good compared to the end-to-end BERT.

Did you use the last state of LSTM output, or you did a pooling over all the state of LSTM output? Thanks!

I wonder what is your current approach to sentence similarity now. I have similar concern, and I do not want to input two sentences to bert model at a time cause that will dramatically increase my training sample number.

Have you seen the table below the original post? I also tried ELMo (without FT, without adding network layers) and mean-pooled sentence vectors yield a pearson score of 0.66

I wonder what is your current approach to sentence similarity now. I have similar concern, and I do not want to input two sentences to bert model at a time cause that will dramatically increase my training sample number.

Have you seen the table below the original post? I also tried ELMo (without FT, without adding network layers) and mean-pooled sentence vectors yield a pearson score of 0.66

No, I haven't seen the table of the original post. I just evaluated it on my end-to-end task. The overall accuracy increase after I turned to bert embedding.

Did you use the last state of LSTM output, or you did a pooling over all the state of LSTM output?

I just used the last state of the LSTM

I tried several things, and for my problem, the best solution was to use Reduce-mean pooling between all the feature vectors outputted by BERT. Then I fed this into a LSTM (I believe a simple Feed Forward network would work equally good, if not better) and get the last state of the LSTM.
This last state of the LSTM is my sentence representation. I can then compare it to other sentence representation with a distance. So at the end I have a Siamese network.
Note : CLS embedding is a better solution for sentence representation if you can fine tune your model.

Did you use the last state of LSTM output, or you did a pooling over all the state of LSTM output?

I just used the last state of the LSTM
I tried several things, and for my problem, the best solution was to use Reduce-mean pooling between all the feature vectors outputted by BERT. Then I fed this into a LSTM (I believe a simple Feed Forward network would work equally good, if not better) and get the last state of the LSTM.
This last state of the LSTM is my sentence representation. I can then compare it to other sentence representation with a distance. So at the end I have a Siamese network.
Note : CLS embedding is a better solution for sentence representation if you can fine tune your model.

Ummm...I am confused. After reduce-mean pooling, you get a batch_size * bert_dim size output? So for each sample, you feed a vector to LSTM? How is this reduce-mean done in your solution?

After reduce-mean pooling, you get a batch_size * bert_dim size output?

Right.

So for each sample, you feed a vector to LSTM?

Actually, my problem is about document representation. So I need to input several vectors to the LSTM. But it is working with only 1 vector (a document of only 1 sentence).

How is this reduce-mean done in your solution?

I used BERT-as-service.

After reduce-mean pooling, you get a batch_size * bert_dim size output?

Right.

So for each sample, you feed a vector to LSTM?

Actually, my problem is about document representation. So I need to input several vectors to the LSTM. But it is working with only 1 vector (a document of only 1 sentence).

How is this reduce-mean done in your solution?

I used BERT-as-service.

Oh I see. It seems I should try several approaches to find the best one. My problem is that my training set is really small. I also thought about multiply CLS vector of two sentences directly, but that seems introduced many variables.
Still trying to find the best approach.

Keep us updated :)

Hi @Colanim, sorry to crash into your conversation, but I had this question about your statement below,

After a few improvements (ensembling), I could reach 0.82, but that's all.

When you say ensembling, what exactly have you done? So is it like getting output from different models and doing a majority vote (or some similar heuristic), or is something fancier than that?

Hi,
Thanks you all for sharing your results here. I am working on the same task, calculating similarity scores of sentences. I am wondering if someone had tried to fine-tune BERT using Conneau et al. approach [arXiv:1705.02364 figure-1]?

I used a Siamese-type network, separating the sentence representation by BERT.
Basically, I input one sentence into BERT, get the feature vectors for this sentence, input this feature vectors into LSTM. Do the same for the second sentence, then compare the output of LSTMs with distance (I used Manhattan distance, but cosine distance works as well).
My vanilla network is less good than the end-to-end BERT : I could reach 0.78 (Pearson correlation). This is because in my model, BERT represent sentence one by one, and not the sentence pair together.
After a few improvements (ensembling), I could reach 0.82, but that's all.
Why exactly are you using cosine similarity ? I believe this approach is not good compared to the end-to-end BERT.

hi can you help to share your code? I have the same problem, I need to encode a set of sentences to embedding, and given another sentence, find the nearest top n sentence.

I'm sorry but I can't share the code.
Simply use Bert as service to encode your sentences. Then you have several choices for comparing the top sentences : Siamese network, k nearest neighbors

I'm sorry but I can't share the code.
Simply use Bert as service to encode your sentences. Then you have several choices for comparing the top sentences : Siamese network, k nearest neighbors

Thank you all the same.
We have try to use bert encode sentences directly, but it failed and only get 0.5 AUC in the evaluation dataset.

Hi,
Would anyone mind open-sourcing their code for a cosine-similarity approach to ranking the similarity of sentences. We've tried using BERT but we got an MRR score of 0.02 vs a 10-20 that you'd expect.
The advantage (i think) with cosine similarity is that you can save the embedding for a sentence, instead of re-running a similarity algorithm again and again.

Hi @cdluminate When you are using embedding vector for [CLS], you are using the vector from the last layer (shape: 1 * 768), or from all the layers (shape: 12 * 768)? Thanks.

@ymcdull If you are going to reproduce my result in https://github.com/google-research/bert/issues/276#issuecomment-447838902, use the vector from only the last layer.

After reduce-mean pooling, you get a batch_size * bert_dim size output?

Right.

So for each sample, you feed a vector to LSTM?

Actually, my problem is about document representation. So I need to input several vectors to the LSTM. But it is working with only 1 vector (a document of only 1 sentence).

How is this reduce-mean done in your solution?

I used BERT-as-service.

Hi, we are also working on similar task, have you tried the Conv approach besides LSTM, if so how is the result?

@cadobe
I didn't tried Conv, only LSTM :/

@cadobe
I didn't tried Conv, only LSTM :/

@Colanim Thanks for your quick response! Just checked the "BERT AS a service code", Still a bit confused  that, for single batch, the reduce-mean outputs one vector, how did you feed this vector into LSTM's hidden state to fetch the last hidden one?

As you said, the output of Bert as service gives one vector (for one sentence.)
My goal was to be able to represent a whole document, so at each timestep, I input 1 sentence representation (the vector returned by Bert as service). So the LSTM is here to gather several sentences representation into a document representation.
Maybe LSTM is not the right way to go, and Conv is better, I don't know about that.

i c, thanks! For one sentence embedding (not a document embedding), how about feeding all token embeddings of BERT last layer output sequentially as input of LSTM/RNN's hidden state input.(Not a mean pooling way), and take the last hidden state of the LSTM to treat as sentence embedding rather than the CLS embedding. Here is also one question, can the BERT output embeddings represent all terms/tokens' embedding?

Here is also one question, can the BERT output embeddings represent all terms/tokens' embedding?

How do you obtain the sentence embedding with mean pooling from BERT if it doesn't produce per-token embeddings?

@cadobe

i c, thanks! For one sentence embedding (not a document embedding), how about feeding all token embeddings of BERT last layer output sequentially as input of LSTM/RNN's hidden state input.(Not a mean pooling way), and take the last hidden state of the LSTM to treat as sentence embedding rather than the CLS embedding.

It's definitely possible. You have to consider that you will have to train the RNN you use to create sentence embeddings. Using Mean-pooling (or other strategies proposed by BERT as service) give you the big advantage of no need to train it, and faster training/inference (RNN are not parallelisable).
But anyway the author of BERT specifically said that BERT was not meant to represent sentences, either with CLS token or by mean of each token's embeddings. So maybe using LSTM is a good idea to have a good sentence representation, you have to try yourself and compare. But if you want something that work fast and easy to implement, I would advice against ^^

But anyway the author of BERT specifically said that BERT was not meant to represent sentences, either with CLS token or by mean of each token's embeddings. So maybe using LSTM is a good idea to have a good sentence representation, you have to try yourself and compare. But if you want something that work fast and easy to implement, I would advice against ^^

Were did they say that? was it on twitter ?

I used a Siamese-type network, separating the sentence representation by BERT.
Basically, I input one sentence into BERT, get the feature vectors for this sentence, input this feature vectors into LSTM. Do the same for the second sentence, then compare the output of LSTMs with distance (I used Manhattan distance, but cosine distance works as well).
My vanilla network is less good than the end-to-end BERT : I could reach 0.78 (Pearson correlation). This is because in my model, BERT represent sentence one by one, and not the sentence pair together.
After a few improvements (ensembling), I could reach 0.82, but that's all.
Why exactly are you using cosine similarity ? I believe this approach is not good compared to the end-to-end BERT.

@Colanim sorry to interrupt. i am trying to use BERT for paraphrasing. So, I have two sentences (A and B) and,  have encoded each sentence using getting-elmo-like-contextual-word-embedding. After encoding each sentence separately, LSTM layer are attached at the outputs of both the sentences. Later on, I concatenate both the encoded sentences and add dense layers over it for classification (whether both sentences are related or not).
Issue: my network is not learning i.e. accuracy and loss are not improving.
Could you please suggest, what's wrong in this process?
Thanks :)

Were did they say that? was it on twitter ?

#71

i am trying to use BERT for paraphrasing. So, I have two sentences (A and B) and, have encoded each sentence using getting-elmo-like-contextual-word-embedding. After encoding each sentence separately, LSTM layer are attached at the outputs of both the sentences. Later on, I concatenate both the encoded sentences and add dense layers over it for classification (whether both sentences are related or not).

In your case, you have 2 sentences. Which means the length of both sentences will likely not be higher than 512. So you should use BERT end to end, no need to find something complicated with building LSTM over BERT, which is not going to increase your score.
In my case I used LSTM over BERT because I had no other choices : I was working with documents, too big to be inputted into the limit of 512 given by BERT.
Your task is very similar to the MNLI dataset. I would advice end to end BERT training.

Were did they say that? was it on twitter ?

#71

i am trying to use BERT for paraphrasing. So, I have two sentences (A and B) and, have encoded each sentence using getting-elmo-like-contextual-word-embedding. After encoding each sentence separately, LSTM layer are attached at the outputs of both the sentences. Later on, I concatenate both the encoded sentences and add dense layers over it for classification (whether both sentences are related or not).

In your case, you have 2 sentences. Which means the length of both sentences will likely not be higher than 512. So you should use BERT end to end, no need to find something complicated with building LSTM over BERT, which is not going to increase your score.
In my case I used LSTM over BERT because I had no other choices : I was working with documents, too big to be inputted into the limit of 512 given by BERT.
Your task is very similar to the MNLI dataset. I would advice end to end BERT training.

Even I'm working on a similar task. I'm using 'bert_multi_cased_L-12_H-768_A-12/1' model for japanese texts. I followed tensorflow_hub method and got both pooled_output and sequence_output for one sentence.
Do you have any idea on how good this 'pooled_output' vector is for sentence representation.
Otherwise is it better to give feature vectors to LSTM and compare similarity between sentences?

@cadobe

i c, thanks! For one sentence embedding (not a document embedding), how about feeding all token embeddings of BERT last layer output sequentially as input of LSTM/RNN's hidden state input.(Not a mean pooling way), and take the last hidden state of the LSTM to treat as sentence embedding rather than the CLS embedding.

It's definitely possible. You have to consider that you will have to train the RNN you use to create sentence embeddings. Using Mean-pooling (or other strategies proposed by BERT as service) give you the big advantage of no need to train it, and faster training/inference (RNN are not parallelisable).
But anyway the author of BERT specifically said that BERT was not meant to represent sentences, either with CLS token or by mean of each token's embeddings. So maybe using LSTM is a good idea to have a good sentence representation, you have to try yourself and compare. But if you want something that work fast and easy to implement, I would advice against ^^

Hi,
Even I'm working on a similar task. I'm using 'bert_multi_cased_L-12_H-768_A-12/1' model for japanese texts. I followed tensorflow_hub method and got both pooled_output and sequence_output for one sentence.
Do you have any idea on how good this 'pooled_output' vector is for sentence representation.
Otherwise is it better to give feature vectors to LSTM and compare similarity between sentences?

Hi,
Even I'm working on a similar task. I'm using 'bert_multi_cased_L-12_H-768_A-12/1' model for japanese texts. I followed tensorflow_hub method and got both pooled_output and sequence_output for one sentence.
Do you have any idea on how good this 'pooled_output' vector is for sentence representation.
Otherwise is it better to give feature vectors to LSTM and compare similarity between sentences?

If you can use BERT end-to-end to classify your sentences, I believe it will always be better this way.
However, because of the input size limit of BERT, it might be necessary to first represent each sentences through BERT, and then use a LSTM (or something else) to create a representation for long documents. In that case you anyway don't have much choices.

Hello @cdluminate
If you can share any code hints for this

bert, FT, simple regression | 0.89

that would be awesome!
My task is simple: sentence similarity, so less than 512 symbols. I assume I don't need additional network in this case. Current solution: Google's Universal Sentence Encoder + knn (hnswlib). Works not bad (dunno how to measure accuracy), but could be better. I'm trying to understand how to perform FT and see some numbers. Thanks!

@realsergii My code for that experiment was simply based on https://github.com/Colanim/BERT_STS-B (IIRC). Fine-tuning is required to adapt BERT to the regression task on STS-B.

Hi,
Even I'm working on a similar task. I'm using 'bert_multi_cased_L-12_H-768_A-12/1' model for japanese texts. I followed tensorflow_hub method and got both pooled_output and sequence_output for one sentence.
Do you have any idea on how good this 'pooled_output' vector is for sentence representation.
Otherwise is it better to give feature vectors to LSTM and compare similarity between sentences?

If you can use BERT end-to-end to classify your sentences, I believe it will always be better this way.
However, because of the input size limit of BERT, it might be necessary to first represent each sentences through BERT, and then use a LSTM (or something else) to create a representation for long documents. In that case you anyway don't have much choices.

Hey, Thanks for the reply.
In case I want to use the feature vectors on LSTM layer and get sentence embeddings what weights can I give for LSTM layer?
Because without weights output from LSTM layer will change everytime I run the code.
I tried mean and also max of feature vectors both gave bad results. ( I am using the run_pretraining code to get domain specific contextual embeddings and that returns only word level embeddings )
Any idea how to do this?

In case I want to use the feature vectors on LSTM layer and get sentence embeddings what weights can I give for LSTM layer?
Because without weights output from LSTM layer will change everytime I run the code.

You have to train your model on a dataset, the network will learn the weights by himself. And indeed, the weights are going to be different with each training.

Hi,
Even I'm working on a similar task. I'm using 'bert_multi_cased_L-12_H-768_A-12/1' model for japanese texts. I followed tensorflow_hub method and got both pooled_output and sequence_output for one sentence.
Do you have any idea on how good this 'pooled_output' vector is for sentence representation.
Otherwise is it better to give feature vectors to LSTM and compare similarity between sentences?

If you can use BERT end-to-end to classify your sentences, I believe it will always be better this way.
However, because of the input size limit of BERT, it might be necessary to first represent each sentences through BERT, and then use a LSTM (or something else) to create a representation for long documents. In that case you anyway don't have much choices.

Yeah, sounds correct.
How do I get the [CLS] token from bert model at code level?
Any idea on how to do this?

How do I get the [CLS] token from bert model at code level?

This will give you the last layer of the transformer, just take the first token.

How do I get the [CLS] token from bert model at code level?

This will give you the last layer of the transformer, just take the first token.

Thanks a lot!!

@realsergii My code for that experiment was simply based on https://github.com/Colanim/BERT_STS-B (IIRC). Fine-tuning is required to adapt BERT to the regression task on STS-B.

Done! Got Pearson 0.897. Looks like awesome result! @cdluminate could you please explain why this fine-tuned model is not good for your task?

@realsergii My code for that experiment was simply based on https://github.com/Colanim/BERT_STS-B (IIRC). Fine-tuning is required to adapt BERT to the regression task on STS-B.

Done! Got Pearson 0.897. Looks like awesome result! @cdluminate could you please explain why this fine-tuned model is not good for your task?

Simply because I need the embedding vectors. The regression model suffers from combinatorial explosion in the number of sentence pairs. In one of my datasets it takes more than 100 years to calculate all similarity scores.

@realsergii My code for that experiment was simply based on https://github.com/Colanim/BERT_STS-B (IIRC). Fine-tuning is required to adapt BERT to the regression task on STS-B.

Done! Got Pearson 0.897. Looks like awesome result! @cdluminate could you please explain why this fine-tuned model is not good for your task?

How did you get this? Using run_classifier.py code on STS-B data from glue gives a fine tuned model?
Can we use that model for finding similairty between two sentences from any other data?

@KavyaGujjala I was using the code from here https://github.com/Colanim/BERT_STS-B, so for STS-B I was using run_scorer.py. I tried (via Bert-as-service) to use this fine-tuned model to find similarity between two sentences on my data, but the results were worse than by using Universal Sentence Encoder. My guess it's because of specifics of my data: very short sentences, rather noun phrases and verb phrases. BERT should be working fine on normal sentences, like in STS-B dataset.

@KavyaGujjala I was using the code from here https://github.com/Colanim/BERT_STS-B, so for STS-B I was using run_scorer.py. I tried (via Bert-as-service) to use this fine-tuned model to find similarity between two sentences on my data, but the results were worse than by using Universal Sentence Encoder. My guess it's because of specifics of my data: very short sentences, rather noun phrases and verb phrases. BERT should be working fine on normal sentences, like in STS-B dataset.

@realsergii How were you finding the similarity between sentences? using [CLS] token as sentence representation? Also by saying fine-tuning on your data were you using labelled corpus? If so, can you please state one example?

@KavyaGujjala I was using L2 space of https://github.com/nmslib/hnswlib
I tried [CLS] token as well as pooled tokens options.
I did not fine-tune on my data, only on STS-B. I do not have a labeled corpus. My tasks is not related to any domain, rather to general language understanding. So I expected fine-tuning on STS-B should give good results.

@KavyaGujjala I was using L2 space of https://github.com/nmslib/hnswlib
I tried [CLS] token as well as pooled tokens options.
I did not fine-tune on my data, only on STS-B. I do not have a labeled corpus. My tasks is not related to any domain, rather to general language understanding. So I expected fine-tuning on STS-B should give good results.

@realsergii Thanks for the information. So you are saying a fine-tuned model on STS-B dataset from GLUE should work well in your case (finding similarity between any other sentences ), because its not domain related, correct?
I have domain specific data. I want to fine tune bert base model on this data because using a [CLS] token without fine-tuning doesn't help much. But I dont have labelled corpus as well. So trying to figure out how to do this. My task is solely related to finding similarity between sentences.
@cdluminate @Colanim Any idea on how to do this?

So you are saying a fine-tuned model on STS-B dataset from GLUE should work well in your case (finding similarity between any other sentences ), because its not domain related, correct?

I think it should work well on NOT domain related sentences similar to ones in STS-B dataset. But my case is a bit different: it's rather noun phrases than sentences, so BERT fine-tuned on STS-B works, but not always good enough.

i concatenate a first token [cls] , mean pooler, max pooler and attention pooler , all features above of layer 9 of bert and feed vecto concat to a Linear , and use cosine distance to evaluate similar of 2 sentences .
I think these can help you to encode a sentence in vecto space

I fine-tuned BERT (PyTorch version from huggingface)  to generate sentence embedding for cosine similarity computation on the STS-B task, and got a 0.83 Pearson score on the Dev dataset.  Any suggestion to make it better to approach to 0.89 by the simple regression model?

i concatenate a first token [cls] , mean pooler, max pooler and attention pooler , all features above of layer 9 of bert and feed vecto concat to a Linear , and use cosine distance to evaluate similar of 2 sentences .
I think these can help you to encode a sentence in vecto space

Hi, Volinh, how is the performance?

I fine-tuned BERT (PyTorch version from huggingface) to generate sentence embedding for cosine similarity computation. A FC layer + tanh activation on the CLS token is added to generate sentence embeddings.
Fine-tuned the model on the STS-B task, and got a 0.83 Pearson score on the Dev dataset. Any suggestion to make it better to approach to 0.89 by the simple regression model?

Does concatenating other token and other layers help?

Hi, Beekbin, could you share your code? Does concatenating other tokens and other layers help?

This is the model:
class BertPairSim(BertPreTrainedModel):
    def __init__(self, config, emb_size=1024):
        super(BertPairSim, self).__init__(config)
        self.emb_size = emb_size
        self.bert = BertModel(config)
        self.emb = nn.Linear(config.hidden_size, emb_size)
        self.activation = nn.Tanh()
        self.cos_fn = torch.nn.CosineSimilarity(dim=1, eps=1e-6)
        self.apply(self.init_bert_weights)

    def calcSim(self, emb1, emb2):
        return self.cos_fn(va, vb)

    def forward(self, input_ids, attention_mask):
        _, pooled_output = self.bert(input_ids, None, attention_mask,
                                     output_all_encoded_layers=False)
        emb = self.activation(self.emb(pooled_output))
        return emb

The whole project including training process is here

Mark.
What does FT mean?

Mark.
What does FT mean?

 I am a beginner in NLP field.
I also would like to learn a fune-tune model for calculating similarities between a lot sentence.
How do you use pearson correlation coefficient to evaluate your validation?
Have you already gotten actual vector for every sentence?

@yolearn please take a look on the detail of STS-B benchmark. These details can answer your question.

@yolearn please take a look on the detail of STS-B benchmark. These details can answer your question.

Thank for your share. I finally understand the details.
I would like to ensure what you do.
You have a lot data without label. Therefore, you would like to try getting embedding from STS-B benchmark and then map to your data to calculate similarity.
Is anything I misunderstand?

I used a Siamese-type network, separating the sentence representation by BERT.
Basically, I input one sentence into BERT, get the feature vectors for this sentence, input this feature vectors into LSTM. Do the same for the second sentence, then compare the output of LSTMs with distance (I used Manhattan distance, but cosine distance works as well).
My vanilla network is less good than the end-to-end BERT : I could reach 0.78 (Pearson correlation). This is because in my model, BERT represent sentence one by one, and not the sentence pair together.
After a few improvements (ensembling), I could reach 0.82, but that's all.
Why exactly are you using cosine similarity ? I believe this approach is not good compared to the end-to-end BERT.

Hi, I would like to ask what's your end-to-end meaning? Does it mean that you directly get embedding from bert instead of fine-tuning?
As I understand from Andrew Ng' course, end-to-end in DLmeans that we don't need to process features and we can get result from raw data.

Did you use the last state of LSTM output, or you did a pooling over all the state of LSTM output?

I just used the last state of the LSTM
I tried several things, and for my problem, the best solution was to use Reduce-mean pooling between all the feature vectors outputted by BERT. Then I fed this into a LSTM (I believe a simple Feed Forward network would work equally good, if not better) and get the last state of the LSTM.
This last state of the LSTM is my sentence representation. I can then compare it to other sentence representation with a distance. So at the end I have a Siamese network.
Note : CLS embedding is a better solution for sentence representation if you can fine tune your model.

hi cola. you added LSTM layer at top of bert.i wonder if you had published paper, i wanna a reference. your github don't have email, so i could only reply here.thanks.

@SmartMapple Sorry I didn't published anything, and the code is not public so I can't share it unfortunately..

@SmartMapple Sorry I didn't published anything, and the code is not public so I can't share it unfortunately..

ok, dosen't matter. appreciate for your shared.


default activity to descend

Please change the default activity to descend.

I think this is fixed

This is not fixed on the ships. Default is transect on WF. Please help asap on this one. Thanks-


toggle-show-read-feeds hides read articles in itemview

Split from #393:

Unrelated to the issue: The toggle-show-read-feeds key hides read feeds if pressed in the feed view, if pressed in the article view, it hides read articles.

I thought this was a feature and use it regularly in the article view. If it was named toggle-show-read-items instead, it would make sense that it works in both the feed and article views.


Update isHeaderMatch() regex to catch errors

Update the isHeaderMatch(); regex in order to catch errors too such as bad tokens.
For example, send a message with a bad token will provoques the following error :
<message><data:gcm xmlns:data="google:mobile:data">{"message_type":"nack","from":"wrong_token","message_id":"event4879","error":"BAD_REGISTRATION","error_description":""}</data:gcm></message>
The previous regex <message to=\".*.\" from=\".*.\" type=\".*.\"> didn't catch this error, making isHeaderMatch(); returning false and consequently never accessing to the line 150.

As this repository seems to be unmaintained, I allow myself to fork it and improve it. It can be found there: https://github.com/baudev/FCM-UPSTREAM-XMPP


Help in mounting/copy fortigate-key.yaml file to image itself

Hi @bluecmd  ,
Can you please help me with your advice on mounting fortigate-key.yaml file directly inside the image. Currently I am planning to run the fortigate exporter on PaaS service (Cloud foundary) which does not support volume mounting these files to the container in run time and there is no storage volume to store fortigate-key.yaml. I am thinking is there any way during the build process of the image in the Dockerfile, can we directly push/mount fortigate-key.yaml and create the image out of it.
I use below copy command in the dockerfile but its not working. Can you suggest something here?
FROM quay.io/bluecmd/fortigate_exporter:master
COPY ./my-local-dir/fortigate-key.yaml /config/fortigate-key.yaml

@bluecmd @j-oss2023 @lazyb0nes
Need your advice in here on creating docker file

I guess your docker build looks right...
but how have you setup your docker compose
see below
  fortigate_exporter:
    restart: always
    # image: quay.io/bluecmd/fortigate_exporter
    image: fortigate_exporter # your custom image
    command: ["-auth-file", "/config/fortigate-key.yaml", "-insecure"]

Hi @j-oss2023 ,
Thank you for your reply, After hardening the fortigate-key.yaml file inside the image, I am just running this image in cloud foundary or we can say that I want to use simple docker run command like docker run -it fortigate_exporter -p 9710:0710
Using below manifest in cloud foundry but getting error as : no such file or directory
applications:
- name: fortigate # name of your application
  memory: 1G
  disk_quota: 1G
  instances: 1
  port: "9710:9710"
  docker:
    image: faizans/test:latest  # my customized image
  command: -auth-file /config/fortigate-key.yaml -insecure

@faizansyed66  Where are you seeing no such file or directory can you provide screenshot,
you could try:
https://www.decomposerize.com/
which converts your docker compose into a docker run command
I converted it with chatgpt for you,
docker run -d --restart=always --name fortigate faizans/test:latest -auth-file /config/fortigate-key.yaml -insecure

How to use Docker or create Docker images is not in scope here, probably Stack Overflow or some other generic place is a better place to ask.


Make storage pluggable

If caddytls.Storage was pluggable, it would make it possible to use something other than the local disk for TLS asset storage. In fact, the abstraction doesn't have to be limited to caddytls; if we think of storage as a simple key-value store, we may only need a few methods on an interface for all disk-related functions to be abstracted.
So two ways to do it:

Abstract caddytls.Storage, this makes only the TLS assets pluggable
Abstract assets.go, which makes all storage pluggable, however I don't know how feasible this is

Someone is welcome to look into this before I have a chance to get around to it.
* Adopted from this forum topic which has more details but continue discussion here

From what I see, assets is only used for the TLS storage. I don't think its reasonable to abstract the assets stuff (and the moveStorage stuff or any of that). Instead, the default impl of the TLS storage interface should just leverage the AssetsPath() as necessary. If, in the future, there are other assets that leverage the filesystem, no reason to require them to share state like TLS.

Well, Caddy does need a place to store assets; the search plugin does, for instance. (The search plugin was written before the auto TLS stuff and there was no concept of a storage place for Caddy assets, but there is now, and it will soon need to use it.)
So the storage abstraction will indeed need to be available to plugins somehow. I think that will be valuable in the long run!

@mholt - Here is an early commit of what I am thinking: https://github.com/cretz/caddy/commit/84771da9fd041d534e5c0bd87d28a2251d57fae5. It will allow plugins to add storage just like they add middleware today. I took great care w/ my refactoring scalpel to not upset the code too much.
Please take a peek. Hopefully the benefits of keeping it specific to TLS, such as keeping the changes lean and not touching the rest of the codebase, are clear. I think a generic KV store is orthogonal to this. Also, this data is highly secret, so not sure it should be mixed with other arbitrary storage.

@cretz Wow, that's quite the change! I can tell you put some time into it. I have made some comments in-line along with @weingart.
You make some good points about keeping TLS asset storage separate from "regular" Caddy storage, although I hope that all Caddy assets will be stored with care.
Anyway, I really like where this is heading and would be willing to accept a PR for more review and finishing touches (especially docs and tests). It will be valuable to make clear in docs how storage providers can be plugged in. A good example of how to plug into the caddytls package is the DNS providers: https://github.com/caddyserver/dnsproviders

This was implemented in #913 - thanks @cretz!


Better defaults

Hi,
Looks like a great idea, but the defaults aren't great at the moment. Just adding two simple buttons to my app I get:

The font should be SF (as has already been mentioned in another issue). If the button was styled in the same way as the screenshots in the README that would also be great.
I think this package will turn into something great and thanks for all the work you've put in so far!

Hey, thanks for the feedback. I agree with the default font choice, as far as it not being quite optimal, and it's good to get feedback. Check out a future version of this package in the next few days to default to SF font. Also, as far as the example styling goes in the docs, we were originally using Lato and all of the examples are showing Lato, but for the package to work nicely with exponent and also to be less opinionated, we pulled out Lato and replaced it with a system font. Once we are set on a great default font, we will go back and redo the screenshots. Thanks again for the feedback!

Just submitted a new version, check it out and let me know if we are on the right track in your opinion.

@elie222 Any feedback on this?

Hey. I'll have a look now. One thing I noticed with the list view example
there was some padding at the top for Jo apparent reason. Perhaps that
space was reserved for a header which I wasn't using.
On 13 Sep 2016 19:08, "Nader Dabit"<EMAIL_ADDRESS>wrote:

@elie222 https://github.com/elie222 Any feedback on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/React-Native-Elements/issues/10#issuecomment-246734338,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC8oXyYeeK26QfWEZvJF60p5GaSHSmraks5qpspxgaJpZM4J6ZJg
.

The docs are far better now, and buttons are working very nicely having just tried all styles of button.
One thing that isn't working is social though:

You may want to remove the container styling for that View, maybe remove any alignItems or justifyContent styling from the parent View and let me know if it works.

@elie222

@elie222 There is a fix for this padding issue in the latest release.

Looks like it's still an issue:

You need to probably check into the styling you have on the parry
component. Remove any justify-content or align-items styling .
On Wednesday, October 5, 2016, Eliezer<EMAIL_ADDRESS>wrote:

Looks like it's still an issue:
[image: screen shot 2016-10-06 at 4 33 53 am]
https://cloud.githubusercontent.com/assets/3090527/19137668/41ccc9cc-8b7e-11e6-9c81-3dcdce04c087.png
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/react-native-community/react-native-elements/issues/10#issuecomment-251845899,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABxXAurbJH-TUF8Ek2M_oRj5TRTtaKizks5qxFBVgaJpZM4J6ZJg
.

--
Nader Dabit
@dabit3 https://twitter.com/dabit3
601-812-8166


how to custom a span (border, gradient color), and tooltip in flame chart?

Hi. Thank you for providing an excellent flamecharts library.
Can i ask for a way to modify span properties in flamechart, such as border Color, border radius, background color, .... . For example, I see someone can do gradient color. Below is an example.

Also, can we have a component like this:

which will follow our cursor. and also have hover effect on each span.

@xyzt1402 Hello.
Unfortunately, at the moment it is only possible to modify the color of the spans. In theory, you can really try using a gradient as a span color.
Something like this:
{
    name: 'foo',
    start: 1000,
    duration: 2000,
    color: 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)',
}

or if you use types in each node
const flameChart = new FlameChart({
  data: [
    {
        name: 'foo',
        start: 1000,
        duration: 2000,
        type: 'gradient'
    }
  ],
  colors: {
    'gradient': 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)'
  }
})

Regarding displaying the current cursor position - in principle, you can try to implement this using your own plugin. A similar story is used in MarksPlugin - https://github.com/pyatyispyatil/flame-chart-js/blob/1a300c74708c22706707ce194f9cebbd7e5daffe/src/plugins/marks-plugin.ts#L107C28-L107C28
You can then open a pull request with the addition of this plugin, if you consider it necessary.)
And yes, thanks for the feedback!)

I tried gradient but got no luck so far, the color use inside node have no effect:
`   const name = names[i];
const start = parseFloat(starts[i]);
const duration = parseFloat(durations[i]);
const type = types[i];
const color = 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)'
const node: FlameChartNode = { name: name, start: start, duration: duration, type: type, color: color };`

and when using it inside waterfallChart, it cannot parse the string to:
{         name: 'flowing',         color: 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)',         type: 'block',         start: 'start',         end: 'end',       },

@xyzt1402
Well, I thought about this topic and decided to implement a system of patterns for spans in intervals and flame charts. You can read how to use it in the readme: https://github.com/pyatyispyatil/flame-chart-js#patterns.
I've also added the ability to display badges for spans. You can customize the size and color and set it to any node. You can also read how to use them in the readme in the types section - the node type has a new option badge. There is also an additional badgeSize option in the global style settings.
Regarding the borders - so far it seems to me that this is still not the best. This really ruins the view. But perhaps in future versions I will add this.
Everything described above is available in the latest version - v3.1.0


Please add the supported version of execution environment (OS and PowerShell).

If there are the supported version of execution environment (OS and PowerShell) about the script in "Option one (recommended): Use AzFilesHybrid PowerShell module", please add it in this document.
Option one (recommended): Use AzFilesHybrid PowerShell module

Backgrounds
We did step of "Option one (recommended): Use AzFilesHybrid PowerShell module", but they got error.
It seems it can't get "-ActiveDirectoryDomainSid $domainSid" of "Set-AzStorageAccount" command in "Join-AzStorageAccountForAuth" command.
In troubleshooting, we found that;
if they execute the command "$domainSid = $domainInformation.DomainSID.Value" in line 3766 of AzFilesHybrid.psm1 without ".Value", they can get the DomainSid correctly.
Our execution environment;

PSVersion 7.1.0
PSEdition Core
GitCommitId 7.1.0
OS Microsoft Windows 10.0.14393
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion <IP_ADDRESS>
WSManStackVersion 3.0

We used PSVersion 5.1 temporary, we success to execute the same command with ".Value" (default).

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

ID: 7a1a9f3d-5733-012a-a0d7-c00ec21b9232
Version Independent ID: 1e70ab95-9488-5aa3-b8ef-e58b3e0067bb
Content: Enable AD DS authentication to Azure file shares
Content Source: articles/storage/files/storage-files-identity-ad-ds-enable.md
Service: storage
Sub-service: files
GitHub Login: @roygara
Microsoft Alias: rogarana

@kiki-kekat Thanks for the question! We are investigating and will update you shortly.

@kiki-kekat Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Thank you!

Hello @kiki-kekat, thanks for reaching out. I don't think there are any restrictions outside of those defined in the overview article but I'll double check with the product team.

Hello @roygara, @SumanthMarigowda-MSFT,
Thank you for your support. Do you have any update?
There are users who are waiting update the document. If you have any update or progress, please let me know.

#assign:yuemlu

#reassign: @khdownie

Added a note to docs: You must run the script below in PowerShell 5.1 on a device that's domain joined to your on-premises AD DS, using an on-premises AD DS credential that's synced to your Azure AD. The on-premises AD DS credential must have either Owner or Contributor Azure role on the storage account and have permissions to create a service logon account or computer account in the target AD.

#please-close


Should the Sockets and SignalR protocol be subprotocols in WebSockets

Should we set the subprotocol when talking over websockets?
/cc @anurse

Yes, I think we should, just to make sure we're clear.

Related to https://github.com/aspnet/SignalR/issues/520

The client should send a versioned subprotocol name for SignalR.
Endpoint should be able to read the subprotocol from metadata

@moozzyk how do you feel about this? This requires some back and forth between the endpoint and the transport.

I think it depends on how much of back and forth is required. Not required but would be nice. I wonder if it could be useful at the http connection level for IoT scenarios.

What if this was just an EndPoint option and .MapHub configured it?

I'm not sure you want to do it that globally instead of per connection.

My thought is you'd have a list of subprotocols on the Endpoint options that are allowed, and the transport would negotiate it against the list that the client presents in it's request. The actual subprotocol decision is per-connection.
Also, we could take a page out of the Auth Handlers and provide events on the Endpoint options for custom subprotocol negotiation.


DataQuery min-max-avg-sum queries issue

DataQuery object doesn't let us use many many extra fields values.
For an instance (DataList)->max('ProductPage_ProductItems.SortOrder') will return an error cuz quotes will be added I think it will be great if we will remove them at the DataQuery.php.
You can use (DataList)->max('SortOrder'), but it won't work if you have 2 fields: ProductPage_ProductItems.SortOrder and ProductItem.SortOrder.
I suppose replacing: MAX("$val") with MAX(Convert::raw2sql($val)) will fix this issue.

Confirmed still present in ss4, and also fails on non-extra-fields. Dot syntax doesn't work in aggregate queries at all.
Classifying as enhancement as it's a missing feature.


Use case

Hi, sorry if this is wrong place to ask. Do I understand correctly that corert will allow me to write c# console app and compile it to native executable for win/lin/osx?

yes exactly.
It's a work in progress - not much more than Hello World works right now though.


Try to listen listview drag end event

Hello,
I am build a list with listview.builder
And use control to listener the scroll position,
I try to get drag release position, when drag down pass some position point, when user release drag , will process function.
When doing the research I haven’t see any information about listview drag start and drag end event maybe there wasn’t have one?
And I try other method was wrap listview inside gestures , tap event is working but all drag vertical  event is not working. :(

just found out a solution using listener.
wrap listview inside listener.
return new Scaffold(
        appBar: appBar,
        body: new Listener(
            onPointerUp: (_) {
              tabup = true;
            },
            onPointerDown: (_) {
              tabup = false;
            },
            child:  put listview here
));
  }

just found out a solution using listener.
wrap listview inside listener.
return new Scaffold(
        appBar: appBar,
        body: new Listener(
            onPointerUp: (_) {
              tabup = true;
            },
            onPointerDown: (_) {
              tabup = false;
            },
            child:  put listview here
));
  }

Your solution helps me, thank you

just found out a solution using listener.
wrap listview inside listener.
return new Scaffold(
        appBar: appBar,
        body: new Listener(
            onPointerUp: (_) {
              tabup = true;
            },
            onPointerDown: (_) {
              tabup = false;
            },
            child:  put listview here
));
  }

Thanks for the code snippet and no need to wrap Listener with Scaffold.


Fixed documention

Hey @joelcamus,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: 77dd82d0-de5a-11ea-a02c-4f626b4af334

Thanks for the quick PR. I already patched this in https://github.com/postwoman-io/postwoman/commit/e5a18b6e4c30f4134387db5430e478243d453404


Can't Tag Users in Slack by their Slack ID's or People who have spaces in their @firstname Lastname

What is the proper way to link users by their slack ID's
I've tried @XXXXXXX which doesn't work,
Going to try
<@XXXXXXXX> tomorrow to see if that works as that is the slack json template format I've used before which seemed to work. I'll update this issue if it works. once i find out tomorrow.
Also, how to tag users that have a space in their slack human readable name?
for example,
doing @John Smith doesn't work. which is why i've been trying to use the slack id instead.
Awesome plugin by the way!

I just tested it and <@xxxxxxxx> works!
would be useful if that information was included in the readme or docs for this project somewhere.
Okay closing issue.
Again, thanks for building this awesome plugin! :)


Gift Entry: Default Gift Entry Template

This is short one about saving a copy of the default to make your own. Do we need this, or just add to the main template story?
https://powerofus.force.com/s/article/NPSP-Default-Gift-Entry-Template
https://docs.google.com/document/d/1sZzCehOFqL2jd0-MpUHfQAI0AddkmSLErSwqI5i2ZEw/edit?usp=sharing

@pkasolves and @jcpsim - The script linked above has not script in it. Did this content get moved to the main template story as noted in Bill's notes? Thanks!


[Need help] How to install extensions in php egg?

Hi,
I just started using this egg, but I need some extensions to be installed/enabled.
I have tried the command docker-php-ext-install but it gave me an error: mkdir: cannot create directory '/usr/src/php': Read-only file system
Does anyone have any ideas on how to do this?
Kind regards,

Miniontoby

Give rights to it?


Merge dev into master

 Issue by evansiroky
Wednesday Oct 17, 2018 at 17:58 GMT
Originally opened as https://github.com/catalogueglobal/datatools-server/pull/119

It's time to bite the bullet and merge dev to master.

evansiroky included the following code: https://github.com/catalogueglobal/datatools-server/pull/119/commits

 Comment by landonreed
Monday Nov 05, 2018 at 16:03 GMT

Same comment as in the UI repo:

@evansiroky, I think for these release PRs we could probably follow the convention that appears to have emerged for other projects and just name it after the release version (which I think you can come up with by running semantic-release locally). Could you update the PR with this info?

Also, I don't know if we have formally established this, but it might be a good idea to run the end-to-end test for a release and indicate with which version of the datatools-server repo it passed.

 Comment by codecov-io
Thursday Nov 08, 2018 at 14:53 GMT

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a2a7560). Click here to learn what that means.
The diff coverage is 4.47%.

@@           Coverage Diff            @@
##             master    #119   +/-   ##
========================================
  Coverage          ?   5.11%
  Complexity        ?      91
========================================
  Files             ?     129
  Lines             ?    6780
  Branches          ?     885
========================================
  Hits              ?     347
  Misses            ?    6408
  Partials          ?      25

Impacted Files
Coverage Δ
Complexity Δ

...l/datatools/editor/models/transit/TripPattern.java
0% <ø> (ø)
0 <0> (?)

...ols/manager/models/ExternalFeedSourceProperty.java
0% <ø> (ø)
0 <0> (?)

...c/main/java/com/conveyal/gtfs/JsonTransformer.java
0% <ø> (ø)
0 <0> (?)

...eyal/datatools/manager/models/OtpRouterConfig.java
50% <ø> (ø)
1 <0> (?)

...onveyal/datatools/manager/codec/IntArrayCodec.java
15.38% <ø> (ø)
2 <0> (?)

...eyal/datatools/manager/utils/json/JsonManager.java
61.53% <ø> (ø)
1 <0> (?)

...veyal/datatools/manager/models/OtpBuildConfig.java
50% <ø> (ø)
1 <0> (?)

...a/com/conveyal/datatools/manager/models/Model.java
18.51% <ø> (ø)
1 <0> (?)

...atools/manager/controllers/api/UserController.java
7.77% <0%> (ø)
2 <0> (?)

...com/conveyal/datatools/manager/jobs/DeployJob.java
0% <0%> (ø)
0 <0> (?)

... and 63 more

Continue to review full report at Codecov.

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

 Comment by landonreed
Monday Dec 10, 2018 at 20:15 GMT

@evansiroky, I'm going to close this since we're moving work to https://github.com/conveyal/datatools-server. I will reopen it there.


[Feature Request] Workflow is static object, not unit testable

Thanks for the great package
Is your feature request related to a problem? Please describe.
We cannot do true TTD / unit testing with the current SDK.
The SDK looks much like ASP.NET classic with the static HttpContext. However it should be more like minimal APIs exposing a context and SP.
Describe the solution you'd like
Noting static in SDK.
Everything instanced as abstractions or interfaces

This is very much intentional. We do this on purpose in order to disallow mocking/inheriting. Workflow environments are a lot of things about them that makes mocking/inheriting in a normal context way not feasible, you'll need the same static-class logic. See https://github.com/temporalio/sdk-dotnet/#workflow-testing for more information about testing.
Also, feel free to join us on #dotnet-sdk channel on https://t.mp/slack or on the forums at https://community.temporal.io/.
(closing as not an issue, but feel free to continue adding comments or joining us in one of the places above)

@cretz mate, "This is very much intentional. We do this on purpose in order to disallow mocking/inheriting".
This doesn't make sence and goes against years of software pronciples and also TDD.
This is a flaw in your design, sorry mate

Here is the proposal section with the results of the design discussion amongst many: https://github.com/temporalio/proposals/blob/master/dotnet/sdk-phase-2.md#workflow-class-and-namespace-rename. The Workflow is part of the environment, not just part of specific methods. Think of it like System.Environment or System.Threading.ThreadPool.


Directly save pandas Dataframes without requiring SQL database

Users who only want to work in pandas dataframes should be able to
save/load those dataframes from the local/cloud storage of their choice

@tatiana @utkarsharma2 If we are going to allow people to save dataframes as well as tables, should we still call that variable input_table? Or should we have to variables input_table/input_df and just require that only one of them is populated?

@dimberman another option could be to have a parameter input which would handle both tables and dataframes, what are you thoughts about this possiblity?


"templating: angular" works only if set in .jsbeautifyrc.json ?

Im not sure where is problem.
It looks like options in VSC setting file not working ("js-beautify-for-vscode.html.templating": ["angular"])?
Indentation is always same like AUTO
But if I change it in .jsbeautifyrc.json the indentation is much nicer and looks like Angular Documentation
{"html": { "templating": ["angular"] } }

Video Example:
https://github.com/NesTeRDGIT/js-beautify-extentions/assets/5330373/522b0f20-410e-4cc7-a7f3-f061929e2856

If you are using a file and do not specify indentation parameters, js-beautify will set the parameters. Probably = 4.
If you do not use the file, VSCode will set the parameters. Using autodetection or default value(tabSize), it is visible in the status bar
templating - does not affect the Tab size
If you want to use the file. Then specify indent_size in the file

Always, unless you specify indentation options. vscode will install them on its own

I changed the title because it was misleading.

If you set "template: angular" in the .js file beautify.json, then it looks like in the Angular documentation (additional indents under @IF)
If you set it in VSC configuration it looks like "template: auto"

I'll check this later.
ps having a configuration file in the project root, even if it is empty, causes vcs parameters to be ignored

I'll check this later.
ps having a configuration file in the project root, even if it is empty, causes vcs parameters to be ignored

CONFIRMED: Problem exist because of empty .jsbeautifyrc.json file


[DRAFT][WIP] Add event recorder to show chaos status.

What problem does this PR solve?
#162 Add event recorder to show chaos status after we have applied a resource.
What is changed and how does it work?

[x] Support event recorder for controller-manager
[ ] Support event recorder for chaos-operators
[ ] Add events for failures and progresses related to a chaos action

Check List
Tests

Manual test (add detailed scripts or steps below)

Code changes

Has Go code change

Side effects

No

Related changes

No

Does this PR introduce a user-facing change?:

NONE

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@088d9cd). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #245   +/-   ##
=========================================
  Coverage          ?   43.64%
=========================================
  Files             ?       18
  Lines             ?      685
  Branches          ?        0
=========================================
  Hits              ?      299
  Misses            ?      353
  Partials          ?       33

Impacted Files
Coverage Δ

controllers/podchaos_controller.go
100% <ø> (ø)

controllers/networkchaos_controller.go
100% <ø> (ø)

controllers/iochaos_controller.go
100% <ø> (ø)

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 088d9cd...f210607. Read the comment docs.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

Another problem is that shall we keep track of normal execution of a chaos action? Should the event report the chaos progress?

@AngleNet thank you, @cwen0 @Yisaer PTAL

Another problem is that shall we keep track of normal execution of a chaos action?

I think we should

Should the event report the chaos progress?

I think the scheduler chaos can not show the progress, we did not know when to end

I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

@Yisaer @cwen0 @YangKeao what's your oponion?

Another problem is that shall we keep track of normal execution of a chaos action? Should the event report the chaos progress?

In my option, I think we can record the event when the chaos starts and ends.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

About this question, If we gather all of the events around the chaos resource, the number of events will be very large and confusing. In my option, I think we can spread the events to the owned resources.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

About this question, If we gather all of the events around the chaos resource, the number of events will be very large and confusing. In my option, I think we can spread the events to the owned resources.

Make sense ! How about we gather events about chaos actions for begining and ending around the chaos resource? For the events from resources operated by chaos actions, we should let it untouched and K8s will generate events for them. Users can check them if they want.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

HI. Currently I only add event recorder for the controller-manager. Its events are still missing. I wonder whether we should gather all of events around the chaos resource or spread the events to the owned resources. I prefer the previous one.

About this question, If we gather all of the events around the chaos resource, the number of events will be very large and confusing. In my option, I think we can spread the events to the owned resources.

Make sense ! How about we gather events about chaos actions for begining and ending around the chaos resource? For the events from resources operated by chaos actions, we should let it untouched and K8s will generate events for them. Users can check them if they want.

We can record an event when to apply chaos action and record the other one when to cancel the action

For now, it only records events for starting and completion. I have tried to record events for chaos failures. However, there are much things to do. I plan to add them in future PRs. Is that OK? @zhouqiang-cl

However, there are many things to do. I plan to add them to future PRs. Is that OK?

It is ok. If it too large, you can design and split it into many issues to track. After creating many issues maybe other guys also can help you with this stuff

However, there are many things to do. I plan to add them to future PRs. Is that OK?

It is ok. If it too large, you can design and split it into many issues to track. After creating many issues maybe other guys also can help you with this stuff

OK. Will split it out and open issues later.

I found a workaround to add failure events for all of chaos this morning  :joy: :joy: . It's now ready to merge. @zhouqiang-cl @cwen0 PTAL

@AngleNet Can we review this pr now?

I found a workaround to add failure events for all of chaos this morning 😂 😂 . No need to open another issues to handle failure events.
Good job

For now, I think the record constructor is enough for this request.
Besides, IMO, the current event recording is misguiding. If the reconciliation is success, It could be the recovery or re-performing.
result, err = reconciler.Reconcile(req, chaos)
	if !chaos.IsDeleted() {
		if err != nil {
			r.Recorder.Event(chaos, v1.EventTypeWarning, utils.EventChaosInjectFailed, err.Error())
		} else {
			r.Recorder.Event(chaos, v1.EventTypeNormal, utils.EventChaosStarted, "")
		}
	} else {
		if err != nil {
			r.Recorder.Event(chaos, v1.EventTypeWarning, utils.EventChaosRecoverFailed, err.Error())
		} else {
			r.Recorder.Event(chaos, v1.EventTypeNormal, utils.EventChaosCompleted, "")
		}
	}

HI, @Yisaer .Could you please explain the misguiding points more specifically?

I mean to record startion and completion for each success chaos resource. If chaos has failed, it should also record the failure instead of the startion or completion. It is just one round. If a chaos is scheduled several rounds, it should record multiple rounds as above said.

@AngleNet Can we review this pr now?

Yes. It is review-ready now.

I mean to record startion and completion for each success chaos resource. If chaos has failed, it should also record the failure instead of the startion or completion. It is just one round. If a chaos is scheduled several rounds, it should record multiple rounds as above said.

Hi @AngleNet ,  I think recording the performing and recovery information (timestamp / effected area / etc.. ) for each chaos action is more helpful for ChaosMesh users as I mentioned here https://github.com/pingcap/chaos-mesh/issues/162 . And the event of starting and completion of each reconciliation, I think it may be useful as internal log (with high log level), but not necessary as recoding events.

Yes. I think the code works just like you said actually. It’s just missing some detailed information since It’s already defined in spec. And the time stamp is also tagged with the event. Was I misunderstanding the code base ?

As ChaosMesh users needs to know the every timestamp for performing and recovering the chaos action, I suggest that to add event in the certain chaos action controller likely following logic:
In podfailure/types.go
// Apply implements the reconciler.InnerReconciler.Apply
func (r *Reconciler) Apply(ctx context.Context, req ctrl.Request, obj reconciler.InnerObject) error {

// Perform chaos action logic ...

r.Recorder.Event(chaos, v1.EventTypeNormal, utils.EventChaosPerformed, "podfaulre chaos perfromed,affect 3 pods")
}

// Recover implements the reconciler.InnerReconciler.Recover
func (r *Reconciler) Recover(ctx context.Context, req ctrl.Request, obj reconciler.InnerObject) error {

// Recovery chaos action logic

r.Recorder.Event(chaos, v1.EventTypeNormal, utils.EventChaosRecovered, "podfaulre chaos recovered, recover 3 pods")
}

In this way, the event would be sent for the podfailure chaos  object each time it get performed and recovered without caring where the calling from (schedule chaos or common chaos)  I think this would help you. @AngleNet

Yes. It’s a good place for handling chaos starting and recovering event. However, I think we could still record failing events in the entry reconciler.

@AngleNet Remaining failure event in the entry reconciler is ok to me.

@AngleNet thank you very much, we will take a look as soon as possible

@Yisaer Please take a final look 😝


access google sheet

setup auth to access google sheets api
mapping of abbreviations to enum names
serving data endpoint

TODO:

read through each cell in a row
try to insert the row data into a Data proto message for validation
if no errors on the buf validation, insert the data into their respective tables

closing this PR as the commit history has yet again been messed up.


ci: change the service connection for dualstack pipeline

Reason for Change:

This PR is to bypass eastus2euap service issue for now
Issue Fixed:

Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] relevant PR labels added

Notes:

We are able to bring up dualstack overlay cluster in centrauluseuap and eastus2euap region with network-plugin none + Build Validations Sub, so use this PR to fix this service connection: https://github.com/Azure/azure-container-networking/pull/2153****


Doesn't work all the way

See screenshot below, in top bar it doesn't show any stats and also no Thermal info, CPU or Fan Control stats.
Log:
linux@pop-os: sudo cat /proc/acpi/ibm/thermal
temperatures:	43 0 0 0 0 0 0 0
linux@pop-os: sudo cat /proc/acpi/ibm/fan
status:		enabled
speed:		2585
level:		auto
linux@pop-os: lscpu
Architecture:            x86_64
CPU op-mode(s):        32-bit, 64-bit
Address sizes:         36 bits physical, 48 bits virtual
Byte Order:            Little Endian
CPU(s):                  8
On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
Model name:            Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz
CPU family:          6
Model:               58
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
Stepping:            9
CPU max MHz:         3800.0000
CPU min MHz:         1200.0000
BogoMIPS:            5587.06
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse
36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp
lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop
_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est
tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadli
ne_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd i
brs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep er
ms xsaveopt dtherm ida arat pln pts md_clear flush_l1d
Virtualization features:
Virtualization:        VT-x
Caches (sum of all):
L1d:                   128 KiB (4 instances)
L1i:                   128 KiB (4 instances)
L2:                    1 MiB (4 instances)
L3:                    8 MiB (1 instance)
NUMA:
NUMA node(s):          1
NUMA node0 CPU(s):     0-7
Vulnerabilities:
Itlb multihit:         KVM: Mitigation: VMX disabled
L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnera
ble
Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
Meltdown:              Mitigation; PTI
Mmio stale data:       Unknown: No mitigations
Retbleed:              Not affected
Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional,
RSB filling, PBRSB-eIBRS Not affected
Srbds:                 Vulnerable: No microcode
Tsx async abort:       Not affected
linux@pop-os: lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda             8:0    0 465.8G  0 disk
├─sda1          8:1    0 461.8G  0 part  /
└─sda2          8:2    0     4G  0 part
└─cryptswap 253:0    0     4G  0 crypt [SWAP]
sdb             8:16   0 119.2G  0 disk
├─sdb1          8:17   0     8M  0 part
├─sdb2          8:18   0   512B  0 part
├─sdb3          8:19   0   512B  0 part
├─sdb4          8:20   0   512B  0 part
├─sdb5          8:21   0   512B  0 part
├─sdb6          8:22   0    16M  0 part
├─sdb7          8:23   0    16M  0 part
└─sdb8          8:24   0 113.8G  0 part
linux@pop-os:~$ sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1:        2585 RPM
fan2:        65535 RPM
CPU:          +44.0°C
GPU:           +0.0°C
temp3:         +0.0°C
temp4:         +0.0°C
temp5:         +0.0°C
temp6:         +0.0°C
temp7:         +0.0°C
temp8:         +0.0°C
BAT0-acpi-0
Adapter: ACPI interface
in0:          11.78 V
curr1:         0.00 A
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +47.0°C  (high = +87.0°C, crit = +105.0°C)
Core 0:        +44.0°C  (high = +87.0°C, crit = +105.0°C)
Core 1:        +44.0°C  (high = +87.0°C, crit = +105.0°C)
Core 2:        +45.0°C  (high = +87.0°C, crit = +105.0°C)
Core 3:        +45.0°C  (high = +87.0°C, crit = +105.0°C)
acpitz-acpi-0
Adapter: ACPI interface
temp1:        +44.0°C  (crit = +100.0°C)
temp2:        +26.8°C  (crit = +99.0°C)

Hi, I've noticed you're doing the reads as sudo. Are you able to read the temps as a user?

Hi, I've noticed you're doing the reads as sudo. Are you able to read the temps as a user?

Hi, yes i can read temps as a user.

Okay... is there anything logged in the journal, related to the extension/gnome-shell?

I have the same error and get the following from journalctl /usr/bin/gnome-shell
Jan 06 18:30:12 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:12 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:17 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:17 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:22 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:22 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:27 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:27 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:32 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:32 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:37 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:37 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:42 orville gnome-shell[3542]: JS ERROR: TypeError: row[4].split(...)[1] is undefined
                                           parse@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:249:18
                                           execute@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:64:25
                                           async*update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:267:26
                                           Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:59
                                           setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 06 18:30:42 orville gnome-shell[3542]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the fai>
                                             Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:484:34
                                             setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9

$ cat /proc/acpi/ibm/thermal
temperatures:	46 44 49 0 44 44 45
$ cat /proc/acpi/ibm/fan
status:		enabled
speed:		2334
level:		auto
$ lscpu
Architecture:            x86_64
CPU op-mode(s):        32-bit, 64-bit
Address sizes:         46 bits physical, 48 bits virtual
Byte Order:            Little Endian
CPU(s):                  20
On-line CPU(s) list:   0-19
Vendor ID:               GenuineIntel
Model name:            12th Gen Intel(R) Core(TM) i7-12800H
  CPU family:          6
  Model:               154
  Thread(s) per core:  2
  Core(s) per socket:  14
  Socket(s):           1
  Stepping:            3
  CPU max MHz:         3700.0000
  CPU min MHz:         400.0000
  BogoMIPS:            5606.40
  Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xt
                       opology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave av
                       x f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
                       rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req umip pku ospke waitpkg g
                       fni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr flush_l1d arch_capabilities
Virtualization features:
Virtualization:        VT-x
Caches (sum of all):
L1d:                   544 KiB (14 instances)
L1i:                   704 KiB (14 instances)
L2:                    11.5 MiB (8 instances)
L3:                    24 MiB (1 instance)
NUMA:
NUMA node(s):          1
NUMA node0 CPU(s):     0-19
Vulnerabilities:
Itlb multihit:         Not affected
L1tf:                  Not affected
Mds:                   Not affected
Meltdown:              Not affected
Mmio stale data:       Not affected
Retbleed:              Not affected
Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Srbds:                 Not affected
Tsx async abort:       Not affected

$ lsblk
AME                MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0                 7:0    0     4K  1 loop /snap/bare/5
loop1                 7:1    0 146.9M  1 loop /snap/chromium/2254
loop2                 7:2    0  55.6M  1 loop /snap/core18/2632
loop3                 7:3    0  55.6M  1 loop /snap/core18/2667
loop4                 7:4    0  63.2M  1 loop /snap/core20/1738
loop5                 7:5    0  63.3M  1 loop /snap/core20/1778
loop6                 7:6    0    55M  1 loop /snap/cups/872
loop7                 7:7    0 163.3M  1 loop /snap/firefox/1635
loop8                 7:8    0 238.4M  1 loop /snap/firefox/2211
loop9                 7:9    0   219M  1 loop /snap/gnome-3-34-1804/77
loop10                7:10   0 400.8M  1 loop /snap/gnome-3-38-2004/112
loop11                7:11   0 346.3M  1 loop /snap/gnome-3-38-2004/119
loop12                7:12   0  91.7M  1 loop /snap/gtk-common-themes/1535
loop13                7:13   0 115.8M  1 loop /snap/slack/68
loop14                7:14   0  45.9M  1 loop /snap/snap-store/582
loop15                7:15   0  45.9M  1 loop /snap/snap-store/638
loop16                7:16   0  49.6M  1 loop /snap/snapd/17883
loop17                7:17   0   304K  1 loop /snap/snapd-desktop-integration/43
loop18                7:18   0   304K  1 loop /snap/snapd-desktop-integration/49
loop19                7:19   0  92.3M  1 loop /snap/whatsapp-for-linux/49
nvme0n1             259:0    0   1.9T  0 disk
├─nvme0n1p1         259:1    0   512M  0 part /boot/efi
└─nvme0n1p2         259:2    0   1.9T  0 part
├─vgubuntu-root   253:0    0   1.8T  0 lvm  /var/snap/firefox/common/host-hunspell
│                                           /
└─vgubuntu-swap_1 253:1    0   1.9G  0 lvm  [SWAP]
$ sensors
ucsi_source_psy_USBC000:002-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:        +30.0°C

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +46.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:        +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 4:        +38.0°C  (high = +100.0°C, crit = +100.0°C)
Core 8:        +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 12:       +39.0°C  (high = +100.0°C, crit = +100.0°C)
Core 16:       +41.0°C  (high = +100.0°C, crit = +100.0°C)
Core 20:       +42.0°C  (high = +100.0°C, crit = +100.0°C)
Core 24:       +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 25:       +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 26:       +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 27:       +43.0°C  (high = +100.0°C, crit = +100.0°C)
Core 28:       +38.0°C  (high = +100.0°C, crit = +100.0°C)
Core 29:       +38.0°C  (high = +100.0°C, crit = +100.0°C)
Core 30:       +38.0°C  (high = +100.0°C, crit = +100.0°C)
Core 31:       +38.0°C  (high = +100.0°C, crit = +100.0°C)

BAT0-acpi-0
Adapter: ACPI interface
in0:          17.38 V

ucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
in0:           0.00 V  (min =  +0.00 V, max =  +0.00 V)
curr1:         0.00 A  (max =  +0.00 A)

thinkpad-isa-0000
Adapter: ISA adapter
fan1:        1761 RPM
CPU:          +44.0°C
GPU:          +42.0°C
temp3:        +45.0°C
temp4:         +0.0°C
temp5:        +42.0°C
temp6:        +43.0°C
temp7:        +43.0°C
temp8:            N/A

nvme-pci-0400
Adapter: PCI adapter
Composite:    +40.9°C  (low  =  -5.2°C, high = +83.8°C)
                     (crit = +87.8°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +44.0°C  (crit = +128.0°C)

@np422 Thanks! The log was enough, and the fix is already in main. You can build it and test on your own, or wait until it's reviewed and approved on gnome exts. Let me know if it solves the issue
@MichNLGithub ping

Thank you, now it works!
I had some issues upgrading via the gnome-ext website, but I manually removed it and installed it from source and everything worked fine.

I still get some funky messages from the journal.
Jan 08 16:54:05 orville gnome-shell[270523]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                               Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:34
                                               setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 08 16:54:10 orville gnome-shell[270523]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                               Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:34
                                               setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 08 16:54:15 orville gnome-shell[270523]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                               Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:34
                                               setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9
Jan 08 16:54:20 orville gnome-shell[270523]: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise:
                                               Indicator/this._update@/home/niklas/.local/share/gnome-shell/extensions/thinkpadthermal@moonlight.drive.vk.gmail.com/extension.js:487:34
                                               setInterval/source<@resource:///org/gnome/gjs/modules/esm/_timers.js:103:9

The indicator looks fine though.

I'll wait for feedback from @MichNLGithub, and close this issue afterwards.
Regarding those warnings, there is an open issue for that, and I'm not really sure how to debug it, as I'm not seeing those warnings...
Are you by any chance running anything that is accessing tpacpi?

Not that I know of.

Thinkfan maybe?

Nope, no thinkfan.

If you find time and will, feel free to investigate more. I would be interested in your findings.
And I'm gonna assume this issue has been resolved on @MichNLGithub end, and close it.


I am not able to get request ID after i send a verification.

$verification = new \Nexmo\Verify\Verification(MY Number, 'OTP test');
$verification->getRequestId()
May I know, is there any problem with this code?
Because i am not able to get the request id of this verification.
Thank you.

Thanks for getting in touch. Is this the first step in your verification process?  I would expect the process to start with an example like this one: https://developer.nexmo.com/verify/building-blocks/send-verify-request/php - and the response there would include the request ID.  Once you have the request ID, you can create the Verification object as you tried to do here.
If we can help further, share your code, which step of the verification process you are trying to implement and any error messages you encountered so we can offer a few more suggestions to get you back on track.

Closing due to inactivity but do let us know if you need anything more