ASR Inference

Hello!
I'm facing this error when performing ASR inference with local model. I followed this proposed solution but i guess that my ****.model is not recognized.
Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/pretrained/interfaces.py", line 360, in from_hparams     pretrainer.load_collected(device="cpu")   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/utils/parameter_transfer.py", line 203, in load_collected     self._call_load_hooks(paramfiles, device)   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/utils/parameter_transfer.py", line 230, in _call_load_hooks     raise RuntimeError(MSG) RuntimeError: Don't know how to load <class 'str'>. Register default hook                     or add custom hook for this object.

The error says your model is just a string. My guess: you need to add !ref < > around your model in YAML. Basically, the Pretrainer does not get a reference to your model instance, it's getting a string instead.

Thank you for your response. I fixed the problem. It was indeed because of !ref. However, I am facing another error:
Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/pretrained/interfaces.py", line 525, in transcribe_file     predicted_words, predicted_tokens = self.transcribe_batch(   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/pretrained/interfaces.py", line 590, in transcribe_batch     predicted_words = [   File "/home/n.abdoumohamed/DVoice/speechbrain/speechbrain/pretrained/interfaces.py", line 591, in <listcomp>     self.tokenizer.decode_ids(token_seq) AttributeError: 'str' object has no attribute 'decode_ids'
I think it is due to maybe a bad configuration of the decoder. Here is my yaml file. I can't see what I might have missed...
# ############################################################################
# Model: E2E ASR with attention-based ASR
# Encoder: CRDNN model
# Decoder: GRU + beamsearch + RNNLM
# Tokens: BPE with unigram
# Authors:  Ju-Chieh Chou, Mirco Ravanelli, Abdel Heba, Peter Plantinga 2020
# ############################################################################

# Feature parameters
sample_rate: 16000
n_fft: 400
n_mels: 40

# Model parameters
activation: !name:torch.nn.LeakyReLU
dropout: 0.15
cnn_blocks: 2
cnn_channels: (128, 256)
inter_layer_pooling_size: (2, 2)
cnn_kernelsize: (3, 3)
time_pooling_size: 4
rnn_class: !name:speechbrain.nnet.RNN.LSTM
rnn_layers: 4
rnn_neurons: 1024
rnn_bidirectional: True
dnn_blocks: 2
dnn_neurons: 512
emb_size: 128
dec_neurons: 1024
output_neurons: 68  # index(blank/eos/bos) = 0
blank_index: 0

# Decoding parameters
bos_index: 0
eos_index: 0
min_decode_ratio: 0.0
max_decode_ratio: 1.0
beam_size: 80
eos_threshold: 1.5
using_max_attn_shift: True
max_attn_shift: 240
lm_weight: 0.50
coverage_penalty: 1.5
temperature: 1.25
temperature_lm: 1.25

normalize: !new:speechbrain.processing.features.InputNormalization
    norm_type: global

compute_features: !new:speechbrain.lobes.features.Fbank
    sample_rate: !ref <sample_rate>
    n_fft: !ref <n_fft>
    n_mels: !ref <n_mels>

enc: !new:speechbrain.lobes.models.CRDNN.CRDNN
    input_shape: [null, null, !ref <n_mels>]
    activation: !ref <activation>
    dropout: !ref <dropout>
    cnn_blocks: !ref <cnn_blocks>
    cnn_channels: !ref <cnn_channels>
    cnn_kernelsize: !ref <cnn_kernelsize>
    inter_layer_pooling_size: !ref <inter_layer_pooling_size>
    time_pooling: True
    using_2d_pooling: False
    time_pooling_size: !ref <time_pooling_size>
    rnn_class: !ref <rnn_class>
    rnn_layers: !ref <rnn_layers>
    rnn_neurons: !ref <rnn_neurons>
    rnn_bidirectional: !ref <rnn_bidirectional>
    rnn_re_init: True
    dnn_blocks: !ref <dnn_blocks>
    dnn_neurons: !ref <dnn_neurons>

emb: !new:speechbrain.nnet.embedding.Embedding
    num_embeddings: !ref <output_neurons>
    embedding_dim: !ref <emb_size>

dec: !new:speechbrain.nnet.RNN.AttentionalRNNDecoder
    enc_dim: !ref <dnn_neurons>
    input_size: !ref <emb_size>
    rnn_type: gru
    attn_type: location
    hidden_size: !ref <dec_neurons>
    attn_dim: 1024
    num_layers: 1
    scaling: 1.0
    channels: 10
    kernel_size: 100
    re_init: True
    dropout: !ref <dropout>

ctc_lin: !new:speechbrain.nnet.linear.Linear
    input_size: !ref <dnn_neurons>
    n_neurons: !ref <output_neurons>

seq_lin: !new:speechbrain.nnet.linear.Linear
    input_size: !ref <dec_neurons>
    n_neurons: !ref <output_neurons>

log_softmax: !new:speechbrain.nnet.activations.Softmax
    apply_log: True

lm_model: !new:speechbrain.lobes.models.RNNLM.RNNLM
    output_neurons: !ref <output_neurons>
    embedding_dim: !ref <emb_size>
    activation: !name:torch.nn.LeakyReLU
    dropout: 0.0
    rnn_layers: 2
    rnn_neurons: 2048
    dnn_blocks: 1
    dnn_neurons: 512
    return_hidden: True  # For inference

#tokenizer: !new:sentencepiece.SentencePieceProcessor

tokenizer: /home/n.abdoumohamed/DVoice/jobs/results/wav2vec2_ctc_dar/1234/save/68_char.vocab

#tokenizer: !ref <tokenizer_model>

#asr_model: !new:torch.nn.ModuleList
#    - [!ref <enc>, !ref <emb>, !ref <dec>, !ref <ctc_lin>, !ref <seq_lin>]
asr_model: /home/n.abdoumohamed/DVoice/jobs/results/wav2vec2_ctc_dar/1234/save/ckpt2/asr.ckpt
# We compose the inference (encoder) pipeline.
encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential
    input_shape: [null, null, !ref <n_mels>]
    compute_features: !ref <compute_features>
    normalize: !ref <normalize>
    model: !ref <enc>

decoder: !new:speechbrain.decoders.S2SRNNBeamSearchLM
    embedding: !ref <emb>
    decoder: !ref <dec>
    linear: !ref <seq_lin>
    language_model: !ref <lm_model>
    bos_index: !ref <bos_index>
    eos_index: !ref <eos_index>
    min_decode_ratio: !ref <min_decode_ratio>
    max_decode_ratio: !ref <max_decode_ratio>
    beam_size: !ref <beam_size>
    eos_threshold: !ref <eos_threshold>
    using_max_attn_shift: !ref <using_max_attn_shift>
    max_attn_shift: !ref <max_attn_shift>
    coverage_penalty: !ref <coverage_penalty>
    lm_weight: !ref <lm_weight>
    temperature: !ref <temperature>
    temperature_lm: !ref <temperature_lm>

modules:
    encoder: !ref <encoder>
    decoder: !ref <decoder>
    #lm_model: !ref <lm_model>

pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
    paths:
        asr: !ref <asr_model>
        lm: !ref <lm_model>
        tokenizer: !ref <tokenizer>

Hi your tokenizer is not set properly. In your yaml, tokenizer is a path while it should be a sentence piece object (see what you commented)

``Thank you @TParcollet. It work now...

I renamed the tokenizer model, 68_char.vocab -> tokenizer.ckpt (I hope it's not a mistake to do this)
I putted the file in the pretrained_model folder
Then I uncommented tokenizer: !new:sentencepiece.SentencePieceProcessor as you suggested.

Now I can transcribe the audio files, however the transcriptions seem wrong. Here are some examples :

asr_model.transcribe_file('/home/n.abdoumohamed/DVoice/inference/sample2.wav')
'ررررررررر'
asr_model.transcribe_file('/home/n.abdoumohamed/DVoice/inference/sample.wav')
'أ9ءء-،،،،9شءءء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء-،،،99ء'

The model is a Wav2vec2 CTC trained on Moroccan Arabic Dialect. The test WER is 10,82 and in
wer_test.txt, the predictions are pretty good. I'm still trying to review the parameters in the yaml file in order to understand why I'm getting these bad transcriptions. And of course, your suggestions are welcome.
Thank you guys for your help!

Hi, is it solved now? Sorry for not answering before.

Hi.
No, I'm still getting these kind of outputs : ثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثثث
I pushed the model on HuggingFace to see if the problem was related to the local inference, but I have the same problem. I also made some investigations (cross validation, data process,...) and I'm still getting these results. If you have some tips and proposal I'm a taker...

Hello @TParcollet! Just to let you know that it worked now. I'm gonna update my PR this week. Thank you for this amazing tool!


Roll engine 32f417db0d56..08272ee6aa33 (2 commits)

https://github.com/flutter/engine/compare/32f417db0d56...08272ee6aa33
git log 32f417db0d56..08272ee6aa33 --no-merges --oneline
08272ee6a Allow specifying custom toolchains and sysroots for host builds. (flutter/engine#6548)
c6456570a Roll src/third_party/skia c6a17104ad68..921ec976556c (31 commits) (flutter/engine#6546)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

@liyuqian : New roll has been created by https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Auto-roller completed checks. About to merge.


Prisma has no exported member named OrderByWithRelationInput. Did you mean OrderByWithAggregationInput?

Bug description
When previewFeatures = ["fullTextSearch"] is enabled, all of my previously working Prisma.ModelnameOrderByWithRelationInput types became unusable.
I guess this is the intended working considering that full-text search & indexing change how the orderBy works, but it looks like this is undocumented.
How to reproduce

add previewFeatures = ["fullTextSearch", "fullTextIndex"] to a mySQL schema
try using Prisma.ModelnameOrderByWithRelationInput type

Expected behavior
No response
Prisma information

datasource db {
  provider     = "mysql"
  url          = env("DATABASE_URL")
  relationMode = "prisma"
}

generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "linux-musl"]
}

protected buildOrderBy(sortParams: QuerySortDTO | undefined): Prisma.AlbumOrderByWithRelationInput {
    if (!sortParams) {
      return {};
    }

    switch (sortParams.fieldName || '') {
      case 'name':
        return { name: sortParams.direction };
      default:
        return {};
    }
  }

Environment & setup

OS: macOS
Database: MySQL
Node.js version: v18.16.0

Prisma Version
5.2.0

I also have this issue when i just try to enable fullTextSearch

Is this a new problem in a recent Prisma version or a general problem?

Not sure since I've never tried this preview feature before

Just ran into this issue as well. Adding the previewFeatures = ["fullTextSearch"] changes the generated type from ModelOrderByWithRelationInput to ModelOrderByWithRelationAndSearchRelevanceInput. This breaks any references to that type when that preview feature is changed.

Hey folks,
While I understand the frustration, we have no choice but to include this breaking change.
The reason is that we do not include _relevance in all orderBy types, such as in operations like aggregate or groupBy.
As such, we have to differentiate both types by breaking one of the two variants. A PR is on the way to update the docs and make that explicit https://github.com/prisma/docs/pull/6102.
For now though, I'll close this issue. Thanks 🙏

I don't get it. Will we not fix the type errors?

Can you elaborate @SupertigerDev?
As far as I understood Flavian (who is now in his well-deserved evening), we thought the problem only was that users now would have to import and use a slightly differently named type. Breaking change for sure, but harmless - and will only be rolled out as default with a future major version. We have preview features so we can test such changes before any major version.
Is the problem different?

Oh never mind. Initially, When I tried to enable fullTextSearch preview feature, I used to get errors, even if made no other change. but it seems like those error doesn't happen anymore for me.
https://github.com/prisma/prisma/issues/21017#issuecomment-1712827147

Hey @thedevdavid,
After careful re-inspection of your issue, we have found that when fullTextSearch is enabled, OrderByWithRelationInput is, as suggested by myself above, renamed to OrderByWithRelationAndSearchRelevanceInput, but OrderByWithRelationInput is gone entirely.
That means we don't need OrderByWithRelationAndSearchRelevanceInput at all.
To avoid unnecessary breaking changes when we later release fullTextSearch as GA, we have decided to remove the OrderByWithRelationAndSearchRelevanceInput entirely and added the _relevance field back to the OrderByWithRelationInput type.
This is a breaking change for the fullTextSearch preview feature and it should be release tomorrow as part of the new version.
Apologies for the confusion & inconvenience of that breaking change, and thanks for reporting that issue 🙏

Hey @thedevdavid,
After careful re-inspection of your issue, we have found that when fullTextSearch is enabled, OrderByWithRelationInput is, as suggested by myself above, renamed to OrderByWithRelationAndSearchRelevanceInput, but OrderByWithRelationInput is gone entirely.
That means we don't need OrderByWithRelationAndSearchRelevanceInput at all.
To avoid unnecessary breaking changes when we later release fullTextSearch as GA, we have decided to remove the OrderByWithRelationAndSearchRelevanceInput entirely and added the _relevance field back to the OrderByWithRelationInput type.
This is a breaking change for the fullTextSearch preview feature and it should be release tomorrow as part of the new version.
Apologies for the confusion & inconvenience of that breaking change, and thanks for reporting that issue 🙏

Im on prisma version 5.21.1 running my postgres db on cockroach and I get an error on _relevance. It does not seem to be included in the types.
I get this error:
`orderBy: {
_relevance: {
~~~~~~~~~~
fields: [
"name",
"description",
"workType",
"type",
"payOption",
"businessName"
],
search: "",
sort: "desc"
},
?   id?: SortOrder,
?   postDate?: SortOrder,
?   businessName?: SortOrder,
?   type?: SortOrder,
?   workType?: SortOrder,
?   email?: SortOrder,
?   name?: SortOrder,
?   expirationDate?: SortOrder | SortOrderInput,
?   logo?: SortOrder,
?   applicationLink?: SortOrder,
?   companyWebsite?: SortOrder,
?   directApply?: SortOrder,
?   description?: SortOrder,
?   payRate?: SortOrder,
?   payOption?: SortOrder,
?   spokenLanguages?: SortOrder,
?   qualifications?: SortOrder,
?   education?: SortOrder,
?   benefits?: SortOrder,
?   requirements?: SortOrder,
?   slug?: SortOrder,
?   addressId?: SortOrder | SortOrderInput,
?   editors?: SortOrder,
?   updatedAt?: SortOrder,
?   published?: SortOrder,
?   publishedDate?: SortOrder | SortOrderInput,
?   template?: SortOrder,
?   authorId?: SortOrder,
?   jobManifesto?: SortOrder | SortOrderInput,
?   theme?: SortOrder | SortOrderInput,
?   subUserId?: SortOrder | SortOrderInput,
?   googleId?: SortOrder | SortOrderInput,
?   archive?: SortOrder,
?   eeoQuestions?: SortOrder | SortOrderInput,
?   applicants?: ApplicationOrderByRelationAggregateInput,
?   address?: AddressOrderByWithRelationInput,
?   author?: UserOrderByWithRelationInput,
?   messages?: MessageOrderByRelationAggregateInput,
?   tags?: TagOrderByRelationAggregateInput
}
}
Unknown argument _relevance. Available options are marked with ?.`
this is my prisma call:
` await prisma.jobPost.findMany({
take: takeAmount,
where: {
published: true,
OR: [
{
address: {
city: {
contains: location
}
}
},
{
address: {
state: {
contains: location
}
}
},
{
address: {
country: {
contains: location
}
}
}
]
},
// include: {
	// },
	orderBy: {
		_relevance: {
			fields: [
				'name',
				'description',
				'workType',
				'type',
				'payOption',
				'businessName'
				// 'locationName',
				// 'addressProvState',
				// 'addressCity',
				// 'addressCountry'
			],
			search: s,
			sort: 'desc'
		}
		// postDate: 'desc'
	}
});`


Improve anonymous only (all authentication disabled) experience

Enable the anonymous checkbox so we can choose to enter a name,
even when only anonymous is enabled
Disable voting when only anonymous is enabled, since we can't
vote anyway
Hide the scores when only anonymous is enabled, since no one can
vote anyway

PS. This would also close issue #35

Great stuff and looks good to me, merging :)


Add home route

Like we have for elixir-boilerplate, we now have a home route and template to ensure that booting the project provides a working 200 OK URL.

🦀 Requesting reviewers for this pull request:

@charlesdemers (contributor with 7 commits in the last 90 days and 82 commits overall)


String#sub(Hash(Char, _)) with str length 1 adds a NUL

"C".sub({'C' => 'G'}) # => "G\u0000"
"C".sub({'C' => "G"}) # => "G\u0000"

https://carc.in/#/r/8b3o

Not sure why this happens. But the implementation of String#sub(Hash) looks weird. Why is there a if read.has_next? which shouldn't be reachable?

The problem is if there's a match in the last char. The string size doesn't matter. For example:
"helloC".sub({'C' => 'G'}) # => "helloG\u0000"

I've uploaded a pull request with the fix, I hope


Fix result ordering

Which Issue(s) this Pull Request Resolves

Resolves #586
Release Note

Now KubeArchive returns resources by creationTimestamp in descending order (new first)

Notes for Reviewers

The query gets a little slower in the big dataset because the DESC makes the filter remove more rows.
Bumped CloudNative PG to 1.24.1 to PostgreSQL so it defaults to PostgreSQL v17.
BIGSERIAL is not a true type, so its not reflected directly here. It is translated to a BIGINT and a series of sequence statements that make the thing autoincrement on insert.
To test download and load 500.txt into the database, then run:

500.txt
curl -s --cacert ca.crt -H "Authorization: Bearer $(kubectl create token default)" "https://localhost:8081/api/v1/pods?limit=100" | jq -r '.items[] | [.metadata.creationTimestamp, .metadata.uid] | @tsv' > 100-pods.txt
export CONTINUE_TOKEN=$(curl -s --cacert ca.crt -H "Authorization: Bearer $(kubectl create token default)" "https://localhost:8081/api/v1/pods?limit=100" | jq -r '.metadata.continue')
curl -s --cacert ca.crt -H "Authorization: Bearer $(kubectl create token default)" "https://localhost:8081/api/v1/pods?limit=100&continue=${CONTINUE_TOKEN}" | jq -r '.items[] | [.metadata.creationTimestamp, .metadata.uid] | @tsv' > 100-continue-pods.txt
curl -s --cacert ca.crt -H "Authorization: Bearer $(kubectl create token default)" "https://localhost:8081/api/v1/pods?limit=200" | jq -r '.items[] | [.metadata.creationTimestamp, .metadata.uid] | @tsv' > 200-pods.txt

# Should equal 202 (all entries are different + 2 lines introduced by diff)
diff 100-pods.txt 100-continue-pods.txt | wc -l

# Should equal 0 (no difference)
cat 100-pods.txt 100-continue-pods.txt | diff - 200-pods.txt | wc -l

I thought we talked about adding a BIGSERIAL primary key and using that. Or is that a different issue?

BIGSERIAL is not a true type, its a BIGINT + some sequence stuff: https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL
I created the table with BIGSERIAL PRIMARY KEY, but the dump does not return that but the true types and stuff underneath.

I thought we talked about adding a BIGSERIAL primary key and using that. Or is that a different issue?

BIGSERIAL is not a true type, its a BIGINT + some sequence stuff: https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL
I created the table with BIGSERIAL PRIMARY KEY, but the dump does not return that but the true types and stuff underneath.

But that still doesn't answer my question: are you doing that in this issue or was it another issue?

But that still doesn't answer my question: are you doing that in this issue or was it another issue?

Its this issue, you can see how I'm adding a BIGINT and sequence stuff. I thought you asked because you saw a BIGINT instead of a BIGSERIAL

But that still doesn't answer my question: are you doing that in this issue or was it another issue?

Its this issue, you can see how I'm adding a BIGINT and sequence stuff. I thought you asked because you saw a BIGINT instead of a BIGSERIAL. I should stop answering non-asked questions, sorry.

No, I just missed that change completely. Thanks.

@ggallen if you reviewed the changes and you agree with them, approve them.


When will GW2Radial be out of Alpha?

Hi, just wondering if GW2Radial is close to being released from alpha as the addon manage is still using the older version and won't update until gw2radial is marked as the latest release.

I was hoping to find this out as well.
Did @Friendly0Fire go missing? Is this addon still in active development or is there a fork somewhere that is the updated one?

i just noticed that there was a commit by @Friendly0Fire a few days ago. Looks like its still being developed.
Would definitely like an update on this though. Especially with end of dragons coming very soon.

Soon™.


Set g₂₁, g₂₂ correctly in advection example

In the current code it would be that
  g₂₁, g₂₂

were really set to
  g₁₃, g₂₁

respectively

Closing for now.  Please reopen if you think this is still an issue.


Add object context parameter

Add object context paramter to the function calls for the complex interractions.
Consider this as a feature request, feel free to edit the code. Since object could be easily availiable for the tranformation I think it has a good usage.
Added new test as well, it should explain more.

Coverage increased (+0.07%) to 98.907% when pulling c678a7d9385d22e7ee5b06d1e4a3507c8abb6372 on CurlyBraceTT:master into 7337825a1fa173057ff2af7b5c130fd6f24b842e on emyann:master.

Thank you for your contribution @CurlyBraceTT ! 🙏🏽 Indeed, I can easily see the use case with your Unit Test 💪🏽 . I will merge this PR by the end of the week ✌🏽

:tada: This PR is included in version 0.7.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@emyann You are welcome! Slowly I am trying to build some game prototype with pixi and storing objects as json are very handy.


Fix Boots namespace issue

Issue #, if available:
Description of changes:
Rollback to a version of Boots that doesn't have the iPXE issue and doesn't contain a new change to the way namespacing works.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve

/lgtm


Is there a plan to release the WindLayer?

Hi there, I am really impressed about the wind demo.
Q1: Are there any plans on releasing the WindLayer?
Q2: Was also looking how the data is fetched. I see that it is weather.bin, but I'm curious - how does the data looks like?
Cheers

Are there any plans on releasing the WindLayer?

It has certainly been a long-standing ambition, but so far we have felt that we'd need a more comprehensive treatment of data textures, e.g. to be able to provide a clear answer to your second question.
In the mean-time, if you are willing to a bit of extra work, you can always copy the layer from the example into your app.

Was also looking how the data is fetched. I see that it is weather.bin, but I'm curious - how does the data looks like?

I don't recall exactly at the moment, but I believe that if you look into the shader code, you can rather easily see that e.g wind speed in each point is encoded in color components of the resulting data texture.

Cheers @ibgreen - thanks a lot for your time!
Great work that you guys are doing, hope I can help out!

@ibgreen I was actually looking to implement the WindLayer, but with the newest deck.gl and luma.gl libraries, because now it depends on older versions.
Would you see any problem/obstacles that I would encounter by using the newest versions?
Cheers

@Robert-OP

I was actually looking to implement the WindLayer, but with the newest deck.gl and luma.gl libraries, because now it depends on older versions.

Yes, that would be a great first step towards making these layers generally usable.
Q1: Would you see any problem/obstacles that I would encounter by using the newest versions?
Yes, there would likely be some effort involved, as APIs have changed a bit on the lower levels.
Q2: Is it possible to implement something similar, e.g. WindLayer ParticleLayer, with the newer version?
Yes of course, it would just be a matter of working around some API changes in deck and luma.
Before you start, you'd definitely want to pay close attention to deck.gl and luma.gl upgrade guides.
Some of it you could probably do through taking the existing example on a branch and just upgrading the deck.gl versions, and we could help you work through any console errors and warnings.
I believe there were some shader changes in 5.0->6.0 (maybe around picking uniforms) that resulted in silent failures, those could be hard for you to debug on your own, but you could get advice here.
Perhaps @1chandu may have better recollections of what was changed.

Thanks @ibgreen!
I would love to help out, work and contribute on it, but I would need some guidance.
I have already started using the things from the wind demo showcase and put them in my project, but I had to modify and go through some errors and warnings (I bumped up the version of<EMAIL_ADDRESS>and<EMAIL_ADDRESS>- I want to go higher now and make them work with the latest versions).


[nfs-provisionner] Too many open files

Hi there,
We recently encounter a "Too many open files" wit the NFS-provisionner. It seems like the ganesha nfs-server is using some sort of file descriptor cache which can be a real issue when you have some nfs volumes with a loot of files.
There is currently no easy/direct way to specify the ulimit for the nfs provisionner and/or control the ganesha FD cache.
E0407 08:23:57.125652       1 controller.go:578] Failed to provision volume for claim "default/redis-session-datadir" with StorageClass "nfs-fast": error creating export for volume: error exporting export block
EXPORT
{
Export_Id = 4;
Path = /export/pvc-40d9e46a-1b6b-11e7-9c28-0050568e35fd;
Pseudo = /export/pvc-40d9e46a-1b6b-11e7-9c28-0050568e35fd;
Access_Type = RW;
Squash = no_root_squash;
SecType = sys;
Filesystem_id = 4.4;
FSAL {
Name = VFS;
}
}
: error calling org.ganesha.nfsd.exportmgr.AddExport: Error while parsing /export/vfs.conf because of (token scan) errors. Details:
Config File (<unknown file>:0): new file (/export/vfs.conf) open error (Too many open files), ignored

