Problem loading finetuned XLNet model

After fine-tuning an XLNet classification model and obtaining TF checkpoints I converted the checkpoint to pytorch_model.bin and config.json. I need to make prediction on input text, but I have problems loading the models correctly. Any help?

What task did you fine-tuned it on?
You can convert it by running the convert_xlnet_checkpoint_to_pytorch.py script with a --finetuning_task argument (see here)

binary classification (sentiment) on my dataset
I tried the following
`import torch
from pytorch_transformers import XLNetConfig
from pytorch_transformers import XLNetTokenizer
from pytorch_transformers import XLNetModel
config = XLNetConfig.from_pretrained('./')
tokenizer = XLNetTokenizer.from_pretrained('./')
model = XLNetModel(config)
input_ids = torch.tensor(tokenizer.encode("Apple stocks increase")).unsqueeze(0)  # Batch size 1
outputs = model(input_ids)
last_hidden_states = outputs[0]`
however, the output is not binary, the output tensor is :
tensor([[[-1.0645, -1.1170, -0.5549,  ...,  0.7089,  0.2862, -0.2995],
[ 0.0198, -1.6598, -0.1760,  ...,  0.1167, -0.1545,  0.1777],
[ 0.6514, -0.5614, -1.2180,  ...,  1.0796,  1.1217,  1.0362]]],
grad_fn=)

the converting was done using:
pytorch_transformers xlnet $TRANSFO_XL_CHECKPOINT_PATH $TRANSFO_XL_CONFIG_PAH $PYTORCH_DUMP_OUTPUT .
I did not specified the task, because I though that it is not important.

It is important to match the last (classification) layer otherwise the conversion will fail.
If you give me more information on your TF training (like which script you usde for instance) I may be able to help.

I was using the:

I have modified the:
class ImdbProcessor(DataProcessor):

Here is the model after model.eval():
XLNetModel(   (word_embedding): Embedding(32000, 1024)   (layer): ModuleList(     (0): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (1): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (2): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (3): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (4): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (5): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (6): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (7): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (8): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (9): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (10): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (11): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (12): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (13): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (14): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (15): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (16): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (17): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (18): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (19): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (20): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (21): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (22): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )     (23): XLNetLayer(       (rel_attn): XLNetRelativeAttention(         (layer_norm): XLNetLayerNorm()         (dropout): Dropout(p=0.1)       )       (ff): XLNetFeedForward(         (layer_norm): XLNetLayerNorm()         (layer_1): Linear(in_features=1024, out_features=4096, bias=True)         (layer_2): Linear(in_features=4096, out_features=1024, bias=True)         (dropout): Dropout(p=0.1)       )       (dropout): Dropout(p=0.1)     )   )   (dropout): Dropout(p=0.1) )

You'll have to modify the conversion script because this is not a standard task and the number of labels won't be found in the list (see top of the conversion script) you should add 'spam': 2 in the list (if you have two labels indeed).
The other option is to directly load the TF model in PyTorch and save the pytorch model afterwards with something like this:
config = XLNetConfig.from_pretrained('xlnet-large-cased', num_labels=2, finetuning_task='spam')
model = XLNetForSequenceClassification.from_pretrained('path/to/your/tf/model.ckpt.index', config=config, from_tf=True)
model.save_pretrained('pytorch_model_saving_directory')

Perfect, tnx.
Just a minor question if I have classification model with 4 labels, I do the same changes spam:4?

Yes, change my 2 to 4

Hi Thom,
I did:
import torch from pytorch_transformers import XLNetConfig from pytorch_transformers import XLNetForSequenceClassification config = XLNetConfig.from_pretrained('xlnet-large-cased', num_labels=2, finetuning_task='sentiment') model = XLNetForSequenceClassification.from_pretrained('../model.ckpt-2500', config=config, from_tf=True) model.save_pretrained('./test')
Afterwards I get in the test folder the config.json and pytorch_model.bin.
I tried to run:
'import torch
from pytorch_transformers import XLNetConfig
from pytorch_transformers import XLNetTokenizer
from pytorch_transformers import XLNetModel
config = XLNetConfig.from_pretrained('./')
tokenizer = XLNetTokenizer.from_pretrained('./')
model = XLNetModel(config)
input_ids = torch.tensor(tokenizer.encode("Apple stocks increase")).unsqueeze(0)  # Batch size 1
outputs = model(input_ids)
last_hidden_states = outputs[0]
print(last_hidden_states)
There was an error:
Model name './' was not found in model name list (xlnet-base-cased, xlnet-large-cased). We assumed './' was a path or url but couldn't find tokenizer filesat this path or url.
So I included the spiece.model into the same test folder, but still the results is:
tensor([[[ 0.0156, -0.9046,  0.9789,  ..., -0.7764,  1.1309,  0.2862],
[ 0.4416,  0.0665,  2.0020,  ...,  0.4117,  0.9779, -1.0588],
[ 0.6908, -0.0000,  0.1479,  ...,  0.0032,  0.9871, -0.9482]]],
grad_fn=)
Do u know what I am doing wrong?

While converting this is some of the warnings:
Weights not copied to PyTorch model: beta1_power, beta2_power, global_step, model/classification_finsent/logit/bias, model/classification_finsent/logit/bias/Adam, model/classification_finsent/logit/bias/Adam_1, model/classification_finsent/logit/kernel, model/classification_finsent/logit/kernel/Adam, model/classification_finsent/logit/kernel/Adam_1

In addition, I have tried the other approach, to modify the script, but the results are the same. I think that the problem is that the weights from the classification_finsent are noti copied to pytorch model. Any suggestions on this

I have tried also in this way:
`import torch
from pytorch_transformers import XLNetConfig
from pytorch_transformers import XLNetTokenizer
from pytorch_transformers import XLNetForSequenceClassification
config = XLNetConfig.from_pretrained('/home/igor/Falcon/XLNet/sentiment_model/PyTorch/pytorch_transformer_script/test')
tokenizer = XLNetTokenizer.from_pretrained('/home/igor/Falcon/XLNet/sentiment_model/PyTorch/pytorch_transformer_script/test')
config.output_hidden_states=True
model = XLNetForSequenceClassification(config)
input_ids = torch.tensor(tokenizer.encode("Apple stocks increase rapidly")).unsqueeze(0)  # Batch size 1
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(input_ids, labels=labels)
print(outputs[0])`
and the output now is:
tensor([[1]])
tensor(0.3944, grad_fn=)

In the last attempt I did:
import torch
from pytorch_transformers import XLNetConfig
from pytorch_transformers import XLNetTokenizer
from pytorch_transformers import XLNetForSequenceClassification

config = XLNetConfig.from_pretrained('xlnet-large-cased', num_labels=2, finetuning_task='finsent')
tokenizer = XLNetTokenizer.from_pretrained('xlnet-large-cased') #I am using the default tokenizer

model = XLNetForSequenceClassification.from_pretrained('/home/igor/Falcon/XLNet/sentiment_model/model.ckpt-2500',config=config, from_tf=True) #this is my finetuned model
model.eval() #in evaluation mode
input_ids = torch.tensor(tokenizer.encode("Apple stock increase and they are overwhelmed with the success")).unsqueeze(0)  # Batch size 1
labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1
outputs = model(input_ids, labels=labels)
loss, logits = outputs[:2]
print(torch.nn.functional.softmax(logits.data))

However I am getting different prediction for the same input data, I did model.eval() to stop the dropout, but still the inference look random.
In addition here is my config file printed:
{
  "attn_type": "bi",
  "bi_data": false,
  "clamp_len": -1,
  "d_head": 64,
  "d_inner": 4096,
  "d_model": 1024,
  "dropatt": 0.1,
  "dropout": 0.1,
  "end_n_top": 5,
  "ff_activation": "gelu",
  "finetuning_task": "finsent",
  "init": "normal",
  "init_range": 0.1,
  "init_std": 0.02,
  "initializer_range": 0.02,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "mem_len": null,
  "n_head": 16,
  "n_layer": 24,
  "n_token": 32000,
  "num_labels": 2,
  "output_attentions": false,
  "output_hidden_states": false,
  "reuse_len": null,
  "same_length": false,
  "start_n_top": 5,
  "summary_activation": "tanh",
  "summary_last_dropout": 0.1,
  "summary_type": "last",
  "summary_use_proj": true,
  "torchscript": false,
  "untie_r": true
}

It looks that I getting closer, but still the inference is strange

@thomwolf I finally succeed to import the checkpoint model and infer. Still I am not sure if this a valid approach:
import torch
from pytorch_transformers import XLNetConfig
from pytorch_transformers import XLNetTokenizer
from pytorch_transformers import XLNetForSequenceClassification

seed = 0
torch.manual_seed(seed)
if torch.cuda.is_available():
	torch.cuda.manual_seed_all(seed)
#load the initial config file from the XLNet model
config = XLNetConfig.from_pretrained('xlnet_config.json', num_labels=2, finetuning_task='finsent')
#the tokenizer I am using is the initial one (spiece.model)
tokenizer = XLNetTokenizer.from_pretrained('xlnet-large-cased')

model = XLNetForSequenceClassification.from_pretrained('/sentiment_over_imdb/model.ckpt-4000',config=config, from_tf=True)
model.eval()

def sentiment(data):
	input_ids = torch.tensor(tokenizer.encode(data)).unsqueeze(0)  # Batch size 1
	labels = torch.tensor([1]).unsqueeze(0)  # Batch size 1

	outputs = model(input_ids, labels=labels)
	loss, logits = outputs[:2]
	output = torch.nn.functional.softmax(logits.data, dim=1)
	sent = output.tolist()[0][1]
        return sent


Make QMK actually work as per the official documentation

nixpkgs-check report
version: nixpkgs-check v0.1.0 on NixOS 21.05, sandbox = "true"
packages declared changed: {"python3Packages.pyrsistent", "qmk", "qmk-udev-rules", "python3Packages.pyusb"}
manual tests declared performed:

✔ built on NixOS
😢 not built on MacOS
😢 not built on Other Linux distributions
manually compile and flash a moonlander keyboard as per the official documentation

complies with contributing.md: ✔ yes
package python3Packages.pyrsistent: ✔ continued building
package qmk: ✔ continued building
package qmk-udev-rules: 💚 started building again
package python3Packages.pyusb: ✔ continued building
closure size for python3Packages.pyrsistent: ✔ increased by 2.6 KB, from 98.8 MB to 98.8 MB
tests of python3Packages.pyrsistent: 😢 there are no tests
closure size for qmk: 😢 increased by 2.4 GB, from 181.5 MB to 2.6 GB
tests of qmk: 😢 there are no tests
binaries of qmk:

updated binaries:

✔ qmk continued running successfully

tests of qmk-udev-rules: 😢 there are no tests
closure size for python3Packages.pyusb: ✔ increased by 2.6 KB, from 150.5 MB to 150.5 MB
tests of python3Packages.pyusb: 😢 there are no tests

Result of nixpkgs-review pr 130847 at 1f60c33a run on aarch64-linux 1

6 packages marked as broken and skipped:

deeptools
python38Packages.datashader
python38Packages.spacy
python38Packages.spacy-transformers
python38Packages.textacy
spyder

31 packages failed to build:

aws-sam-cli
gnuk
python38Packages.adext
python38Packages.alarmdecoder
python38Packages.flower
python38Packages.ipydatawidgets
python38Packages.kmapper
python38Packages.pyftdi
python38Packages.pyi2cflash
python38Packages.pymatgen-lammps
python38Packages.pyspiflash
python38Packages.robotframework-selenium2library
python38Packages.robotframework-seleniumlibrary
python38Packages.robotframework-tools
python38Packages.scikit-tda
python38Packages.sopel
python39Packages.adext
python39Packages.alarmdecoder
python39Packages.flower
python39Packages.ipydatawidgets
python39Packages.jupyterlab-git
python39Packages.kmapper
python39Packages.nbdime
python39Packages.pyftdi
python39Packages.pyi2cflash
python39Packages.pymatgen-lammps
python39Packages.pyspiflash
python39Packages.robotframework-selenium2library
python39Packages.robotframework-seleniumlibrary
python39Packages.robotframework-tools
python39Packages.sopel

99 packages skipped due to time constraints:

ansible (ansible_2_11 ,python39Packages.ansible-core)
ansible-lint (python39Packages.ansible-lint)
ansible_2_10 (python39Packages.ansible-base)
apache-airflow
awscli2
cloud-init
cq-editor
eliot-tree
expliot
flexget
...

203 packages built successfully:

anki
ankisyncd
antfs-cli
arion
avell-unofficial-control-center
cloud-custodian
cyclonedx-python
docker-compose
dt-schema
g203-led
gen-oath-safe
krakenx
liquidctl (python39Packages.liquidctl)
matrix-commander
nbstripout
opsdroid
pantalaimon
pypi2nix
python38Packages.BlinkStick
python38Packages.Pweave
python38Packages.apispec
python38Packages.aws-sam-translator
python38Packages.castepxbin
python38Packages.celery
python38Packages.cfn-lint
python38Packages.chart-studio
python38Packages.cve-bin-tool
python38Packages.dash
python38Packages.django-raster
python38Packages.djmail
python38Packages.facedancer
python38Packages.flask-appbuilder
python38Packages.flask-restplus
python38Packages.geoip2
python38Packages.greatfet
python38Packages.holoviews
python38Packages.hvplot
python38Packages.ipympl
python38Packages.ipyvue
python38Packages.ipyvuetify
python38Packages.ipywidgets
python38Packages.jsonmerge
python38Packages.jsonschema
python38Packages.jupyter
python38Packages.jupyter-sphinx
python38Packages.jupyter-telemetry
python38Packages.jupyter_server
python38Packages.jupyterlab
python38Packages.jupyterlab_launcher
python38Packages.jupyterlab_server
python38Packages.jupytext
python38Packages.lightparam
python38Packages.liquidctl
python38Packages.matrix-nio
python38Packages.mocket
python38Packages.modeled
python38Packages.moretools
python38Packages.moto
python38Packages.nbclassic
python38Packages.nbconflux
python38Packages.nbconvert
python38Packages.nbformat
python38Packages.nbmerge
python38Packages.nbsmoke
python38Packages.nbsphinx
python38Packages.nbval
python38Packages.notebook
python38Packages.notedown
python38Packages.openant
python38Packages.openapi-core
python38Packages.openapi-schema-validator
python38Packages.openapi-spec-validator
python38Packages.phik
python38Packages.plotly
python38Packages.pook
python38Packages.prance
python38Packages.pygreat
python38Packages.pymatgen
python38Packages.pyrsistent
python38Packages.pyusb
python38Packages.pyvisa-py
python38Packages.rachiopy
python38Packages.rfcat
python38Packages.robomachine
python38Packages.robotframework
python38Packages.robotframework-databaselibrary
python38Packages.robotframework-requests
python38Packages.robotframework-sshlibrary
python38Packages.robotstatuschecker
python38Packages.robotsuite
python38Packages.seabreeze
python38Packages.solo-python
python38Packages.sphinxcontrib-openapi
python38Packages.swagger-spec-validator
python38Packages.ttp
python38Packages.usbtmc
python38Packages.vega
python38Packages.warlock
python38Packages.webthing
python38Packages.widgetsnbextension
python38Packages.zetup
python38Packages.zigpy-zigate
python39Packages.BlinkStick
python39Packages.Pweave
python39Packages.altair
python39Packages.apispec
python39Packages.aws-sam-translator
python39Packages.castepxbin
python39Packages.celery
python39Packages.cfn-lint
python39Packages.chart-studio
python39Packages.cve-bin-tool
python39Packages.dash
python39Packages.django-raster
python39Packages.djmail
python39Packages.facedancer
python39Packages.flask-appbuilder
python39Packages.flask-restplus
python39Packages.flask-restx
python39Packages.geoip2
python39Packages.greatfet
python39Packages.holoviews
python39Packages.hvplot
python39Packages.ipympl
python39Packages.ipyvue
python39Packages.ipyvuetify
python39Packages.ipywidgets
python39Packages.jsonmerge
python39Packages.jsonschema
python39Packages.jupyter
python39Packages.jupyter-sphinx
python39Packages.jupyter-telemetry
python39Packages.jupyter_server
python39Packages.jupyterlab
python39Packages.jupyterlab_launcher
python39Packages.jupyterlab_server
python39Packages.jupytext
python39Packages.lightparam
python39Packages.matrix-nio
python39Packages.mocket
python39Packages.modeled
python39Packages.moretools
python39Packages.moto
python39Packages.nbclassic
python39Packages.nbconflux
python39Packages.nbconvert
python39Packages.nbformat
python39Packages.nbmerge
python39Packages.nbsmoke
python39Packages.nbsphinx
python39Packages.nbval
python39Packages.notebook
python39Packages.notedown
python39Packages.openant
python39Packages.openapi-core
python39Packages.openapi-schema-validator
python39Packages.openapi-spec-validator
python39Packages.plotly
python39Packages.pook
python39Packages.prance
python39Packages.pygreat
python39Packages.pymatgen
python39Packages.pyrsistent
python39Packages.pyusb
python39Packages.pyvisa-py
python39Packages.rachiopy
python39Packages.rfcat
python39Packages.robomachine
python39Packages.robotframework
python39Packages.robotframework-databaselibrary
python39Packages.robotframework-requests
python39Packages.robotframework-sshlibrary
python39Packages.robotstatuschecker
python39Packages.robotsuite
python39Packages.seabreeze
python39Packages.solo-python
python39Packages.sphinxcontrib-openapi
python39Packages.swagger-spec-validator
ttp (python39Packages.ttp)
python39Packages.usbtmc
python39Packages.vega
python39Packages.warlock
python39Packages.webthing
python39Packages.widgetsnbextension
python39Packages.zetup
python39Packages.zigpy-zigate
qmk-udev-rules
snakemake
sourcehut.buildsrht
sourcehut.coresrht
sourcehut.dispatchsrht
sourcehut.gitsrht
sourcehut.hgsrht
sourcehut.hubsrht
sourcehut.listssrht
sourcehut.mansrht
sourcehut.metasrht
sourcehut.pastesrht
sourcehut.todosrht
streamlit
tinyprog
weechatScripts.weechat-matrix
yubikey-manager