Is this a known issue ?

Well we should be prefacing our start of Ganesha with a 'ulimit', but that requires the container to be privileged for it to have any effect. I will investigate implementing this
Alternatively, running with the docker ulimit argument may bypass the issue.

What value do you get for output of ulimit -n when run inside the container? I get the max 10241024 which is what ganesha wants to set itself.(sudo prlimit --pid <ganesha.nfsd PID> on the host machine also says 10241024)

ulimit -n in the nfs-provisioner container gives me 65536.

I am working on a fix here https://github.com/kubernetes-incubator/external-storage/pull/72, I'm pushing it to latest tag if you want to try it.
It appears to work, I still need to test it. And the extra syscall may result in additional requirements for CAP_ADD and/or seccomp, need to test that too.

The only thing that needs to be done is: add the capability - SYS_RESOURCE to either docker run or securityContext.capabilities.add . I will update the docs when I release the next version including this fix, it is going to just be in the latest tag for now

Thank you, I will try to test this.


Basename: Fix mobile badge and navigation layout

Navigation
Before

After

### Badge sections
Before

After

🟡 Heimdall Review Status

Requirement
Status
More Info

Reviews

🟡
0/1

Denominator calculation

Show calculation

1 if user is bot
0

1 if user is external
0

From .codeflow.yml