1 suggestion:

warning: unused-argument
Unused argument: fetchpatch.
Near pkgs/tools/misc/qmk/default.nix:3:3:
  |
3 | , fetchpatch
  |   ^

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

This stands out as being an odd and fragile change, why would you not just use the existing nixpkgs cross-compile infrastructure by building pkgsCross.avr.qmk and so on instead?

@arcnmx So this PR is just fixing the qmk tool as already existed, that supported only a small part of the features promised by the documentation.
The qmk ecosystem is split in two parts: the qmk tool, and the qmk_firmware repository.
The qmk tool is here to be able to fork, compile and flash the qmk_firmware repository. The qmk_firmware repository itself cannot reasonably be made into a nixpkgs package itself, because it is designed to be heavily modified by the user before being compiled.
So overall the qmk tool is similar to both cmake + openocd, with the detail that it directly depends on a known subset of gcc versions. Before this change only the openocd part worked, with this change the cmake part of it also starts working.
As you say, it would also be possible to have only the flashing part of it in nixpkgs and force the user to compile qmk_firmware themselves and then use qmk to flash it, which is approximately how things worked before this change. But then:

there is basically no documentation about how to actually do the compiling (especially as it would also involve the cross part of nixpkgs that the end-user would have to learn how to use)
we must still keep the qmk binary because it's the only official way to flash these keyboards, so users would end up with a binary for which some of the commands work and some of the commands don't (in particular the "setup" command doesn't work prior to this change)
the user must compile the versions of gcc themselves, which is quite long even though it could have been pre-compiled by hydra as it's for a well-known very restricted subset of the architectures (qmk to the best of my knowledge only requires avr and arm, though I could test only the arm part of it as my keyboard is arm)

In a way it is true that it's close-ish to rustup, but ISTR rustup recently has been working in nixpkgs, and it requires quite a bit more understanding of nixpkgs to make it work manually without help than rustup in its basic usage pattern does, plus it's code designed to be edited while rustup is only made to download tarballs from mozilla and use them.
Hope this makes the reasoning for this clearer!
Now that the issues mentioned in this PR are fixed, I'm planning on rebasing to squash the new commits into the relevant old commits and merging in the next few days unless objections arise.

Tested the package, and apparently compiling the firmware for an ARM-based keyboard (planck/rev6) works:
❯ qmk compile -kb planck/rev6 -km default
Ψ Compiling keymap with make -j 1 planck/rev6:default

QMK Firmware 0.13.34
Making planck/rev6 with keymap default

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: quantum/audio/muse.c                                                                     [OK]
...
Compiling: tmk_core/common/chibios/syscall-fallbacks.c                                              [OK]
Linking: .build/planck_rev6_default.elf                                                             [OK]
Creating binary load file for flashing: .build/planck_rev6_default.bin                              [OK]
Creating load file for flashing: .build/planck_rev6_default.hex                                     [OK]

Size after:
   text	   data	    bss	    dec	    hex	filename
      0	  52404	      0	  52404	   ccb4	.build/planck_rev6_default.hex

Copying planck_rev6_default.bin to qmk_firmware folder                                              [OK]
(Firmware size check does not yet support cortex-m4 microprocessors; skipping.)

However, compiling the firmware for an AVR-based keyboard (e.g., planck/rev5) fails:
❯ qmk compile -kb planck/rev5 -km default
Ψ Compiling keymap with make -j 1 planck/rev5:default

QMK Firmware 0.13.34
Making planck/rev5 with keymap default

avr-gcc (GCC) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: quantum/audio/muse.c                                                                     [OK]
...
Compiling: tmk_core/protocol/lufa/usb_util.c                                                        [OK]
Linking: .build/planck_rev5_default.elf                                                             [OK]
Creating load file for flashing: .build/planck_rev5_default.hex                                     [ERRORS]
 |
 | sh: avr-objcopy: command not found
 |
make[1]: *** [tmk_core/rules.mk:296: .build/planck_rev5_default.hex] Error 1
Make finished with errors
make: *** [Makefile:539: planck/rev5:default] Error 1

Apparently the problem here is that avr-objcopy is not directly provided by the pkgsCross.avr.buildPackages.binutils package, which is actually a wrapper — that executable is contained in the real binutils package, which is listed in nix-support/propagated-user-env-packages inside that binutils-wrapper. This is not a problem when pkgsCross.avr.buildPackages.binutils is used inside mkShell (therefore shell.nix inside qmk_firmware works), but apparently buildPythonApplication does not pick up extra PATH elements from nix-support/propagated-user-env-packages files of packages listed in propagatedBuildInputs, therefore the resulting PATH is incomplete and does not contain all required tools.
I don't know what would be a proper generic way to fix this problem, but I have been able to fix this particular instance by adding pkgsCross.avr.buildPackages.binutils.bintools to propagatedBuildInputs (it must be after pkgsCross.avr.buildPackages.binutils to make the wrapper work properly). The other thing that is added to nix-support/propagated-user-env-packages in that package is .libc (= pkgsCross.avr.libcCross), but it is already in the list.

I didn't know this PR existed before merging the qmk cli update.
Do you think you would be able to rebase ?
I have a darwin machine and I am happy to test on darwin.

Regarding closure size, I was wondering if we couldn't implement a features options where people could choose which dependencies they would want (depending on which board they had. Of course if people wanted to flash multiple boards, they could choose all the features).
Note that this is just a suggestion and does not need to be implemented in that PR or at all for that matter.

… ok I had completely forgotten about this PR, sorry about it! So I've rebased to latest master, removed all the miscellaneous package bumps that already made it in, and removed pyrsistent which is apparently no longer needed indeed. Given the feedback on the PR I'll land as is, and we can then iterate to eg. reduce the closure size, though I'd maybe lean more towards all-features-by-default unless someone gets motivated enough to add nixos-specific error messages to explain how to make things work again :)


add type='button' as default to shadcn button component

Problem solved
Short description of the bug fixed or feature added

PR-Codex overview
This PR updates the button.tsx component to include a type="button" attribute for improved accessibility.
Detailed summary

Added type="button" attribute to the button component for better accessibility.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

#4026  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MananTank and the rest of your teammates on  Graphite


Sample issue writing

Request type

[x] Please close this issue, I accidentally submitted it without adding any details

Details

Lap time Fifth place: Grotti X80 Proto — 1: 01.175Lap time Fifth place: Grotti X80 Proto — 1: 01.175


Any alternative solution for Auth::viaRemember()?

Hi, Writhing this to know if any alternative to detect user coming viaRememner. Package is best known to you. So just asked.

It'd be the same way as it would normally Auth::yourAuthType()->viaRemember().

Oh! Damn easy! Sorry I did not even try it. Thanks!
On Thu, Feb 26, 2015 at 11:49 PM, Ollie Read<EMAIL_ADDRESS>wrote:

It'd be the same way as it would normally
Auth::yourAuthType()->viaRemember().
—
Reply to this email directly or view it on GitHub
https://github.com/ollieread/multiauth/issues/84#issuecomment-76234080.

--
Thank You & Regards,
Rajan Y. Rawal
+91<PHONE_NUMBER>* |<EMAIL_ADDRESS>


Update doubt

I never changed the URL repo, and iam using sickrage on freenas. I have to change anything?

Yes, right. Thank you for your help


Uri with percent encoding

It seems that Images with percent encoded path is not decoded.
For example:
"images": [ { "uri": "Lunchroom%5Ctexturer%2FLight_button.jpg"} ]
As far as I can see, that is valid glTF as it is a json-schema uriref that refers to the RFC3986: https://tools.ietf.org/html/rfc3986#section-2.4

I see. Currently TinyGLTF does nothing for uri string.

As far as I can see, that is valid glTF as it is a json-schema uriref that refers to the RFC3986

There is a github issue at glTF repo:
https://github.com/KhronosGroup/glTF/issues/838
So, at least we need to parse percent encoding characters
https://tools.ietf.org/html/rfc3986#section-2.1

I searched for some decoder to use. Maybe this one: https://uriparser.github.io/

I have glimpsed uriparser and found its too big to embed it to tinygltf.
Instead, I have grabbed dlib's uriencode http://dlib.net/dlib/server/server_http.cpp.html (from this SO https://stackoverflow.com/questions/18307429/encode-decode-url-in-c ) to tinygltf and made uri-decode branch https://github.com/syoyo/tinygltf/tree/uri-decode .
@digimatic Please test  uri-decode branch.
At least percent-encoded character in URI should now be correctly handled when reading external files.
(URI string in Image, Buffer are still stored with original values(i.e. percent-encoded characters are not decoded))

Ok thanks, I will try it out.

We have merged this in our code base and so far it seems to work fine.

Thanks! Merged uri-decode into master. So now this issue should be ready to close.


Is this project abandoned?

It's part of the migration of a bunch of modules out of Salt core from 3008.0 onward, which is going a bit slow, but is not abandoned.
There's no dedicated maintainer for this project though (at the moment).
The intention is that people who depend on modules that are affected by this action should step up and maintain the community extension.

Closing this since @q1x has graciously volunteered to take over maintainership, thanks a lot! <3


CodeBoxOutput is not completed

Let's say python code as fllowing:
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score

data = pd.read_csv('/mnt/data/train_data.csv')

data['label'].value_counts().plot(kind='bar')
plt.show()

X = data.drop('label', axis=1)
y = data['label']

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

dt_model = DecisionTreeClassifier()
dt_model.fit(X_train, y_train)

y_pred = dt_model.predict(X_test)

print("accuracy: ", accuracy_score(y_test, y_pred))

This code snippet will generate 2 outputs: plt.show() and print(）. According to this code，codebox-api will return on first output (plt.show())，and it seems the remaining code will not be executed.
So how can I get codebox-api to return both outputs(image/png and text)?
#edit1 typo

good point currently it is checking for an image output and directly returning the image:
https://github.com/shroominic/codebox-api/blob/78d5ac65d007d501400f9868f9a75fda1cbcb5ac/src/codeboxapi/box/local.py#L168C1-L173C23
(code from current work in progress v0.2 but its the same issue)
I think we can maybe cache the image and not directly return all. But also the CodeBoxOutput needs to get improved then to allow text and image output at the same time.

 Agony


Sentry plugin (all middleware?) breaks cached responses

After adding the sentry plugin as middleware to my site, I started to experience very poor behavior:

When loading or reloading the page, there is a chance that the html response is given a status of 200 but no payload.  I would expect a 304 instead, if the browser should use its cached version.
Sometimes the html will load, but not the CSS.  It seems totally random.
When hard-refreshing pages, they load fine

For an example of this on a simple page, see; https://bb9fafc1.www-defined.pages.dev/.  Refresh several times and you will see different behaviors.
Removing the sentry plugin resolves the issue.  This is my plugin:
// functions/_middleware.ts

import sentryPlugin from "@cloudflare/pages-plugin-sentry";

export const onRequest: PagesFunction<{
  SENTRY_DSN: string;
  SENTRY_ENVIRONMENT: "production" | "deploy-preview";
}> = (context) => {
  return sentryPlugin({
    dsn: context.env.SENTRY_DSN,
    environment: context.env.SENTRY_ENVIRONMENT,
  })(context);
};

When watching the function log stream, refreshing the page will show a successful GET to /site.manifest sometimes, but not always.  If the page comes up blank, I don't see a log.
Other users in Discord have also reported similar issues when using Cloudflare Access middleware.  Is it possible that middleware in general is the cause of this?

I replicated this here: https://gitlab.com/ChristianSirolli/cf-pages, which is hosted at https://cf-pages-8zu.pages.dev/. It uses @cloudflare/pages-plugin-cloudflare-access, and only started this behavior after setting up this middleware.

I was told in Discord there should be a fix for this coming soon.  🤞

This should now be fixed! Let me know if the issue persists after upgrading to<EMAIL_ADDRESS>

Confirmed it's working, thanks!


Replace legacy Android SQL with SqlDelight

After discussing with @martinbonnin we've decided to create a new module apollo-sqlite-cache for the new persisted cache implementation.
Considerations

apollo-android-support now depends on the new module for backward compatibility purposes.
ApolloSqlHelper is kept 100% backward compatible and deprecated.
apollo-normalized-cache-api module is added for shared API between components.

Fixes #2116

Looks great! A few suggestions about naming, as always but it's a great step to multiplatform cache.
2 other comments:

I feel like CacheKeyResolver should belong in the apollo-normalized-cache-api module ?
How hard would it be to add a migration test ? Take a DB generated with the previous cache and run queries with the new code to make sure everything runs well?

All comments are addressed. I'm not sure about testing the old DB automatically. I manually tested it.
I had an already existing sample apps from master and upgraded with this and verified that it works. Also ran the tests on the devices with the old DB existing there.
I would write automated tests if we have a real SQLite migration on the table. To be honest, I don't really know how to do it now.

I wanted to demonstrate backward compatibility by keeping the samples as before. But the fact that I put level as Error in deprecation makes the sample fail to compile. Will fix that

Btw, SqlDelight also puts their migration verification task as a dependency to check task. That's really good.


Use v3 user tokens API

Codecov Report

Merging #2482 into canary will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           canary    #2482      +/-   ##
==========================================
- Coverage   10.77%   10.76%   -0.01%
==========================================
  Files         256      256
  Lines        9215     9211       -4
  Branches     1024     1023       -1
==========================================
- Hits          993      992       -1
+ Misses       8119     8116       -3
  Partials      103      103

Impacted Files
Coverage Δ

src/commands/logout.js
0% <0%> (ø)
:arrow_up:

src/util/dev/builder-cache.ts
68.75% <0%> (+1.5%)
:arrow_up:

Continue to review full report at Codecov.

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


[bug] Can't immediately access to the created window by WebviewWindow.getByLabel

Describe the bug
Can't immediately access to the created window by WebviewWindow.getByLabel in event listener (tauri://window-created).
Reproduction

Add a tauri://window-created event listener on the current application window:void listen('tauri://window-created', (event: Event<{label: string}>) => {
  const createdWindow = WebviewWindow.getByLabel(event.payload.label)
  console.log(createdWindow)
  if (createdWindow !== null) {
    onCreateWindow(createdWindow)
  }
})

Open DevTools Console in the current application window by Ctrl+Shift+I
Create new window (in my case by JS API)
DevTools Console in the current application window output null

Expected behavior

DevTools Console in the current application window output WebviewWindow object

Platform and versions
❯ yarn tauri info
Environment
› OS: Arch Linux Unknown X64
› Node.js: 18.8.0
› npm: 8.18.0
› pnpm: Not installed!
› yarn: 3.2.2
› rustup: 1.24.3
› rustc: 1.59.0
› cargo: 1.59.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu
Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: 1.0.2
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: Vue.js
App directory structure
├─ src
├─ src-tauri
├─ .vscode
├─ public
├─ node_modules
├─ dist
├─ settings
└─ about
Stack trace
No response
Additional context
Current workaround:
  void listen('tauri://window-created', (event: Event<{label: string}>) => {
    // Can't immediately access to the created window by `WebviewWindow.getByLabel`
    setTimeout(() => {
      const createdWindow = WebviewWindow.getByLabel(event.payload.label)
      if (createdWindow !== null) {
        onCreateWindow(createdWindow)
      }
    }, 100)
  })

that is expected because the state of the current window hasn't been updated yet, maybe we can provide a way to skip checking the state, like
WebviewWindow.getByLabelUnchecked(event.payload.label)

or
WebviewWindow.getByLabel(event.payload.label, { skip: true })


Update install instruction

Covert installation command to indent block so we can copy and paste the copy in Markdown.
Use the python -m pip installation method, see
https://snarky.ca/why-you-should-use-python-m-pip/

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face:


Update AboutUs and Picture

Codecov Report
Base: 72.15% // Head: 72.15% // No change to project coverage :thumbsup:

Coverage data is based on head (d0f8456) compared to base (3c679e4).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master       #8   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Polling::new failing on espidf (esp32c3) with PermissionDenied error

I'm not sure if something was different when this was added to polling, but trying with a simple project based on https://github.com/esp-rs/esp-idf-template on nightly Rust, the call to eventfd fails.
Looking at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/vfs.html#eventfd, it seems some additional code is needed to support eventfd. Which I see works with something like this:
unsafe {
    esp_idf_svc::sys::esp_vfs_eventfd_register(&esp_idf_svc::sys::esp_vfs_eventfd_config_t {
        max_fds: 1,
    })
};

Not sure what polling can do here. Other than documentation? Or maybe produce a more useful error.

The error returned by polling could be a lot more informative as to the cause of this error.

cc @ivmarkov