1

Additional review requirements

Show calculation

Max
0

0

From CODEOWNERS

0

Global minimum
0

Max

1

1

1 if commit is unverified
0

Sum
1


[SITE] Proper plural

If 0 named instances, say "No named instances" instead of empty dropdown (and say "1 instance" instead of "1 instances")

Instead of fixing this in the old site, I'm doing this properly in the new site.
ᶠᵃᵐᵒᵘˢ ˡᵃˢᵗ ʷᵒʳᵈˢ


Remove documentation upload from .travis.yml

We now have Docs.rs! :)

Forgot about that old doc upload!


Update ADA doc to show alpha release of Datadog provider

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes https://github.com/pipe-cd/pipe/issues/1143
Does this PR introduce a user-facing change?:

NONE

/lgtm

Fixed done.

/lgtm

/approve


Design a custom 404 page

It is necessary to provide an attractive example of 404 page.

To implement this layout I think that custom CSS support (#11) is required. Would you like to take care of this issue? ;)

Do you want static image?

Just a simple static page with a nice layout, you can embed a Base64 image if you mind creating something like this: https://cdn.searchenginejournal.com/wp-content/uploads/2020/08/killer-404-page-disney-5f3d563a47cff.png.
And then, add a scripts folder in the database folder with the correspoding query to add it to the database (you must get the ID of the first site, because we currently support only a single site, and then use it to insert the page in the ContentPages table).

I must create sql insert for first site, so I can add or update this content page. Ok?

you must get the ID of the first site, because we currently support only a single site

Can I add SVG + CSS ?
Example
Static base64 has scale problem and resolution

Yes, you can create a general init.sql script that creates the site and the content page. At his point, provide also a simple Home Page (just a simple title is fine), so the script can be used to create a first site from scratch.
Yes, the CMS provides support for embedding CSS directly in the ContentPage definition.

Can you create another issue for "init script"?
So I can create 2 parallel branch for two problem

You can find it here: #26


dts: remove unused clock-controller property

The 'clock-controller' property isn't specified and not used for any
generation.  Lets remove it.
Signed-off-by: Kumar Gala<EMAIL_ADDRESS>

That's fixes the problem.
You might want to remove the STM32 "clocks-controller" as well

To be reported in :

[x] https://github.com/zephyrproject-rtos/zephyr/pull/17100 (STM32H7)
[ ] https://github.com/zephyrproject-rtos/zephyr/pull/16962 (STM32G0)


SpectatorViewPlugin.dll not being recognized

Overview
I get these warnings and error trying to implement spectatorview to my project:

Plugins: Failed to load 'Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Plugins/WSA/x86/SpectatorViewPlugin.dll' with error 'Det angivne modul blev ikke fundet.
'.
Microsoft.MixedReality.Toolkit.Extensions.SpectatorView.MarkerDetection.SpectatorViewPluginArUcoMarkerDetector:Start() (at Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginArUcoMarkerDetector.cs:31)

Plugins: Failed to load 'Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Plugins/WSA/x86/SpectatorViewPlugin.dll' with error 'Det angivne modul blev ikke fundet.
'.
Microsoft.MixedReality.Toolkit.Extensions.SpectatorView.MarkerDetection.SpectatorViewPluginAPI:Initialize(Single) (at Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginAPI.cs:60)
Microsoft.MixedReality.Toolkit.Extensions.SpectatorView.MarkerDetection.SpectatorViewPluginArUcoMarkerDetector:Start() (at Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginArUcoMarkerDetector.cs:31)

DllNotFoundException: SpectatorViewPlugin
Microsoft.MixedReality.Toolkit.Extensions.SpectatorView.MarkerDetection.SpectatorViewPluginAPI.Initialize (System.Single markerSize) (at Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginAPI.cs:60)
Microsoft.MixedReality.Toolkit.Extensions.SpectatorView.MarkerDetection.SpectatorViewPluginArUcoMarkerDetector.Start () (at Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginArUcoMarkerDetector.cs:31)

Expected Behavior
No exception thrown when requested SpectatorViewPlugin.dll file is inserted to correct folder.
Actual Behavior
Program does not recognize SpectatorViewPlugin.dll in folder at all.
Steps to reproduce
I first created a project and implemented the Microsoft Mixed Reality Toolkit v2.0.0 Beta 2.
I then cloned the repo so I could add the MixedRealityToolkit.Extensions folder to my project with the SpectatorView support I need.
I followed this: https://github.com/Microsoft/MixedRealityToolkit/tree/master/SpectatorViewPlugin
I realised that inserting the newly made SpectatorViewPlugin.dll among the other files requested from this readme, that my project complained about them being not being x64. I redid this part, inserting x64 in this part:  ".\vcpkg install opencv[contrib]:x64-uwp --recurse" and built for Release x64.
I inserted the opencv-files and the dll in this path as the guide suggests: Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Plugins/WSA/x86
I inserted the SpectatorView prefab to the scene and run it, and then I got above errors.
(So to clarify: I did try with x86 first as the guide prescribes first)
Unity Editor Version
2018.3.7.f1
Mixed Reality Toolkit Release Version
Microsoft Mixed Reality Toolkit v2.0.0 Beta 2

Hello @Avalin ,
My instinct is that you are encountering issues because you placed x64 binaries in the Plugins\WSA\x86 directory. HoloLens is a x86 device, so you will need to build and use an x86 version of SpectatorViewPlugin.dll using the x86 opencv binaries. It may be that when you opened the SpectatorViewPlugin visual studio solution, it defaulted to a x64 build environment. You can change this in the visual studio, make sure that the Solution Configuration is set to Release and that the Solution Platform is set to x86 when building.
When you say that your project complained about these binaries not being x64, was this issue experienced in the Unity editor or in visual studio? If it is an issue in the Unity editor, it may be a problem with how the dll is configured. Viewing the dll in the unity editor's inspector, unselect 'Any platform' and only enable the plugin for 'WSAPlayer'. Also make sure that your CPU is specified as x86 in the platform settings. You may also need to update the Unity Build Settings to use a x86 architecture and HoloLens compared to x64 and Any device.

It's a Unity exception. Visual Studio builds the files just fine. Here's an image illustrating the issue:

I tried rebuilding it with the x86 files instead again, and reconfigured the .dlls as you suggested, however the problem persists.

It looks like you may be using the new spectator view refactor compared to the old spectator view preview? I will forewarn that this code is still undergoing some changes. SpectatorViewPluginApi.cs has some logic in it's onvalidate function that attempts to locate the dll within MixedRealtyToolkit-Unity\MixedRealityToolkit.Extensions\SpectatorView\Plugins\WSA\x86. Given the issues you're hitting, this check seems too aggressive and should probably be removed or updated to search all unity directories for the dll. To get yourself unblocked, you can remove these checks in the onvalidate function. I will open a pull request tomorrow removing them for the feature branch.
You may have already built the correct plugins, but I will call out that for this refactored spectator view code, you need to build and use a Spectator view plugin from the feature/spectatorView branch in the MixedRealityToolkit repo. The master branch in said repo still contains the legacy plugin solution for spectator view preview.

After looking at this again, it seems like the api dll checks may not be causing your issue. I've updated the pull request to also add a try catch block to the api initialization. It seems more like you may have a spectator view plugin that doesn't align with the extern functions defined in SpectatorViewPluginApi.cs:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/41e3feaddb26c1d20c3a6571b7d3500604a314a6/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/MarkerDetection/ArUco/HoloLens/SpectatorViewPluginAPI.cs#L15
Plugin definitions of said externs:
https://github.com/Microsoft/MixedRealityToolkit/blob/feature/spectatorView/SpectatorViewPlugin/SpectatorViewPlugin/SpectatorViewPlugin/SpectatorViewPlugin.cpp

Ah okay, I initially downloaded the project from the master-branch, then realised the extension with SpectatorView was not included, so I just inserted the .Extensions folder to my master-branch project from the feature/spectatorView branch, (I am trying to make the refactored one work as I would really like the android functionality when it is available).
However I just retried from scratch in a new project
What I did was cloning this branch (feature/spectatorView)
Building and copying all the needed .dll files with VCPKG
Placing them into the folder Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Plugins/WSA/x86
Made sure all above mentioned settings were set accordingly
Ran the example scene included with SpectatorView
And I still get the DllNotFoundException (and if I change it back to allow x64, it will complain about the wrong architecture, so it does in fact "see" the dll file in there, it just won't initialize it as it seems)

VCPKG will build all of the opencv binaries. VCPKG doesn't compile SpectatorViewPlugin.dll. You will need to manually compile SpectatorViewPlugin.dll by doing the following:

Clone https://github.com/Microsoft/MixedRealityToolkit
Checkout feature/spectatorView in the MixedRealityToolkit (not the MixedRealityToolkit-Unity repo)
Build a x86 Release version of SpectatorViewPlugin in visual studio with the MixedRealityToolkit/SpectatorViewPlugin/SpectatorViewPlugin/SpectatorViewPlugin.sln solution
Copy all output binaries into a Plugins\WSA\x86 directory in your unity assets folder (For me, the output binaries are dropped into MixedRealityToolkit\SpectatorViewPlugin\SpectatorViewPlugin\Release\SpectatorViewPlugin\ by visual studio)

This Plugins\WSA\x86 is a special folder defined by unity (https://docs.unity3d.com/Manual/SpecialFolders.html)
I would also make sure that you are using the platform switcher defined on the 'Spectator View' game object in the unity scene. See https://github.com/Microsoft/MixedRealityToolkit-Unity/wiki/Spectator-View-Setup for more information on the platform switcher.
If you have made it past all of this and are still experiencing issues, it may be that your Unity generated visual studio solution isn't picking up the dll correctly. A few things to check:

Have you tried deleting and recreating the app/visual studio solution directory created by Unity? Usually this is labeled MixedRealityToolkit-Unity\App or MixedRealityToolkit-Unity\HoloLens. Sometimes unity fails to update the visual studio solution correctly. So deleting and recreating this folder may fix things.

After generating your visual studio solution via unity, check to see if SpectatorViewPlugin.dll exists in the output directory (MixedRealityToolkit-Unity\App). If it doesn't and SpectatorViewPlugin.dll exists in an Assets*\Plugins\WSA\x86\ folder, something has likely gone wrong with Unity building/the visual studio solution generation step. You may be able to manually copy all of the dlls created when building MixedRealityToolkit (described above) and add them to the directory containing your unity generated *.vcxproj file (For me, my *.vcxproj file was in MixedRealityToolkit-Unity\App\MixedRealityToolkit). This may work but it is untested.

Hi @chrisfromwork
Also, thanks for your consistent feedback.
Since the error came from the "Assets/MRTK/MixedRealityToolkit.Extensions/SpectatorView/Plugins/WSA/x86" path, I assumed this was the destined path for the .dll and opencv files (but this was the check you were looking into, right?) I inserted the .dlls to the special Unity folder instead as you suggested "Assets/Plugins/WSA/x86" and alas, the error is still visible as (I assume) it looks for the files in the forementioned path, and not the unity plugins folder. However, after doing all the steps you recently mentioned, I managed to make a build both for HoloLens and my Android device, and they can sometimes (when I'm lucky) pair through a QR code.  So despite the .dll-not-initialized-error showing, it does manage to make a connection between the two devices, so I will assume they actually do initialize(?)
It does appear to be very buggy on the Android, (not reliably connecting, and when it does, android phone only sees a still picture of what's in the app) however I suppose it might be due to the fact that this feature is still-in-development, and not necessarily the .dll not initializing properly?

Yes, I now have a pull request out to remove those checks. We will prevent future developers from hitting this unnecessary error. Thank you for sharing your experience! :)
https://github.com/Microsoft/MixedRealityToolkit-Unity/pull/3602
What type of Android device are you using? Right now this experience is based on a udp broadcast networking component that unblocks the experience but should be improved for real-time/large payloads. Are you attaching the HoloLens and mobile device to the same local network?
When you say the Android device sees a still image of the app, is it a static 3d unity scene that you can move around or a static 2d frame? Spectator view logic doesn't automatically provide content synchronization across devices (animation triggers and times aren't necessarily synchronized). We are working on building a richer sharing story for the MRTK, but it's still in early thinking stages. If it's a static 2d image, it may be that your device doesn't support arcore, but I would think that there may be a more obvious system error for this.
Also, what commit is your spectator view code synced to? Depending on when you manually copied the code some different marker detection fixes have gone in.

Hi Chris!
I was trying on 2 different devices that should (and now I know, does) support ARCore, "Samsung Galaxy A5 2017", and a "Samsung Galaxy S8". I managed to fix the problem by now, and in case anyone sees this and may go through the same problem: the culprit seemed to be that "Scripting Backend" in "Player Settings" might be set to IL2CPP when building for Android. Setting this to Mono fixed the problem for me. After changing this the AR Camera worked fine, and the Spectator View works as intended on the Android phone. It was a still 2D image frame saying "Waiting for User", with a small picture of a part of the app. At this point, the initial scene loads, and the phone user can see the AR elements that is also within the HoloLens (however not synced to the same positions, but it is still a great starting point)
I still have a few questions in regards to the SpectatorView, in regards to loading a different scene (Loading a new scene on HoloLens does not load the new scene in the SpectatorView device, which I guess makes sense since I'm not broadcasting this change anywhere network-wise?), so more on how to go about sending data from the HoloLens to the mobile device, and syncing their scene view so that the objects in the scene are placed accordingly in the "real world" on both devices (if this makes sense) However, I also feel this is moving away from the initial topic, that by now is fixed (SpectatorView.dll not initializing -> but thanks to your great support they are now) so I'm wondering if it makes more sense to ask about these things elsewhere? (In that case feel free to close this initial issue)

I have seen some issues with android studio where the camera doesn't initialize correctly. Typically if i deploy through android studio and then restart my device the application will work correctly (I realize that this is a less than ideal workaround) Unfortunately if you want recording to work, you will need to compile through android studio and change the default activity to the custom one provided with spectator view. Unity didn't have a default android recording solution like iOS and various permissions required having a custom activity.
When you say not synced to the same positions, are these game objects at static locations and the cameras are misaligned? Or are these items moving/animating around the scene and aren't synced across devices?
In regards to synchronizing a scene change, currently the spectator view game object isn't tagged to remain loaded across scenes. We should add this function call to the main spectator view experience/SpectatorView.cs: https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html
After insuring that the device is kept across scenes, you will need to make sure that the root object transform is applied to your content across scenes. To do this we will need to make the following field public:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/25c61feb2979a4b1860495d1415c9c00ed98b2ae/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/SpectatorView.cs#L16
After loading the new scene, whatever content root you have in the new scene will have to get set as the _sceneRoot so that the correct transform gets applied.
In terms of kicking off the scene change, you could create a new serializable object/byte array payload that then is handed across devices via the network pipe. To send data, you can see how the spatial coordinate system does this:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/25c61feb2979a4b1860495d1415c9c00ed98b2ae/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/SpectatorView.cs#L118
To see how to receive data, you could look here:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/25c61feb2979a4b1860495d1415c9c00ed98b2ae/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/SpectatorView.cs#L93
Likely you would just add whatever scene coordinator you create to the list of things trying to parse incoming data.
One gotcha is that the UDPBroadcastNetworkingService doesn't send a payload every frame but the MarkerSpatialCoordinateService creates a payload every frame, which is  a limitation for this networking component. You may have to add some additional logic to give your scene change payload higher priority/require it to send before caching more payloads to broadcast. One thing you could try is changing the SendData declaration to take a priority flag. Then you could add a check here to not overwrite the cached current message if it has a high priority and has not been sent:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/25c61feb2979a4b1860495d1415c9c00ed98b2ae/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/Networking/UDPBroadcastNetworkingService.cs#L241
You can then add a flag to BroadcastData() to indicate that the cached current message has been sent/for the networking component to start taking more payloads:
https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/25c61feb2979a4b1860495d1415c9c00ed98b2ae/Assets/MixedRealityToolkit.Extensions/SpectatorView/Scripts/Networking/UDPBroadcastNetworkingService.cs#L245
Given these instructions, it seems like we should address these sorts of capabilities in the codebase. I will try and get some examples out for how to do this.

I have put out an initial pull request that shows how to do some of these things: https://github.com/Microsoft/MixedRealityToolkit-Unity/pull/3647
There will likely be a wider community discussion on best practices for some of these things. I know we should probably refactor how the marker spatial coordinate service serializes state changes to use a more well understood pattern.

Closing this issue for now based on a lack of activity. Please reopen this issue in the future if problems persist.


Transpiler should check input and output stream states

Summary:
Stan transpiler does not check whether the input and output files can be read and written respectively.
Description:
If the output directory/file cannot be written (e.g. due to Unix permissions), then the stanc command (and presumably all other interfaces that invoke the transpiler) does not report any errors but obviously the output stream is in an invalid state and doesn't get written to. When using cmdstan, this encourages make to try to link the C++ model, but g++ then gives a fatal error saying No such file or directory for the model header .hpp file, which looks odd because there are no signs that the stanc step didn't work.
Similarly if the input file does not exist or is not readable, then stanc says there's a syntax error on line 1 instead of reporting failure to open the file, and in this case a slightly more descriptive error message might be helpful.
Reproducible Steps:
Described using cmdstan/stanc interface, but fix felt likely to be in main stan repository.
Missing/unreadable input file case:
bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Non-writable output file case:
touch examples/bernoulli/bernoulli.hpp
chmod ugo-w examples/bernoulli/bernoulli.hpp
bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp

(The non-writable output file case can be easily reached using the documented make command as well.)
Current Output:
Missing/unreadable input file case:
$ bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Model name=nonexistent_file_model
Input file=nonexistent-file.stan
Output file=nonexistent-file.hpp

SYNTAX ERROR, MESSAGE(S) FROM PARSER:

ERROR at line 1

  1:
       ^

PARSER EXPECTED: <model declaration (or perhaps an earlier block)>

$ echo $?
253

Non-writable output file case:
$ touch examples/bernoulli/bernoulli.hpp

$ chmod ugo-w examples/bernoulli/bernoulli.hpp

$ bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp
Model name=bernoulli_model
Input file=examples/bernoulli/bernoulli.stan
Output file=examples/bernoulli/bernoulli.hpp

$ echo $?
0

$ ls -l examples/bernoulli/
-r--r--r--+ 1 mystatistic mystatistic    0 Feb  8 16:43 bernoulli.hpp

(i.e. the file still has 0 bytes and stanc didn't in fact succeed in writing it despite no error messages on stdout/stderr and a return code of EXIT_SUCCESS)
Expected Output:
Missing/unreadable input file case:
$ bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Model name=nonexistent_file_model
Input file=nonexistent-file.stan
Output file=nonexistent-file.hpp

FILE I/O ERROR: Unable to read the input file 'nonexistent-file.stan'

$ echo $?
253

Non-writable output file case:
$ touch examples/bernoulli/bernoulli.hpp

$ chmod ugo-w examples/bernoulli/bernoulli.hpp

$ bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp
Model name=bernoulli_model
Input file=examples/bernoulli/bernoulli.stan
Output file=examples/bernoulli/bernoulli.hpp

FILE I/O ERROR: Unable to write to the output file 'examples/bernoulli/bernoulli.hpp'

$ echo $?
253

Additional Information:
I have being trying to run cmdstan on our local cluster, which suffers from permission problems, and a more helpful error message and return code might have assisted me in diagnosing the issue sooner.
Current Version:
v2.14.0

Thanks for a clear issue!
We should be able to fix this quickly.

On Feb 8, 2017, at 12:04 PM, mystatistic<EMAIL_ADDRESS>wrote:
Summary:
Stan transpiler does not check whether the input and output files can be read and written respectively.
Description:
If the output directory/file cannot be written (e.g. due to Unix permissions), then the stanc command (and presumably all other interfaces that invoke the transpiler) does not report any errors but obviously the output stream is in an invalid state and doesn't get written to. When using cmdstan, this encourages make to try to link the C++ model, but g++ then gives a fatal error saying No such file or directory for the model header .hpp file, which looks odd because there are no signs that the stanc step didn't work.
Similarly if the input file does not exist or is not readable, then stanc says there's a syntax error on line 1 instead of reporting failure to open the file, and in this case a slightly more descriptive error message might be helpful.
Reproducible Steps:
Described using cmdstan/stanc interface, but fix felt likely to be in main stan repository.
Missing/unreadable input file case:
bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Non-writable output file case:
touch examples/bernoulli/bernoulli.hpp
chmod ugo-w examples/bernoulli/bernoulli.hpp
bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp
(The non-writable output file case can be easily reached using the documented make command as well.)
Current Output:
Missing/unreadable input file case:
$ bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Model name=nonexistent_file_model
Input file=nonexistent-file.stan
Output file=nonexistent-file.hpp
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
ERROR at line 1
1:
^
PARSER EXPECTED: <model declaration (or perhaps an earlier block)>
$ echo $?
253
Non-writable output file case:
$ touch examples/bernoulli/bernoulli.hpp
$ chmod ugo-w examples/bernoulli/bernoulli.hpp
$ bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp
Model name=bernoulli_model
Input file=examples/bernoulli/bernoulli.stan
Output file=examples/bernoulli/bernoulli.hpp
$ echo $?
0
$ ls -l examples/bernoulli/
-r--r--r--+ 1 mystatistic mystatistic    0 Feb  8 16:43 bernoulli.hpp
(i.e. the file still has 0 bytes and stanc didn't in fact succeed in writing it despite no error messages on stdout/stderr and a return code of EXIT_SUCCESS)
Expected Output:
Missing/unreadable input file case:
$ bin/stanc nonexistent-file.stan --o=nonexistent-file.hpp
Model name=nonexistent_file_model
Input file=nonexistent-file.stan
Output file=nonexistent-file.hpp
FILE I/O ERROR: Unable to read the input file 'nonexistent-file.stan'
$ echo $?
253
Non-writable output file case:
$ touch examples/bernoulli/bernoulli.hpp
$ chmod ugo-w examples/bernoulli/bernoulli.hpp
$ bin/stanc examples/bernoulli/bernoulli.stan --o=examples/bernoulli/bernoulli.hpp
Model name=bernoulli_model
Input file=examples/bernoulli/bernoulli.stan
Output file=examples/bernoulli/bernoulli.hpp
FILE I/O ERROR: Unable to write to the output file 'examples/bernoulli/bernoulli.hpp'
$ echo $?
253
Additional Information:
I have being trying to run cmdstan on our local cluster, which suffers from permission problems, and a more helpful error message and return code might have assisted me in diagnosing the issue sooner.
Current Version:
v2.14.0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@seantalts, I added you to the issue, but no need to tackle it if you don't have time. I'm not sure if it's code in stan-dev/stan or cmdstan off the top of my head.

I can do this if nobody else wants to.  I have include basically working (other than error reporting) and this change has to work with that.


fix plugin npm links

npmjs.com has apparently been redesigned, and now https://npmjs.com/package/package-name/ doesn't work anymore, only https://npmjs.com/package/package-name.

As per https://github.com/gulpjs/gulpjs.github.io/issues/84 it seems they fixed it


New backend system?

Hi,
I am migrating my backend to the new backend system.
All plugins work (using the LegacyPlugin function)
except my LDAP auth plugin.
Do you have a code example on how to use it with the new backend system?
txs

actually, I've found the document in your website for the new backend
However, I've tried it and it didn't work.
the front end is calling for auth/ldap/refresh as before, but now I am receiving 404 for that call. It looks like some part of the backend is meant to add that route but is no longer doing it.
would you please be able to help?
thanks

Have you update both backend and frontend plugin to the same and last version ?

I have the same issue too, got a 404 error on auth/ldap/refresh.

hi @antoniomuso . apologies for the delay. I am using 4.2.0 for both backend and frontend

@antoniomuso is /api/auth/ldap/refresh supposed to be missing? or is it obsolete in the latest version?

Are you using the last Backstage version? As you can see, refresh works in the tests. Can you post your plugin configuration?

Hello, seems like i'm facing the same issue
My steps:

Create a new backstage application using the latest cli version (shows 1.27.0 in backstage.json)
Config the ldap backend
Setup ldap-auth

    auth:
        environment: production # eg: production|staging|review|develop
        providers:
            ldap:
                # eg: production|staging|review|develop
                production:
                    cookies:
                        secure: false # https cookies or not
                        field: 'backstage-token' # default

                    ldapAuthenticationOptions:
                        userSearchBase: 'ou=users,dc=ns,dc=farm' # REQUIRED
                        # what is the user unique key in your ldap instance
                        usernameAttribute: 'uid' # defaults to `uid`
                        # directory where to search user
                        # default search will be `[userSearchBase]=[username],[userSearchBase]`

                        # User able to list other users, this is used
                        # to check incoming JWT if user are already part of the LDAP
                        # NOTE: If no admin user/pass provided we'll attempt a credential-less search
                        adminDn: uid={ADMIN_USERNAME},ou=users,dc=ns,dc=farm
                        adminPassword: '{ADMIN_CRED}'

                        ldapOpts:
                            url:
                                - '{LDAPS_HOST}'
                            tlsOptions:
                                rejectUnauthorized: false

Then yarn dev

As a I try to login I get : 404 from /refresh endpoint
Checking the 404 response under '/api/auth/ldap/refresh' I have a message
{
"error": {
  "name": "NotFoundError",
  "message": "Auth provider registered for 'ldap' is misconfigured. This could mean the configs under auth.providers.ldap are missing or the environment variables used are not defined. Check the auth backend plugin logs when the backend starts to see more details.",
  "stack": "NotFoundError: Auth provider registered for 'ldap' is misconfigured. This could mean the configs under auth.providers.ldap are missing or the environment variables used are not defined. Check the auth backend plugin logs when the backend starts to see more details.\n    at ..."
},
"request": {
  "method": "POST",
  "url": "/api/auth/ldap/refresh"
},
"response": {
  "statusCode": 404
  }
}

And I could not figure out if something is miconfigured :/
Some additional information for context:

I had it working using the old backend system using the same values for configuration
Ldap connection is working using the same values for the catalog provider

Any advice?

As seen in backstage documentation, I missed to add backend.add(import('@backstage/plugin-auth-backend'));.
Adding it fixed my 404 on the refresh.
It's not mentioned in the readme here.
next issue I had was a misunderstanding from this comment. It should've been
In the startup logs, there should be a log line that mentions the used plugins like:
rootHttpRouter info Listening on :7007
backstage info Plugin initialization started: 'proxy', 'catalog', 'search', 'auth', 'techdocs', 'kubernetes' type=initialization

For me the auth plugin was not present in the list.


 It seems we were only validating against main.json and no other files.

It seems the green tick gave us a false sense of security. There were several inconsistencies between schema and converter output.

Please confirm which of these are appropriate

It validates!


💔 argocd v2.4.17 💔

What is this PR About?
update to latest stable argocd 2.4.17
How do we test this?
helm install
cc: @redhat-cop/day-in-the-life

thanks Mike! 🐿


feat: add fetch and update proposer duties in proposer

feat: add fetch and update proposer duties in proposer

Let's add inline docs on the important funcs


az network nat gateway

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az network nat gateway create
Errors:
'NatGatewaysOperations' object has no attribute 'begin_create_or_update'
Traceback (most recent call last):
python3.6/dist-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
...
azure/cli/core/__init__.py, ln 782, in default_command_handler
    return op(**command_args)
cli/command_modules/natgateway/custom.py, ln 34, in create_nat_gateway
    return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, nat_gateway_name, nat_gateway)
AttributeError: 'NatGatewaysOperations' object has no attribute 'begin_create_or_update'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az network nat gateway create --resource-group {} --name {} --public-ip-addresses {} --idle-timeout {}

Expected Behavior
Environment Summary
Linux-5.4.0-1048-azure-x86_64-with-Ubuntu-18.04-bionic
Python 3.6.9
Installer: PIP

azure-cli 2.11.1

Additional Context

network

@ismaelfre10 Could update CLI version to the latest and try again. Thanks.


Error when running synthesize on blank project clone

@Speech jokey team:
I'm currently testing the new version of Speech Jokey and I keep getting an error when trying to convert the text into a *.wav file. Do you know what might be causing this?

[INFO   ] [MainScreen          ] Selected voice: Rachel
<api.elevenlabsapi.elevenlabsapi.ElevenLabsAPI object at 0x0000024102834D50>
hello guys, this is me.. Natascha. I'm testing the new version of speech jokey... It works great, although my Toby is super slow. This is ridiculous.. But the usability of the software is absolutely fine.
[DEBUG  ] [Starting new HTTPS connection (1)] api.elevenlabs.io:443
[DEBUG  ] [https          ]//api.elevenlabs.io:443 "GET /v1/voices HTTP/1.1" 200 47397
[DEBUG  ] [Starting new HTTPS connection (1)] api.elevenlabs.io:443
[DEBUG  ] [https          ]//api.elevenlabs.io:443 "POST /v1/text-to-speech/pMsXgVXv3BLzUgSXRplE?output_format=mp3_44100_128 HTTP/1.1" 200 335621
[ERROR  ] [MainScreen          ] Error during synthesis: [Errno 2] No such file or directory: 'tmp/output_file.wav'

Potential future error with OS fixed in: 7fe8c99faaa7dbc1ba8875f05d675ef5f106dc02
Described error from User fixed in: a31c7f4a80cc13c0f357adfeb7ffde9df87eac4d

If you want to bring the fixing commits over to the other branch where user is testing things, you'll need to do this:
git cherry-pick <COMMIT-HASH>
in this specific case:
git cherry-pick a31c7f4a80cc13c0f357adfeb7ffde9df87eac4d
Obviously you'll need to have pulled that commit BEFOREHAND, so if you don't have it, please do
git pull --all
or
git checkout develop_ui_fixes && git pull
and then
git checkout develop_breaks && git cherry-pick a31c7f4a80cc13c0f357adfeb7ffde9df87eac4d

Thank you! I added the commits to the branch with the cherry-pick commands

fixed by #9


docs(readme): add filebase endpoint

Ref. https://docs.filebase.com/storage-networks/ipfs/ipfs-pinning#how-to-re-pin-existing-ipfs-cids-with-filebase

Superseded by https://github.com/ipfs/pinning-services-api-spec/pull/103


Cannot log in to Lagoon logs UI

Describe the bug
The Lagoon logs UI (Kibana or Opensearch Dashboards) gets a cookie from Keycloak which passes role information to the logs UI in order to enforce index viewing permissions.
If the user is in too many groups, this cookie can get so large that it reaches the de facto browser limit of 4096 bytes and is rejected by the browser.
This causes a redirect loop when trying to log in to the logs UI.
To Reproduce
Steps to reproduce the behavior:

Add a user to lots of projects in Lagoon
User visits the logs UI
User cannot login and encounters a "too many redirects" error.

Expected behavior
Lagoon should avoid creating such a large cookie.
Screenshots
n/a
Additional context
In order to add users to a project a user must be OWNER within a project group. This means that a Lagoon user who is OWNER in their main customer group which contains all their projects will often also want to be OWNER in individual project groups which will increase the likelihood of hitting this bug.
The code creating the cookie looks roughly like this:
var ArrayList = Java.type("java.util.ArrayList");
var groupsAndRoles = new ArrayList();
var forEach = Array.prototype.forEach;
// add all groups the user is part of
forEach.call(user.getGroups().toArray(), function(group) {
	// remove the group role suffixes
	// lets check if the group has a parent if this is a child
	if(group.getFirstAttribute("type") == "role-subgroup") {
		var parent = group.getParent();
		if(parent.getFirstAttribute("type") == "project-default-group") {
			var projectIds = parent.getFirstAttribute("lagoon-projects");
			if(projectIds !== null) {
				forEach.call(projectIds.split(","), function(g) {
					groupsAndRoles.add("p" + g);
				});
				return;
			}
		}
	}
	var groupName = group.getName().replace(/-owner|-maintainer|-developer|-reporter|-guest/gi,"");
	groupsAndRoles.add(groupName);
	return;
});
// add all roles the user is part of
forEach.call(user.getRoleMappings().toArray(), function(role) {
	var roleName = role.getName();
	groupsAndRoles.add(roleName);
});
exports = groupsAndRoles;

This adds roles for all the projects that the user is an OWNER of even if the user is already an OWNER of a group that contains the project.
Could this code be improved to inspect the lagoon-projects annotation on the group and avoid adding the individual project roles where the user already has index view permissions for the project via a group? That would significantly reduce the cookie size in the common case outlined above.

Ok, but adding redundant project roles to the cookie when the user already has permissions on that project via a group also seems like a bug.

So - we had a long chat about this one, and roughly came up with the following proposition (for the opensearch part):
The issue is that an individual user can get added to multiple project groups, and these groups are the ones that (primarily) are consuming the cookie storage length.
What if, instead, Lagoon created a personalised tenant in Opensearch for that user, and instead added the index permissions to that, so that keycloak, instead of passing all the project-groups, only returned the actual groups, and the personalised tenant. It's a small inversion of the logic.
Lagoon would have to be modified slightly to be able to create the personalised tenant when required (i.e. when someone adds a user directly to a project). Lagoon would still recognise this as a user>project addition, but an additional opensearch-specific process would run in the relevant resolver (and also on removal from the project)
The upside for these users is that they get somewhere they can store their kibana-specific stuff, for Lagoon it can continue to have it's project-specific permissions, for keycloak is that it no longer needs to pass across all the project groups, and for opensearch is that it only needs to handle proper groups, and the personalised tenants are only created for users that need them (i.e. on first assignment).
For the Lagoon part, yes, a group owner should be able to add users to a project within that group without having to add themselves first.

What if, instead, Lagoon created a personalised tenant in Opensearch for that user

Mhh are you sure you mean "tenant" and not "role"?
Because each tenant creates a new index in kibana which would make the indexes explode (this is the reason that we removed the tenants for the projects), plus also if each user has their own tenant multiple users cannot share their dashboard anymore if they are in the same group.
but yes, creating an individual role in kibana for each user with that users specific index permissions and tenant access would probably solve the problem overall.

I agree with @Schnitzel, more tenants (roles?) is confusing for users ("hey, where did my visualisation go!?") and adds extra load to Opensearch.
IMO if Lagoon avoids adding redundant project-specific roles to the cookie it will solve the problem in practice because that is the specific scenario where we currently see the problem. It's also a much smaller change, and we know it works because the current workaround for this issue is to remove the user from project groups until they can log in.

This would have to be done in hand with removing the project-specific roles. The only personalised tenant+roles created would be for those people who don't use a group currently, so the numbers of roles shouldn't explode (in fact, they should reduce).
Not creating an alternative to the project-groups would render those users unable to view anything in kibana, hence this idea?

fixed in #3319


fix typo

typo:
addresing -> addressing

/assign @tompizmor

Hi @max8899
Thanks for the fix. You need to increase the minor version on the Chart.yml. Even these minor fixes requires the version to be bumped.

/ok-to-test
/lgtm


HTML

HTML
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so I can easily find and read the info
Acceptance Criteria
GIVEN a Prework Guide website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git, and Javascript with associated notes listed.

CSS
User Story
As a boot camp student
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the study guide
THEN I see a dark blue header and footer, and four boxes with a shadow

JAVASCRIPT
User Story
As a boot camp student
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I view the study guide
THEN I can see the four topics I learned listed along with a suggestion on what I should study first

README
User Story
As a boot camp student,
I want the prework notes to be structured on a webpage,
So that I can easily find and read the information.
Acceptance Criteria
GIVEN the prework project repository,
WHEN I view the README for the repository,
THEN I can see a professional README that provides information on the project and how to use it

DEPLOYMENT
User Story
As a boot camp student,
I want the prework notes to be structured on a webpage,
So that I can easily find and read the information.
Acceptance Criteria
GIVEN a Prework Study Guide website,
WHEN I visit the website using the URL,
THEN I can access my website from any browser


readline strange behavior, dropping message parts

I have a strange behavior with readline which I can't seem to trouble shoot myself, connected to a teensy I've found that it will, quite often, drop most of the message and only read the EOL character when using the normal read with an expected size of 10 bytes gets everything and consistently reports arrays which end with "\n"
Serial port /dev/ttyACM0
read buffer length: 10
ffffff8f4e147affffff8f4e147a000a
...
ffffffc156fffffffbffffffd4ffffffc156fffffffbffffffd4000a
read buffer length: 1
0a
read buffer length: 4
ffffffe0ffffff8effffffd80a
read buffer length: 5
ffffffe0ffffff8effffffd8000a

In my minimal case, I fill up a 10-byte buffer with the current cycle count and send it. See the attached code below, the example is quite simple. Note, I have tried this with baud 9600, 12e6, and 480e6; this problem persists in all three
C++ script
#include <serial/serial.h>
#include <unistd.h>
#include <iomanip>
#include <iostream>
#include <string>

int main(int argc, char * argv[])
{
  serial::Serial serial_conn("/dev/ttyACM0", 480000000, serial::Timeout::simpleTimeout(100));

  if (serial_conn.isOpen()) {
    std::cout << "Serial port "
              << "/dev/ttyACM0" << std::endl;
  } else {
    return 0;
  }

  std::string buffer;
  while (true) {
    if (serial_conn.available()) {
      // serial_conn.read(buffer, 10);
      serial_conn.readline(buffer);
      std::cout << "read buffer length: " << (int)buffer.size() << std::endl;

      for (const auto & c : buffer) {
        std::cout << std::hex << std::setfill('0') << std::setw(2) << (unsigned)c;
      }
      std::cout << std::endl;

      buffer.clear();
    }
  }
}

teensy code
#include <Arduino.h>

void setup()
{
  Serial.begin(9600);
  while (!Serial) {
  }
}

const size_t buffer_length = 10;
uint8_t buffer[buffer_length];
void loop()
{
  const uint32_t cycles = ARM_DWT_CYCCNT;
  memcpy(&buffer[0], &cycles, sizeof(uint32_t));
  memcpy(&buffer[4], &cycles, sizeof(uint32_t));
  buffer[8] = 0;
  buffer[9] = '\n';

  Serial.write(buffer, buffer_length);
  Serial.send_now();

  delay(100);
}

didn't consider to think that a newline character (0x0a) could just happen to be in the data. That's on me


Add filter for git hook on hygiene

I'll see if vscode is interested

Vscode looks like they will eventually takes this, but I'll merge this in and just deal with the merge conflict.


Add French mirror

Those days updates from the main repository became extremely slow (6 minutes with the --no-cache option). So I decided to open an internal mirror for my company : now it takes 10 seconds.
It's so easy to create a mirror so I decided to open and maintain the french https://packagist.fr mirror.
So, it's ready to be referenced as an official mirror, if you wish.

Thanks @peter279k

Thanks.

Tanks @baptistepillot 💯

Do you know how we can ask an addition of this mirror to the https://packagist.org/mirrors official mirrors list page ? It seems that this list is not updated with all available mirrors listed into your repository. I thing it would have a better benefits on the main repository traffic if all mirrors were listed here.

Do you know how we can ask an addition of this mirror to the https://packagist.org/mirrors official mirrors list page ? It seems that this list is not updated with all available mirrors listed into your repository. I thing it would have a better benefits on the main repository traffic if all mirrors were listed here.

You can look at this repository and PR.

Okay... Talked with the packagist.org team during my PR :

mirrors are not compatible with brand new composer 2 anymore (well... compatible in composer-1 mode, with a warning)
composer 1 mirrors are slower than brand new composer 2
with composer 2, mirrors are not needed anymore
with composer 2, my "it's very slow" problems with packagist.org do not occur anymore

https://github.com/composer/packagist/pull/1133
It seems that the problem is still present with composer version 1 and IPv6 servers (when ping packagist.org returns an IPv6, composer updates are very slow and not really reliable), but everyone will upgrade to composer version 2 soon, as it is now the official stable release.
So the reason why I mirrored to packagist.fr are deprecated now :(. I still stay it on, in case of problems next weeks with composer version 2, but there will be probably come a rollbar pull-request some day, sorry for that.

Hi @baptistepillot  I will update the script soon, due to COVID in Brazil I have some delay these days... I will support version 2 and planning with more detail what we will do packagist mirror, but at least:

Complete support for version 2
This script probally use the new script to create a mirror created by https://github.com/composer/mirror


Load more information in notifications

I got a bit confused by the setting "Load notification details", I thought it also loads the content of the notification, but I see now that it's only about status, etc.
I'd really like to turn off mail notifications, but you can see that they provide much more information right in the notification body:

I understand that with the v3 REST API you need to do another request to get the comment body, but if it was under an option, I would definitely turn it on.

This may be a bit tricky because GitHub fires notifications for distinct events. So question is what to load/show exactly for distinct events.


Add a control to the navbar (along with a form) to create/update the database

This is a clone of issue #5 from the original GitHub repo.

I created this issue when I was using Sqlite3 for persistence.  Now that persistence is implemented using  files (json for syllabary and metrics files; a Numbers spreadsheet for vocabulary), this ticket is no longer relevant/needed.


Removal of the "delete" and "write_delete".

Motivation
The delete function has been removed from the view code following Issue 1289.
Proposal
The code for delete and write_delete is eliminated.
The write_delete was used only for the tests and it is removed there as well since after all
if we remove the delete, we could remove the usage as well.
Test Plan
The CI
Release Plan
The documentation has to be updated with respect to that aspect.
Links

reviewer checklist

cargo insta [review|accept]

That command does not work.


Cleanup

Pylint/Pep8 cleanup

Notably, rename the face-off module to face_off, per pep8 guidelines.  The dash format caused issues when trying to import the settings in a python shell

Also, less obviously, i renamed some variables that conflicted with python special labels, such as list and round

Use random names and domains in tests, sorry @madridsoccer5
Use settings.ADMINS for suggestion email list, add test for validating functionality
Use sqlite during tests so postgresql is not required

Coverage increased (+12.4%) to 49.31% when pulling aeb628eb60cff12d11ecb992049f6be3cd26774e on m3brown:cleanup into b4a302636dc396d27b6f548137ae736dccf33e07 on excellalabs:master.


How to fix hot load script VNode ?

proc createDom(data: RouterData): VNode =
  buildHtml tdiv:
    if getItem("cloudfastLoggedIn") != "1":
      loginView({"":""}.toTable)
      script(src="dxcaptcha.js")
    else:
      layout()
      script(src="layuiAnimation.js")

shows after login, the script structure remains the old instead of switching , window.location.reload() is the only workaround and cause a consequensial flash.

Put an ID on the script tags:
proc createDom(data: RouterData): VNode =
  buildHtml tdiv:
    if getItem("cloudfastLoggedIn") != "1":
      loginView({"":""}.toTable)
      script(src="dxcaptcha.js", id="one")
    else:
      layout()
      script(src="layuiAnimation.js", id="two")

Thanks, works for now, how do you solve the script loading and unloading problem?

It is not related to karax nor DOM. Once you load an script in the browser, you cannot stop that code's execution by any means (well, ofc you can reload the webpage).
The script itself should be responsible of its own "shutdown" by removing the listeners it setup and stopping timers it manages.

In some other non-VDOM framework  , the script at bottom only works after the page loading. I want to know whether tagging script node with id is a best practice , does it have problems even handling listener and timer properly,  will this handling be interleaved or error prone at last?

The id on the scripts is only for Karax to identify them as different elements an trigger an update. It's to solve the same here: https://github.com/pragmagic/karax/issues/98
You must code the handling of listeners and timers part, karax doesn't manage that (no framework manages that)

I believe that this can be closed, reopen if you have further questions!