I guess the root cause is this call failing.
Any suggestions what to do there (I'm not very good at dealing with std::io::Error).
Not sure if possible to decorate it at all with a human readable message (something like "Did you initialize the VFS subsystem of ESP IDF and do you have enough event handles"?).

io::Error is a kind of weird API, but it's flexible enough. It would be sufficient to catch the PermissionDenied then call io::Error::new with the same ErrorKind (or a different one) and a string with a specific message. Or define a new error type to pass to io::Error::new here.

Maybe you can contribute a PR with that? :) (I'm completely underwater trying to fix, "example"-ify and release the new version of the esp-idf-* crates, so any help would be greatly appreciated.
Btw, this is coming in the new release, so you don't need to call into the unsafe esp-idf-sys APIs for the eventfd VFS initialization anymore.


Subscription issue

I'm following tutorial at howtographql.com, here's my subscription for newLink:
function newLinkSubscribe (parent, args, context, info) {
  return context.db.subscription.link(
    { where: { mutation_in: ['CREATED'] } },
    info,
  )
}

const newLink = {
  subscribe: newLinkSubscribe
}

module.exports = {
  newLink,
}

My subscription query is:
subscription RealTimeFeed {
    newLink {
      mutation
      node{
        url
      }
    }
  }

But when i post a mutation to create new link
mutation {
  post(
    url: "fdsfdsdsdf.graphqlweesfsdfkly.com"
    description: "Curated GraphQL content coming to your email inbox every Friday"
  ) {
    id
  }
}

, i got error :
{
  "error": {
    "name": "TypeError",
    "message": "Cannot read property 'link' of undefined"
  }
}

But if i go to database, schema, i got correct subscription:
{
  "data": {
    "link": {
      "mutation": "CREATED",
      "node": {
        "url": "fdsfdsdsdf.graphqlweesfsdfkly.com"
      }
    }
  }
}

This is killing me hardly. Any magic for subscription only work for database, but not on app ?.
My schema.graphql is:
# import Link, LinkSubscriptionPayload  from "./src/generated/prisma.graphql"

type Query {
  info: String!
  feed: [Link!]!

  # Fetch a single link by its `id`
  link(id: ID!): Link
  user: User
}

type Mutation {
  post(url: String!, description: String!): Link!
  signup(email: String!, password: String!, name: String!): AuthPayload
  signinUser(email: String!, password: String!): AuthPayload
}

type AuthPayload {
  token: String
  user: User
}

type User {
  id: ID!
  name: String!
  email: String!
  links: [Link!]!
}

type Subscription {
  newLink: LinkSubscriptionPayload
}

My package.json:
{
  "name": "hackernews-node",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "bcryptjs": "^2.4.3",
    "graphql-yoga": "^1.16.0",
    "jsonwebtoken": "^8.3.0",
    "prisma-binding": "^2.1.4"
  }
}

Had the same issue when upgrading prisma-binding to 2.1.4. I suspect a bug there. When I downgrade to<EMAIL_ADDRESS>the problem goes away.

@joefru I got same problem even with 2.1.3, weird.

Related: https://github.com/howtographql/howtographql/issues/758

Same for me, downgrading to 2.1.3 solved the issue

The error is in this line:
https://github.com/graphql-binding/graphql-binding/blob/master/src/Delegate.ts#L88
I changed from
const data = { [info.fieldName]: value.data[fieldName] }

to
const data = { [info.fieldName]: value[fieldName] }

and it solved the error, but this raises the question. Should the value pass to Delegate contain a field named data?
Because if the answer is yes, then the error is on the part of the code where we are not wrapping that object in ".data"

The issue still exists, leave it open until is fixed in the next version

@maury91 I reopened the issue for who's interested. There're some serious issues here and there.
Basically, the only way to make all these issues less hurt for developers to upgrade devs, is to rewrite the tutorial following TDD, make library for test so that we could write clean test before any coding.
It saves time as well as give more helpful debugging stories to fix them.

@schickling @timsuchanek this issue is blocking me from updating. Would love to see it fixed.

Same here, in fact it cost me about 8h yesterday while I was debugging using fragments with subscriptions (which then resulted in another bug raised). I agree with other devs that the continuous introductions of major bugs like non working subscriptions is something to worry about. Can we assist you in any way setting up better regression testing?

@maury91 I can confirm that making the changes suggested fixes the issue.

@ntziolis  @SilencerWeb  the main problem is that the issue is on another repository ( https://github.com/graphql-binding/graphql-binding ), and we don't know if consumers that are not prisma-binding are affected, by making that change we can potentially break another consumer, so is worth first investigating if that is the expected behaviour and is prisma-binding the one passing the wrong parameters to Delegate, or if it is the opposite and proceed with the fix.

I see, lmk if I can assist in any way. We need this current version of the bindings as its the first one to allow fragments in subscriptions. Have been waiting for that fix for a long time as it will significantly clean up our code based and reduce errors of devs by not keeping fragment in subscription in sync.

Same problem here. 2.1.3 my subs work but when moving to 2.1.4 they error out
(node:4867) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'section' of undefined     at Object.<anonymous> (/path/node_modules/graphql-binding/dist/Delegate.js:88:105)     at step (/path/node_modules/graphql-binding/dist/Delegate.js:32:23)     at Object.next (/path/node_modules/graphql-binding/dist/Delegate.js:13:53)     at fulfilled (/path/node_modules/graphql-binding/dist/Delegate.js:4:58)     at <anonymous>     at process._tickCallback (internal/process/next_tick.js:160:7) (node:4867) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwinginside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:4867) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Maury91 well found the issue of this problem:
https://github.com/prisma/prisma-binding/issues/229#issuecomment-413913264
world for me

This is fixed in 2.2.4 🎉

downgrading to 2.1.3 solved the issue


Cypress version bump

Also could we somehow resolve these warnings in the test run log?

I have it feeling it is here because one of the cypress config values is a boolean and it is not supported


Add options for how script cells are differentiated. "Change color or draw a highlight behind the currently active cell"

Environment data

VS Code version: 2019.4.11881

I think  python.dataScience.decorateCells is a very useful feature but I wish there could be more options for it such as changing its color, alpha, and thickness.
Maybe also the option to add some delay?

We added support for theming the script cell decorations with the following color token customizations:
    "workbench.colorCustomizations": {
        "interactive.activeCodeBorder": "#ff0000",
        "interactive.inactiveCodeBorder": "#ff0000"
    },


Remove sha256sum option not present in Debian

The option --ignore-missing is not present in the Debian version of sha256sum. So "sha256sum --ignore-missing --check SHA256SUMS.asc" does not work.

@lucayepa what version of Debian are you using?  It works for me on current stable:
$ cat /etc/issue
Debian GNU/Linux 9 \n \l

$ sha256sum --help | grep ignore-missing
      --ignore-missing  don't fail or report status for missing files

$ dpkg -S $( which sha256sum )
coreutils: /usr/bin/sha256sum

$ dpkg -l coreutils | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  coreutils      8.26-3       amd64        GNU core utilities

Debian Jessie:
$ cat /etc/debian_version
8.11
$ sha256sum --help | grep ignore-missing
$ dpkg -S $( which sha256sum )
coreutils: /usr/bin/sha256sum
$ dpkg -l coreutils | grep ii
ii  coreutils      8.23-4       amd64        GNU core utilities

@lucayepa Thanks for checking that.  Jessie is oldstable (initially released almost 4 years ago).  I'm a bit reluctant to change the current simple and clear command line to something more complex and abstruse to accommodate an older system that's probably primarily being used by advanced users anyway.  What do you think?

I think you are right. I wonder if it is only related to Debian oldstable, or if there are other distributions still around. Usually Debian is slower to use new software, so maybe it is the only one. I've tried to find a clearer way, but I haven't found anything better than a pipe and a grep.

@lucayepa if more examples pop up of people unable to run the command because their sha256sum doesn't support the --ignore-missing option, I'll certainly support changing the instructions.  I'd probably do it like the macOS instructions we currently provide where we simply tell people to parse the output for themselves looking for the "OK".  That's ugly in its own way, but it's simple.
Thanks anyway for reporting this issue and including a proposed fix for it!


unifi-poller: add service and prometheus-exporter

Motivation for this change

adds unifi-poller package and module closely resembling the unifi-poller config-structure
adds a tested prometheus-exporter module
can be used together with the old prometheus-exporter
should resolve #88846

also:

extends the prometheus-exporters tests to handle hyphenated exporter-names (by overriding the name of the testnode)

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[x] macOS (just the package)
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

oh well. didn't see #95994.
@bachp interested in merging our efforts?

@lheckemann thanks for the pointers. 🙂 i'll update the pr tomorrow.

thanks for all your help.
the modules now only allow password files and provide the default passwords via writeText. i chose not to use the option name passwordFile but rather keep pass to minimise juggling with the generated json data and keep the modules more maintainable. the provided descriptions and option types should make the usage clear enough.


feat: add caching connection fix

This is a very large refactor that includes #129  from @matthisholleville but also a rework of the Custom Resource.
In addition it also includes the connection fix

@AlexsJones  we can also include the CRD changes in the Helm chart

@AlexsJones we can also include the CRD changes in the Helm chart

done


Changing the training unit  based on s3dis

Hello,
thank you very much for your code. My sincere respect to you!
I want to replace the s3dis data set with my data set, and I want to use the sub folder under the Area_n folder as a training unit during training instead of every Area_n.How should I modify it? Hope to get your help!Thank you again!

If I understand correctly, you have a dataset with different areas, and in each areas you have different rooms. Instead of training on the whole space like S3DIS, you want to train on every single room individually (like Scannet dataset). Is that right?
If so, it is very simple, you consider each room to be an area, so just have a python script create a .ply file for each room and place it in the training folder:
https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/6c31df81565f16bdd73c91def47ce7194c401dad/datasets/S3DIS.py#L106-L107
You can do that directly in the dataset preparation script by modifying this function:
https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/6c31df81565f16bdd73c91def47ce7194c401dad/datasets/S3DIS.py#L620


No result or error when running sample drive script

Hi.
When running the following Quick Start script...
/**

Lists the names and IDs of up to 10 files.
*/
function listFiles() {
var files = Drive.Files.list({
fields: 'nextPageToken, items(id, title)',
maxResults: 10
}).items;
for (var i = 0; i < files.length; i++) {
var file = files[i];
Logger.log('%s (%s)', file.title, file.id);
}
}

...nothing happens. I've enabled the API and sorted out credentials, but when running this script it pops up along the top "Running function listFiles..." and then disappears.
This is all new to me. I was hoping to learn how to do other functions but I'm hesitant to go further if I can't get the stock script to run.
Any advice would be appreciated.

Hi @tc127,
I wasn't able to reproduce the issue.
Were you able to look at the output with View > Logs?
Do you have files in drive.google.com?
You can use Logger.log to debug your code as well as the online debugger.


Update editable_text.dart

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

The current revisions of this PR and #120377 propose the same one-item series of commits:

0c9270641c5ae224c5862b9f8f3bf68a674c3fac Update editable_text.dart

Closing since https://github.com/flutter/flutter/pull/120377 seems to be an exact duplicate.


Can't render multiple lines at once

Repo seems completely dead, so I'm not expecting much help here, but when there's more than one instance of the line renderer, only the newest one renders. I've looked through the code and I just can't tell what would make this happen, but it happens, so I don't know

change  "camera.gd"   , modify "_input(event)" , add points to   new mesh;


Ensure existing babel options are preserved when compiling - fixes #133

Fixes #133 to enable existing babel configuration to be passed along. Still needs validation and tests.

Is compileModules still even needed? Seems that this applies only to ember-cli pre 2.12. Right now we still technically support that but once we move to babel 7 that means we drop support for <2.13. @marten-dockyard?

I don't think this PR is needed. See https://github.com/DockYard/ember-service-worker/issues/133#issuecomment-436325884


only the filename as the component name?

I tried using defineOptions to define the name of the component, but it doesn't work.

Hi, not reproduce it, can you please provide a minimal example?


Make AEP keys case-insensitive

boo

Am I understanding the function properly that it's tied to a Discord role? If so, I don't think it'd be possible to make it case insensitive as Discord roles are case sensitive.

Am I understanding the function properly that it's tied to a Discord role? If so, I don't think it'd be possible to make it case insensitive as Discord roles are case sensitive.

no this isnt tied to discord role, this is the "Key" from the first line.
this pr requires one of the following:

adding like a keylc in the config and then lowercasing the key the user gives and comparing those two things
on user input iterating through all available keys and checking if the lower(key) == lower(user input)
writing a script to lowercase every single existing key in the config and then not actually knowing what the key was. for UX you could just spit back Key: Whatever the user gave as input instead of Key: Whatever you have saved (which is clearly lowercase and likely not what the user actually wants).  and be like ".......? what is GOING ON?" but I think they'd get the idea pretty quick that we're case insensitive. Although, probably spitting back the all-lowercase version is prob better than spitting back user-input.

All 3 of these obviously have their merits; (1) and (2) are more user-friendly than (3), (2) takes longer to run while (1) requires more storage. However with the amount of data present (1) and (2) are both negligible (I mean literally completely irrelevant) in this case. That said I do prefer cleaner code so while I don't care about the computational overhead I do slightly prefer to not have the code complexity overhead of (1) or (2).
So, if you can figure out how to write a script to implement (3) that would be the preference. To add sample data use ^aep add and then maybe copy-paste the config you generated to another fake server to make sure what you're running gets it right when there's multiple servers; the config file location is in. There's a python json library that you'll want to use.
That said, if you can't figure this out, feel free to do 1 or 2. I think 1 is probably a slightly nicer implementation, but 2 is probably the easiest, and having any implementation is better than none. For (1) I'm not actually sure if you would need to write a script to populate existing keys or if Red will auto-do this for you, you'll need to check this. Or ask Aradia.
Where to find the data for the cogs: For me it's at
C:\Users\River\AppData\Local\Red-DiscordBot\Red-DiscordBot\data\Namitest\cogs


Update from View.propTypes to ViewPropTypes to match RN v0.44.0

would be great to get this merged


DNS: include only Running resolve targets

So only reachable instance would appear as resolve targets in dns configuration

@ibuildthecloud

https://github.com/rancherio/rancher/issues/737

LGTM!


Include aws/cloudwatch in package.

Now that aws/cloudwatch are released include them in the package.
@VladVega @dmehra @demmer

Mike gave a verbal +1, so merging.


Ways to improve on the facial landmark detection model

Is clmtools used to fetch facial landmarks here. It uses dlib but dlib results in a lot better accuracy in detecting the landmarks. There are a few codes in python and c++ with dlib. clmtools uses dlib.
This was something I was trying to figure to convert it to javascript https://github.com/kripken/emscripten/ . Is there way to convert or get something like clmtools, dlib, to detect facial landmarks and convert the detecting part to javascript.

@akshay-hazari Did you find a solution for that please?

I would definitely be interested in improving clmtrackr. Does anyone know how I can use other libraries and tie in some of the key points for facial tracking to assist clmtrackr or takeover?

@lakano @msj121 I had been trying. Here are the issues I was facing then. https://github.com/kripken/emscripten/issues/5435 . First I had emscripten build opencv to js, then dlib to js . Then have them linked. But it got stuck at the same point. I guess you can give it a try and let me know as well.

Does anyone has converted dlib to js? I am looking for dlib library in js for facial landmark detection in real time video stream.


service account for direct archiving (prod)

requested from it support: ticket

Queue hca-archiving-broker-prod is ready. Its email is<EMAIL_ADDRESS>

For completenes, the dev mailbox is: hca-archiving-broker-dev


Process: define procedure for point releases

Is your enhancement proposal related to a problem? Please describe.
We currently have no process defined for when we do point releases (e.g. 3.0.x, not 3.y).
Describe the solution you'd like
Process with:

criteria for when a release is cut
release manager assignments

Additional context
reported by @dkalowsk regarding the possibility of a 3.0.1 release.

Process WG:

@carlescufi : to my knowledge, we do point releases based on the release manager proactively doing one, or someone asking for one
@jhedberg : I remember the same
@MaureenHelm : if there's a vulnerability fix, we do one
@dleach02 : @kestewart was asking recently if we should figure out some more predictability there
@mbolivar-nordic : AI to submit a note to the documentation reflecting the above

Process WG:

@nashif: there needs to be a cadence which is aligned with vulnerability disclosure embargo periods
@nashi: next week, PR to security and release docs
@mbolivar-nordic : will close my PR and let you take over then

Process WG:

@nashif : I discussed with Flavio; pending results from security WG meeting next week, we'll have something for this

@mbolivar-nordic thanks for the follow up on this question and the additional documentation.

Is there a Discord channel for the Process WG? I wouldn't mind joining the call at some point to sync up on the Point Release topic.
Is the call schedule listed here still valid?
https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings

Is there a Discord channel for the Process WG?

No, nothing dedicated. You could start a thread on general or tsc if you want.

Is the call schedule listed here still valid?

For process WG, yes.

@nashif - This needs to move to the Release WG.  But this is blocked on creating a label for the release WG.


AP: serve conneg on /ap/... actor URLs

For some reason, fediverse servers are using bridged Bluesky accounts' id as their "original page" link instead of url. Example: https://indieweb.social/<EMAIL_ADDRESS>, "Open original page" goes to https://bsky.brid.gy/ap/did:plc:3ljmtyyjqcjee2kpewgsifvb , which is the actor id and serves the actor AS2 JSON.
So, I guess we should serve conneg on activitypub.actor, which serves those /ap/... URLs. Sigh.
Oddly, this doesn't happen for bridged web accounts, either on their own domain like https://indieweb.social/<EMAIL_ADDRESS>, or not, like https://indieweb.social/<EMAIL_ADDRESS>. "Open original page" uses url for both of those, which is a fed.brid.gy/r/... link that (correctly) redirects to the sites themselves. Hrmph.

Oddly this is inconsistent. https://bsky.app/profile/ewancroft.uk bridged themselves recently, and https://indieweb.social/<EMAIL_ADDRESS>correctly uses to the /r/ link, not the id. 😕

Interestingly it's also inconsistent between servers for the same profile, e.g.
https://tomkahe.com/<EMAIL_ADDRESS>-> https://bsky.brid.gy/r/https://bsky.app/profile/snarfed.bsky.social
https://tomkahe.com/<EMAIL_ADDRESS>-> https://bsky.brid.gy/ap/did:plc:dzh2pohi5hgfrtf5r572zqqq
https://mastodon.social/<EMAIL_ADDRESS>https://bsky.brid.gy/r/https://bsky.app/profile/globetrotters.bsky.social

I think this was a historical artifact. All accounts and instances now are working ok, including https://indieweb.social/<EMAIL_ADDRESS>and https://tomkahe.com/<EMAIL_ADDRESS>. Tentatively closing for now.


[Bug] internlm2 emit content with [UNUSED_TOKEN_145] at times

Describe the bug
I am running quantized internlm2-chat-20b by llama.cpp with prompt template as in here. Chatting is going very quick well, however at times the model will produce [UNUSED_TOKEN_145].
When I change the stop word to "[UNUSED_TOKEN_145]" from <|im_end|>, every AI messages will be appended by  additionally.

BTW, the quantization is done by workaround with rope scaling disabled.
It looks like the model's configuration exists bug to behave as this.
Environment
Mac m2 ultra
pytorch-lightning 2.1.0
torch 2.1.2
torchaudio 2.1.0
torchmetrics 1.2.0
torchvision 0.16.0
Other information
No response

This may be caused by the tokenizer config not being the latest version. Make sure the added_tokens_decoder in your tokenizer_config.json is the same with https://huggingface.co/internlm/internlm2-chat-20b/blob/main/tokenizer_config.json#L15
Please also ensure that the special token id mapping of the tokenizer converted using llama.cpp is consistent with this
{
      "<|plugin|>": 92538,
      "<|interpreter|>": 92539,
      "<|action_end|>": 92540,
      "<|action_start|>": 92541,
      "<|im_end|>": 92542,
      "<|im_start|>": 92543
}

In addition, the ending word of <eoh> in the picture is weird. Because in the two versions of chat templates before and after the update, the <eoh> ending word has never been used. It should be either [UNUSED_TOKEN_145] or <|im_end|>. Is it possible that this <eoh> is set somewhere else, causing the model to predict it because of few-shot learning? This is just my guess.

What is your transformer version?


Add readyOnly and selectable prop for free-form input field

For these widgets, i want to be able to set readOnly and selectable:

TextInput
PasswordInput
Form

Acceptance criteria:

Default values are readOnly: false and selectable: true
When I only set readOnly: true, and do not set enabled or selectable props, user should be able to select the value and copy it. User should not be able to modify the value.
When I only set enabled: fase, widget should ignore the readOnly prop. The widget will not be clickable at all.
When I set readOnly at the parent Form widget, the value must cascade to children of the Form that are TextInputs and PasswordInputs.

PR - #1234

completed.


adding RDS properties, per Nov 9 2018 update https://docs.aws.amazon.…

This PR aims to update RDS following Nov 9 2018's cloudformation release

Thanks!


How to display circles of  the exactly specified radius independent of their latitude

I'm trying to display circles  with their radius independent of the latitude object size distortion.
For such a simple question, there must be a simple answer.
I've searched Stack Overflow and other sites, but there is no understandable answer in plain human English or a Math formula

Look into this plugin: https://github.com/nuclearsecrecy/Leaflet.greatCircle

I've searched Stack Overflow and other sites, but there is no understandable answer

I suggest that you ask a new question on SO in that case.

Hi, great to hear that you find Leaflet useful!
However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.
If you are really sure that this is a bug in leaflet, or a feature request, please change the wording to make it look like a bug report.


jpeginfo: init at 1.6.1

Motivation for this change
jpeginfo prints information and tests integrity of JPEG/JFIF files.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Applied to master (84a2463499d7e67350277e0f02cdb4412d0262cf).


Cannot select between a sequence of unicode flags

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.78.1
OS Version: macOS 13.3.1

Steps to Reproduce:

Put consecutive flags e.g. 🇩🇲🇩🇴 into the text editor
Try to select between the flags, or left/right arrow into the middle. It only goes to the start or the end.

If you try on a browser input field it works, you can select between the flags.
https://github.com/microsoft/vscode/assets/28838817/cfaa3551-09cd-46c2-8864-23d97f251ddf

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.79.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

It's a minor issue but I came across it reading https://xi-editor.io/docs/rope_science_03.html

Of the six types of compound emoji, flags have a special place in my heart. A flag is defined by two characters in a “Regional Identifier Symbol” space homomorphic to A-Z. For a long sequence of RIS codepoints, you expect to them to pair up; the boundaries are at the even-numbered offsets within the sequence. Since you can no longer tell from looking at a single pair whether there’s a boundary between them, UAX #29 [note added later: link is to the Unicode 8 version, which was current at the time this was written] gives up and says the whole thing is a single grapheme cluster. So, if you believe the spec, then pressing the arrow key at the beginning of a sequence of flags jumps over them all. (Fun fact, this was actually the source of a hang bug in the SMS app, because it assumed that the result of the Java Character iterator would fit inside one SMS fragment) [edit added later: the fix for this bug is now released in AOSP; also, the grapheme cluster rules have changed in the Unicode 9 version of UAX #29, so Android and Unicode are now in sync]
We’ve decided, as part of our emoji polish effort, that such behavior is not good enough, so our grapheme break detector scans backward through the text and counts by two. However, this is potentially the source of some O(n^2) behavior, so we limit it to some reasonable number; after that, they all glue into a single cluster.

Note that chrome's/safari's Intl.Segmenter splits the flags when segmenting graphemes.
[...new Intl.Segmenter().segment('Test 🇩🇲🇩🇴.')].map(s => s.segment)
// (8) ['T', 'e', 's', 't', ' ', '🇩🇲', '🇩🇴', '.']

Related: https://github.com/microsoft/vscode/issues/182422


how many steps that are required to train the model>

I've trained the model for more than 12 hours and it is still training. How many steps that machine needs to complete the process?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

Ubuntu 16.04
Tensorflow installed from Virtualenv
Tensorflow 1.7
Bazel 0.12
CUDA/cuDNN 9.0
GPU 1080 Ti
bazel-bin/$examples_dir/cifar10/cifar10_train --pruning_hparams=name=cifar10_pruning,begin_pruning_step=10000,end_pruning_step=100000,target_sparsity=0.9,sparsity_function_begin_step=10000,sparsity_function_end_step=100000

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there. Thanks!


[2201.9.x] Fix getting non-accessible symbol error for error intersections with details

Purpose

$title

Fixes #42806
PR for master: #42876
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[x] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

@dulajdilshan, please update this PR similar to the PR to master.

yeah yeah. Closed accidentally while resolving a merge conflict


issue26 LRAClient::set * CoordinatorURI is implementation specific

issue #26
Signed-off-by: xstefank<EMAIL_ADDRESS>This PR also changes the TCK to require already configured instance of LRAClient interface

LGTM - we should hook in the GitHub pull request reviewer to this job, who has access to Jenkins:
https://ci.eclipse.org/microprofile/job/LRA-maven-snapshots/
/cc @mmusgrov @Emily-Jiang


Missing spec.ingressClassName  in Ingress

Describe the bug
Ingress class provided by this chart only support set behavior by annotation.
So, to select ingress class, need specify an annotation kubernetes.io/ingress.class
But Kubernetes has deprecated this annotation
cf. https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#deprecating-the-ingress-class-annotation
This annotation is replaced by spec ingressClassName
cf . https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
Expected behavior

Add spec.ingressClassName in template ingress.yaml
Add a variable ingress.class in values.yaml to set this new spec

Hey @cedvan,
it`s fixes with the new chart version 3.1.3.

Hi,
Thank you, work like a charm :smile:


Theano not correctly linking

Good evening,
I just created my conda environment (conda env create) and tried to run the setup notebook. However, with the import block, I got the folllowing error:
You can find the C code in this temporary file: /var/folders/vw/79q68n5j4lgcp0_8rd49sb99ghx6ws/T/theano_compilation_error_kq0f0qy2
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/gof/lazylinker_c.py in <module>
     80                     version,
---> 81                     actual_version, force_compile, _need_reload))
     82 except ImportError:

ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/gof/lazylinker_c.py in <module>
    104                         version,
--> 105                         actual_version, force_compile, _need_reload))
    106         except ImportError:

ImportError: Version check of the existing lazylinker compiled file. Looking for version 0.211, but found None. Extra debug information: force_compile=False, _need_reload=True

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
<ipython-input-1-1278fa2caec5> in <module>
      5 from matplotlib import pyplot as plt
      6 import pandas as pd
----> 7 import pymc3 as pm
      8 import sklearn as sk
      9 import seaborn as sns

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/pymc3/__init__.py in <module>
     36
     37
---> 38 __set_compiler_flags()
     39
     40 from .blocking import *

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/pymc3/__init__.py in __set_compiler_flags()
     31 def __set_compiler_flags():
     32     # Workarounds for Theano compiler problems on various platforms
---> 33     import theano
     34     current = theano.config.gcc.cxxflags
     35     theano.config.gcc.cxxflags = f"{current} -Wno-c++11-narrowing"

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/__init__.py in <module>
    108     object2, utils)
    109
--> 110 from theano.compile import (
    111     SymbolicInput, In,
    112     SymbolicOutput, Out,

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/compile/__init__.py in <module>
     10 from theano.compile.function_module import *
     11
---> 12 from theano.compile.mode import *
     13
     14 from theano.compile.io import *

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/compile/mode.py in <module>
      9 import theano
     10 from theano import gof
---> 11 import theano.gof.vm
     12 from theano import config
     13 from six import string_types

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/gof/vm.py in <module>
    672     if not theano.config.cxx:
    673         raise theano.gof.cmodule.MissingGXX('lazylinker will not be imported if theano.config.cxx is not set.')
--> 674     from . import lazylinker_c
    675
    676     class CVM(lazylinker_c.CLazyLinker, VM):

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/gof/lazylinker_c.py in <module>
    138             args = cmodule.GCC_compiler.compile_args()
    139             cmodule.GCC_compiler.compile_str(dirname, code, location=loc,
--> 140                                              preargs=args)
    141             # Save version into the __init__.py file.
    142             init_py = os.path.join(loc, '__init__.py')

~/anaconda3/envs/bayes_course/lib/python3.7/site-packages/theano/gof/cmodule.py in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, py_module, hide_symbols)
   2409             # difficult to read.
   2410             raise Exception('Compilation failed (return status=%s): %s' %
-> 2411                             (status, compile_stderr.replace('\n', '. ')))
   2412         elif config.cmodule.compilation_warning and compile_stderr:
   2413             # Print errors just below the command line.

Exception: Compilation failed (return status=1): ld: unknown option: -platform_version. clang-10: error: linker command failed with exit code 1 (use -v to see invocation).

Any advice on how to proceed? I'm running conda version 4.8.3

Are you on macOS or Linux?

MacOS 10.14.6

OK, I cannot replicate this problem on my Linux machine. Will get ahold of a Macbook tomorrow and try.

Really appreciate you taking a look at this!

In the meantime, you might try this environment.yml, which just uses pip to install PyMC and Theano instead of Conda. Could just be a conda package issue.
name: bayes_course

channels:
  - conda-forge
dependencies:
  - python=3.7
  - arviz
  - cython
  - ipython
  - ipywidgets
  - jupyter_client
  - jupyter_core
  - jupyterlab
  - lxml
  - matplotlib
  - mkl-service
  - notebook
  - numpy
  - pandas
  - patsy
  - pip
  - pydot
  - python-graphviz
  - scikit-learn
  - scipy
  - seaborn
  - setuptools
  - xlrd
  - pip:
    - theano
    - pymc3

I needed to pip install torch and gpytorch after replacing the file with what you provided, but after that it worked!

Ah good. It looked like an Xcode-related problem, so I'm not surprised it worked. I will replace the environment file with this one then.


Paramount+/CBS URL Changes

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[X] At least skimmed through contributing guidelines including yt-dlp coding conventions
[X] Searched the bugtracker for similar pull requests
[X] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[X] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[X] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Paramount and CBS got rid of the show, movie, and episode names from their URLs. So this should take care of the new format and the old as that seems to still work as well.

Closes #3096


Pin specific columns

Hi,
Is there a way to pin a specific column, for example the last one?

Hey 👋
Not really, as for now, LazyTable could be configured only to pin columns from left and rows from top.
But you could use MinaBox which is used by LazyTable underneath to achieve this behavior.
The are few tricks to get it right though:

To get X coordinate you have to know the available width and subtract pinned column width. The BoxWithConstraints component could be handy in this case.
The pinned column does not contribute to the full canvas width, thus when you scroll all the way to the right, the last non-pinned column will be covered by the pinned column. To overcome this, I would recommend to register 1 scrollable column on the end of the table with a width of pinned column.

You could take this code as an inspiration:
BoxWithConstraints {
    val totalWidth = constraints.maxWidth
    val itemSizePx = with(LocalDensity.current) { ItemSize.toSize() }
    MinaBox {
        items(
            count = ColumnsCount * RowsCount,
            layoutInfo = {
                val column = it % ColumnsCount
                val row = it / ColumnsCount
                MinaBoxItem(
                    x = itemSizePx.width * column,
                    y = itemSizePx.height * row,
                    width = itemSizePx.width,
                    height = itemSizePx.height,
                )
            }
        ) { index ->
            Text(
                text = "Index #$index",
                modifier = Modifier
                    .border(1.dp, MaterialTheme.colorScheme.primary)
                    .padding(8.dp)
            )
        }

        items(
            count = RowsCount,
            layoutInfo = {
                MinaBoxItem(
                    x = totalWidth - itemSizePx.width,
                    y = itemSizePx.height * it,
                    width = itemSizePx.width,
                    height = itemSizePx.height,
                    lockHorizontally = true,
                )
            }
        ) { index ->
            Text(
                text = "Pinned #$index",
                modifier = Modifier
                    .background(MaterialTheme.colorScheme.primary)
                    .padding(8.dp)
            )
        }

        // Dummy item to add "below" the last row, so that full table is visible
        items(
            count = 1,
            layoutInfo = {
                MinaBoxItem(
                    x = itemSizePx.width * ColumnsCount,
                    y = 0f,
                    width = itemSizePx.width,
                    height = itemSizePx.height * RowsCount,
                )
            },
            itemContent = { /* Empty */ }
        )
    }
}

https://github.com/oleksandrbalan/lazytable/assets/20944869/581101f9-380a-47ae-a241-8a335d77b379


spec: allow record {} <: record {null}

In the current spec, we only allow record {} <: record {opt t; reserved}, i.e. users can omit opt fields or reserved fields in the argument, but cannot omit null fields.
In the Rust implementation, however, we accidentally allowed null fields to be optional as well. And this bug has become a feature that people start to use it in the wild...The most prominent use is to decode an empty blob DIDL\0\0 into a null value, which corresponds to () in Rust.
This PR tries to make that bug into a feature to allow optional null fields in the record.
Another option is to make () in Rust map to empty message in Candid, and have a dedicated candid::Null type in Rust. But that's also a breaking change.

cc @rossberg

I'm not opposed - might even be more consistent with subtyping since nulls are options too, but curious what @nomeata and @rossberg think.
Would need a new version of Candid I think. And updating of Motoko unless it has the same behaviour already.

I vaguely remember that we discussed this before, and I believe I was in favor. Maybe someone finds the conversation.

I vaguely remember that we discussed this before, and I believe I was in favor. Maybe someone finds the conversation.

I couldn't find it on my mobile. So didn't look that hard


using app = Flask(name)

When using app = Flask(__name__) (as stated in doc), your management script won't work dying on cryptic import like:
(tvocr) starenka /work/tvocr master at a7d02b8? % manage.py rq worker default
Traceback (most recent call last):
  File "/data/.envs/tvocr/bin/manage.py", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/work/tvocr/tvocr/api/manage.py", line 13, in <module>
    manager.run()
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_rq2/script.py", line 42, in __call__
    return self.run(*args, **kwargs)
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/flask_rq2/script.py", line 180, in run
    queues=queues or self.rq.queues,
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/rq/cli/cli.py", line 175, in worker
    worker_class = import_attribute(worker_class)
  File "/data/.envs/tvocr/local/lib/python2.7/site-packages/rq/utils.py", line 150, in import_attribute
    module = importlib.import_module(module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named backend_tvocr.api.app

using app = Flask('somename') would work fine.
Not sure if I missunderstand flask or rq2 or both, but bare with me and maybe fix the docs (or the code) ;)

Heeey, so I dropped support for flask-script because I wasn't able to maintain both systems, Flask's official CLI support as well as the legacy flask-script system. The refactor that drops it landed in #41.

Ok. Thanks for looking into it.