[Web][CanvasKit] App blinks along with TextField when keyboard is open sometimes

Details

We have an app in production right now & one of our users sent us a recording:
https://user-images.githubusercontent.com/39417742/152033456-128cd09d-075d-474c-ac07-95eaafb8973a.mp4

We never encountered this during development.
We force CanvasKit @ index.html:
<script type="text/javascript">
      window.flutterWebRenderer = "canvaskit";
</script>

Target Platform: Web
Target OS version/browser: Safari, iOS 15.1.1
Devices: iPhone 13 Pro
Thanks!
Logs

Logs

Analyzing stocklio-app...

   info - Unused import: 'package:stocklio_flutter/utils/recipe_util.dart' - lib\screens\create_recipe_new.dart:5:8 -
          unused_import

1 issue found. (ran in 31.7s)

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1466], locale hr-HR)
    • Flutter version 2.8.1 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\ivan7\AppData\Local\Android\sdk
    • Platform android-30, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.63.2)
    • VS Code at C:\Users\ivan7\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.32.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 97.0.1072.76

• No issues found!

Hi @IvanDeluxe, please provide a complete minimal reproducible code sample, preferably without any third-party packages, so we can verify this.
Thank you


[MB-8079] Migrate Modal component from React-USWDS package

Description
The Modal component in the React-USWDS library is deprecated, and will be removed with that library's 2.x release sometime in June.
This pull request:

wholesale ports the entire soon-to-be-deprecated component (including logic, stories, tests, and SCSS) into /src/components/MigratedModal,
refactors it to match MM coding conventions,
makes the stories look slightly prettier given the global styling in MM,
and then updates the import targets of any components which had previously imported any (Modal or Modal-related subcomponent) from React-USWDS.

(The component is named as such because we already have a Modal component in /src/components, which primarily encapsulates the deprecated USWDS version. However, as other components in this project are also importing directly from the deprecated USWDS components, without the pre-existing wrapper, it didn't seem sensible to me to migrate this as a subcomponent of the existing MM Modal.)
Reviewer Notes

Ensure that everything looks good in storybook and Happo -- as we're just porting over the logic from one location to another, there should be no visual changes
Ensure that all tests pass
Ensure that the revised modals work within the relevant contexts of the application
Ensure that all references to the deprecated Modal component and sub-components have been removed:

Clone @trussworks/react-uswds locally
In that repo, delete the entire directory of /src/components/Modal, and all content after /** Truss-designed components */ in /src/index.ts
Runyarn build in that repo
In the MyMove repo, yarn add ~/path/to/react-uswds
Run yarn storybook and check that modal components load and operate correctly

Setup
make client_run

Code Review Verification Steps

[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Closes MB-8079.

Messages

:book:
:link: MB-8079

  Generated by :no_entry_sign: dangerJS against 8a9fa25402a4a115b06b6173bcefd43f8e96e147

Heads up -- there actually is a legitimate CSS problem that I've discovered around the modal migration, which would cause modals on mobile widths to overflow the horizontal space on the screen. (Details below.) Until I fix this and get the Happo tests re-run to a satisfactory level, please don't merge this.
[nerd stuff]
What's happening is that the deprecated, base component that we're porting from USWDS has min-width: 400px; set on it. Since our rendering target includes Safari at 375px wide, we don't want that min-width; the existing Modal component in MM that wraps the USWDS version has min-width: 0; set as a result.
Both of these rules are set at the same CSS specificity (single-class level) and so the specificity tie is essentially broken by "which rule gets loaded last." For various reasons, that order has changed since the component was migrated.
The simple solution would be to just delete the min-width property from the MigratedModal, but as other components in MM now directly import the MigratedModal and don't necessarily have a min-width set for themselves, they're implicitly relying on the USWDS value. Therefore, I need to also set a min-width in those other components, if warranted.
CSS: it's okay

Heads up -- there actually is a legitimate CSS problem that I've discovered around the modal migration, which would cause modals on mobile widths to overflow the horizontal space on the screen.

This should now be fixed.

Heads up -- there actually is a legitimate CSS problem that I've discovered around the modal migration, which would cause modals on mobile widths to overflow the horizontal space on the screen. (Details below.) Until I fix this and get the Happo tests re-run to a satisfactory level, please don't merge this.
[nerd stuff]
What's happening is that the deprecated, base component that we're porting from USWDS has min-width: 400px; set on it. Since our rendering target includes Safari at 375px wide, we don't want that min-width; the existing Modal component in MM that wraps the USWDS version has min-width: 0; set as a result.
Both of these rules are set at the same CSS specificity (single-class level) and so the specificity tie is essentially broken by "which rule gets loaded last." For various reasons, that order has changed since the component was migrated.
The simple solution would be to just delete the min-width property from the MigratedModal, but as other components in MM now directly import the MigratedModal and don't necessarily have a min-width set for themselves, they're implicitly relying on the USWDS value. Therefore, I need to also set a min-width in those other components, if warranted.
CSS: it's okay

I'm glad you are as excited about CSS as I am. Good catch!!


Testing the model with new data

Hi,
@SaoYear Thank you for the great work. I am new to the problem of SED, I have fine-tuned iwth own data, Now, I just want to test the final fine-tuned model with test audio files, not having ground truth for the same. Is there any script to do that, without the need of preparing the .tsv files with onset offset event label etc. in the format of DESED data.
Basically, how will I use model for completely unknown input audio.
if you could tell me in steps, It would be really helpful.
Thank you so much in advance!

Hi,
Thanks for your interests!
If I understand you correctly, what you want is to use the model to inference on some unlabeled audio clips.
This is the same process as we submit the evaluation results for the DCASE challenge. And this function is integrated within the DCASE baseline codes as well as in the codes of ATST-SED, supporting by the pytorch-lightning.
To do this:

You might notice that, in config.yaml file (e.g., \train\configs\stage1.yaml file in this repo), there are only eval_folder and eval_folder_44k and no eval_tsv.
So first you could modify these two terms to your own paths. If you have audios in 16kHz, you can just change eval_folder to your own path. Otherwise, you might need to change eval_folder_44k and the script would automatically resample the audios to 16kHz

Run the evaluation, e.g., if you want to use fine-tuned model, run:

train_stage2.py --gpus 0, --eval_from_checkpoint YOUR_PRETRAINED_CKPT_PATH

The system would inference the data automatically and the predicted results would be stored in your exp folder.
Hope these helps : )

Thank you so much @SaoYear. This really helped, Much appreciate!!

Hi @SaoYear,
I might ask silly doubts, but I am getting this error, when tried testing in the same way you described. Although I have ensured all the input file to be 10s each in duration and file sizes also same, I don't know why I am getting this error, and how to fix it.
Please help me @SaoYear
(dcase2023) empuser@server:~/ATST-SED-Scripts/ATST-SED/train$ python train_stage2.py --gpus 1 --eval_from_checkpoint exp/stage2/version_0/epoch=209-step=23100.ckpt
/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train

/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/train_stage2.py(505)()
-> configs, args, test_model_state_dict, evaluation = prepare_run()
(Pdb) c
loaded model: exp/stage2/version_0/epoch=209-step=23100.ckpt
at epoch: 209
Global seed set to 42
32
Loading ATST from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/atst_as2M.ckpt
Loading student from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/exp/stage1/version_0/epoch=39-step=4400.ckpt
Model loaded
Loading ATST from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/atst_as2M.ckpt
Loading teacher from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/exp/stage1/version_0/epoch=39-step=4400.ckpt
Model loaded
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Trainer(limit_train_batches=1.0) was configured so 100% of the batches per epoch will be used..
Trainer(limit_val_batches=1.0) was configured so 100% of the batches will be used..
Trainer(limit_test_batches=1.0) was configured so 100% of the batches will be used..
[rank: 0] Global seed set to 42
Initializing distributed: GLOBAL_RANK: 0, MEMBER: 1/1

distributed_backend=gloo
All distributed processes registered. Starting with 1 processes
Testing DataLoader 0:   0%|                                                                                | 0/32 [00:00<?, ?it/s]torch.Size([1, 1, 2505, 128])
torch.Size([1, 128, 626, 1])
shape of x original: torch.Size([1, 1001, 768])
shape of pos original torch.Size([1, 250, 768])
Traceback (most recent call last):
File "train_stage2.py", line 505, in
configs, args, test_model_state_dict, evaluation = prepare_run()
File "train_stage2.py", line 374, in single_run
trainer.test(desed_training)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 794, in test
return call._call_and_handle_interrupt(
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 36, in _call_and_handle_interrupt
return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 88, in launch
return function(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 842, in _test_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1112, in _run
results = self._run_stage()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1188, in _run_stage
return self._run_evaluate()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1228, in _run_evaluate
eval_loop_results = self._evaluation_loop.run()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 152, in advance
dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 137, in advance
output = self._evaluation_step(**kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 234, in _evaluation_step
output = self.trainer._call_strategy_hook(hook_name, *kwargs.values())
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1494, in _call_strategy_hook
output = fn(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/strategies/ddp.py", line 368, in test_step
return self.model.test_step(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/local/ultra_sed_trainer.py", line 529, in test_step
strong_preds_student, weak_preds_student = self.detect(sed_feats, atst_feats, self.sed_student)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/local/ultra_sed_trainer.py", line 241, in detect
return model(self.scaler(self.take_log(mel_feats)), pretrained_feats)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in call_impl
return forward_call(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/CRNN_e2e.py", line 94, in forward
embeddings = self.atst_frame(pretrain_x)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in wrapped_call_impl
return self.call_impl(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in call_impl
return forward_call(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/atst_model.py", line 18, in forward
atst_x = self.atst.get_intermediate_layers(
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/audio_transformer.py", line 212, in get_intermediate_layers
x,,,,,patch_length = self.prepare_tokens(x,mask_index=None,length=length,mask=False)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/audio_transformer.py", line 146, in prepare_tokens
x = x + pos
RuntimeError: The size of tensor a (1001) must match the size of tensor b (250) at non-singleton dimension 1
Testing DataLoader 0:   0%|          | 0/32 [00:00<?, ?it/s]

Hi @SaoYear,
I might ask silly doubts, but I am getting this error, when tried testing in the same way you described. Although I have ensured all the input file to be 10s each in duration and file sizes also same, I don't know why I am getting this error, and how to fix it.
Please help me @SaoYear
(dcase2023) empuser@server:~/ATST-SED-Scripts/ATST-SED/train$ python train_stage2.py --gpus 1 --eval_from_checkpoint exp/stage2/version_0/epoch=209-step=23100.ckpt
/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train

/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/train_stage2.py(505)()
-> configs, args, test_model_state_dict, evaluation = prepare_run()
(Pdb) c
loaded model: exp/stage2/version_0/epoch=209-step=23100.ckpt
at epoch: 209
Global seed set to 42
32
Loading ATST from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/atst_as2M.ckpt
Loading student from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/exp/stage1/version_0/epoch=39-step=4400.ckpt
Model loaded
Loading ATST from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/atst_as2M.ckpt
Loading teacher from: /nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/exp/stage1/version_0/epoch=39-step=4400.ckpt
Model loaded
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Trainer(limit_train_batches=1.0) was configured so 100% of the batches per epoch will be used..
Trainer(limit_val_batches=1.0) was configured so 100% of the batches will be used..
Trainer(limit_test_batches=1.0) was configured so 100% of the batches will be used..
[rank: 0] Global seed set to 42
Initializing distributed: GLOBAL_RANK: 0, MEMBER: 1/1

distributed_backend=gloo
All distributed processes registered. Starting with 1 processes
Testing DataLoader 0:   0%|                                                                                | 0/32 [00:00<?, ?it/s]torch.Size([1, 1, 2505, 128])
torch.Size([1, 128, 626, 1])
shape of x original: torch.Size([1, 1001, 768])
shape of pos original torch.Size([1, 250, 768])
Traceback (most recent call last):
File "train_stage2.py", line 505, in
configs, args, test_model_state_dict, evaluation = prepare_run()
File "train_stage2.py", line 374, in single_run
trainer.test(desed_training)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 794, in test
return call._call_and_handle_interrupt(
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 36, in _call_and_handle_interrupt
return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 88, in launch
return function(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 842, in _test_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1112, in _run
results = self._run_stage()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1188, in _run_stage
return self._run_evaluate()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1228, in _run_evaluate
eval_loop_results = self._evaluation_loop.run()
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 152, in advance
dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 137, in advance
output = self._evaluation_step(**kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 234, in _evaluation_step
output = self.trainer._call_strategy_hook(hook_name, *kwargs.values())
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1494, in _call_strategy_hook
output = fn(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/pytorch_lightning/strategies/ddp.py", line 368, in test_step
return self.model.test_step(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/local/ultra_sed_trainer.py", line 529, in test_step
strong_preds_student, weak_preds_student = self.detect(sed_feats, atst_feats, self.sed_student)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/train/local/ultra_sed_trainer.py", line 241, in detect
return model(self.scaler(self.take_log(mel_feats)), pretrained_feats)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in call_impl
return forward_call(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/CRNN_e2e.py", line 94, in forward
embeddings = self.atst_frame(pretrain_x)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in wrapped_call_impl
return self.call_impl(*args, **kwargs)
File "/nfs/engine/empuser/anaconda3/envs/dcase2023/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in call_impl
return forward_call(*args, **kwargs)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/atst_model.py", line 18, in forward
atst_x = self.atst.get_intermediate_layers(
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/audio_transformer.py", line 212, in get_intermediate_layers
x,,,,,patch_length = self.prepare_tokens(x,mask_index=None,length=length,mask=False)
File "/nfs/engine/empuser/ATST-SED-Scripts/ATST-SED/desed_task/nnet/atst/audio_transformer.py", line 146, in prepare_tokens
x = x + pos
RuntimeError: The size of tensor a (1001) must match the size of tensor b (250) at non-singleton dimension 1
Testing DataLoader 0:   0%|          | 0/32 [00:00<?, ?it/s]

Hi, it seems like you made some modifications on the audio_transformer.py (Since your line 146 in audio_transformer.py is different from the line in this repo). And now the length of your positional embeddings and patch embeddings are not aligned (one is 1001 and the other is 250).
I will attempt to explain what's happening in the function prepare_tokens, which might help you to debug:

We apply a linear patching to transform each continuous 4 frames to a patch embedding, this would make the temporal resolution from 1001 to 1001 // 4 = 250;
We use cut mode for positional embedding, get 250-length trainable positional embeddings and add them with the patch embeddings (line 143-144 here)

I would recommend you to print the shape of x and pos before the addition, so that you can know whose length is wrong, both should be 250.

Hi, it seems like you made some modifications on the audio_transformer.py (Since your line 146 in audio_transformer.py is different from the line in this repo). And now the length of your positional embeddings and patch embeddings are not aligned (one is 1001 and the other is 250).
I will attempt to explain what's happening in the function prepare_tokens, which might help you to debug:

We apply a linear patching to transform each continuous 4 frames to a patch embedding, this would make the temporal resolution from 1001 to 1001 // 4 = 250;
We use cut mode for positional embedding, get 250-length trainable positional embeddings and add them with the patch embeddings (line 143-144 here)

I would recommend you to print the shape of x and pos before the addition, so that you can know whose length is wrong, both should be 250.

eval_folder

I have also encountered this problem. May I ask how many seconds of audio should be in "eval_folder"? My test set is 10s, it seems that the shape cannot match

The shape of your waveforms is incorrect. You should resample them to 16kHz.
To do so, you could refer to resample_data_generate_durations function (actually the resample_folder func in local.resample_folder) in the DESED baseline code. This function will automatically create a folder for you. And then you could change the eval_folder to the path of the created folder. The evaluation should work.

The shape of your waveforms is incorrect. You should resample them to 16kHz.
To do so, you could refer to resample_data_generate_durations function (actually the resample_folder func in local.resample_folder) in the DESED baseline code. This function will automatically create a folder for you. And then you could change the eval_folder to the path of the created folder. The evaluation should work.

Hello! Thank you very much for your help! But I still have some questions:

I checked my log output and found that the predicted categories only include the following types,
"Alarm bell ring Blender Cat Dishes Dog Electricshaver_tootbrush Frying Running_water Speed Vacuum_cleaner"
The model I used is "stage2_wo_external. ckpt". Is this a normal result?
When I use "stage2_w_external. ckpt", I get an error message: "RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory". It is likely that the model is damaged and I am unable to load it.

Yes, this ATST-SED model is designed for DESED dataset. These 10 classes are exactly the classes defined by the DESED dataset (DCASE challenge task 4). If you want to recognize more classes such as AudioSet Strong, you should refer to ATST repo here, instead of ATST-SED.
The _external.ckpt is broken. But the _wo_external.ckpt performs very similarly. You could use the _wo_external.ckpt one. Actually, we did not pay much attention on finetuning the _external.ckpt , this checkpoint is just to use for fair comparisons with other methods in our paper.

Yes, this ATST-SED model is designed for DESED dataset. These 10 classes are exactly the classes defined by the DESED dataset (DCASE challenge task 4). If you want to recognize more classes such as AudioSet Strong, you should refer to ATST repo here, instead of ATST-SED.
The _external.ckpt is broken. But the _wo_external.ckpt performs very similarly. You could use the _wo_external.ckpt one. Actually, we did not pay much attention on finetuning the _external.ckpt , this checkpoint is just to use for fair comparisons with other methods in our paper.

Hello! Your reply was very helpful to me. I carefully reviewed the code for "ATST Frame". If I want to obtain frame level sound event detection for my test dataset, should I change and run this part of the code?
########################
Frame-level downstream tasks
DESED
please see sehll/downstream/finetune_dcase
Strongly labelled AudioSet
please see shell/downstream/finetune_as_strong
#########################
The inference code  is "audiossl/audiossl/methods/atsframe/downstream/train_as_strong. py"
The inference model is "atstframe_base.ckpt"
May I ask if my guess is correct？ Thanks~~!!

is there a way to try the model inference on different durations of audio? maybe cutting the audios into frames before using the model or changing something within the model to support longer audio?

Yeah, you could refer to what we've done in the ATST-RCT system, last paragraph of section 3.
Quick summary:

use a fix-length window (say, W seconds) to shift through the long-duration audio (L seconds);
keep a hop length (K seconds);
you will get (L - W) / K + 1 (represented as N) W-second audio clips by this process
inference these N audio clips
aggregate the result (you might average or use logical OR for the overlapped frames) and pass to the median filter

Okay thank you! Is there an implemetation of this already ?

Okay thank you! Is there an implemetation of this already ?

You could refer to ATST-RCT repo, I just uploaded a neccessary file.
Please see the test_step in the trainer file for this part of implementation.

I guess I should change the batched_decode_preds in the utils file ? I do not understand all the changes I should make.

Yeah, there are two steps:

split the audio into shorted clips, in the test_step line 651-673
give the to the model (forward function)
unify the predictions (pull_back_preds function in utils.py)

I am only trying to run the inference on student model with the stage_2_wo_external.  modified to the train_stage2 file and iwas able to get the inferences on 10 second audios now I was trying to change the duration following your previous steps it seems the audio splitting step was successful. I did not get to which forward function I should give the split frames(crnn_e2e ?)
here are my logs
Audio type: <class 'torch.Tensor'>
Audio shape: torch.Size([284672])
Audio in seconds: 17.792
Padd in seconds: 1
Padding length: 3328
Audio length (Padding): 288000
Starting positions: tensor([     0., 128000.])
Ending positions: tensor([160000., 288000.])
Decomposed audio: torch.Size([2, 160000])
mel specs torch.Size([2, 128, 626])
atst feats torch.Size([64, 1780])
mel_spec = desed_training.mel_spec(audio)
atstfrnorm = desed_training.atst_norm(atstft)
print(mel_spec.shape)
print(atstfrnorm.shape)
Perform detection with the student model
strong_preds_student, _ = desed_training.detect(torch.unsqueeze(mel_spec, 0), torch.unsqueeze(atstfrnorm, 0), desed_training.sed_student)
here on detecting the feature I get an error RuntimeError: Expected 3D (unbatched) or 4D (batched) input to conv2d, but got input of size: [2, 1, 128, 1, 626]
for the last step I added the pull_back_preds to the current repo to be able to call it in the batched_decode_preds function as presented in the RCT repo.
Thank you for the help

Hi, have anyone written separate code for just inference, like loading the model, trained weights and running it on 10 s audios to get inference per file [may be some post processing too].
If anyone has done it, please help me with that, how to do it.
Thank you.

@martineghiazaryan @magicalvoice
I will write a quick inference script

so it supports any length of audio thank you very much for the time

will finish it by this weak ; )在 2024年7月11日，20:28，Martin Yeghiazaryan @.***> 写道：
@SaoYear hey any news from the script?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Hey guys, sorry for the late but I have update an inference file in the latest commit.
You could use the inference file by:
python -m inference
And the path of the waveform to be inferenced could be changed inside the code.
If you have any other problem, please let me know.

@SaoYear First of all, Thank you so much for your kind help!!
I have another question, How to interpret this result inference_result.png, like True False for each chunk based on a threshold, but which class it belongs ?
Also, I want to clarify a doubt, I read your paper "Fine-tune the pretrained ATST model for sound event detection", it is basically training and finetuning ATST-Frame model along with the help of CRNN, because DESED is quite small data for finetuning ATST-Frame? but then Who is Teacher and who is Student here in this case, cause I am getting confused by looking at results for both stages has student and teacher.
I am stuck with lot of questions, Please help, Thanks in advance!!

@SaoYear First of all, Thank you so much for your kind help!!
I have another question, How to interpret this result inference_result.png, like True False for each chunk based on a threshold, but which class it belongs ?
Also, I want to clarify a doubt, I read your paper "Fine-tune the pretrained ATST model for sound event detection", it is basically training and finetuning ATST-Frame model along with the help of CRNN, because DESED is quite small data for finetuning ATST-Frame? but then Who is Teacher and who is Student here in this case, cause I am getting confused by looking at results for both stages has student and teacher.
I am stuck with lot of questions, Please help, Thanks in advance!!

to decode the class names, I have import the class_dict dictionary in the inference.py file and each class name is assigned with an index of row in the sed_results matrix.

yes, this work is focus on finetuning the pretrained model for the small-scale DESED dataset.

as for you confusion about the student and teacher:
a. the student and teacher in this work are concepts from the MeanTeacher method, a semi-supervised method. So both student and teacher are referring the two models in the MeanTeacher method. You could refer to the original work of the MeanTeacher, but basically, the teacher model is just the exponential moving average (EMA) of the student model.
b. therefore, if we use the MeanTeacher semi-supervised method, there would be a student and a teacher model. So, in stage 1, we use MeanTeacher, there are a student and a teacher, but the teacher in the stage1 is the EMA of the student in the stage1. And in stage 2, we also use MeanTeacher, so there are also a student and a teacher in the stage2. And the teacher model in stage 2 is the EMA of the student model in the stage2.
c. using MeanTeacher for SED stems from the JiaKai's work, which is a winning system in 2018 DCASE challenge. Thereafter, the student and teacher models always appearred in the SED systems, because they all used the MeanTeacher methods.
d. specifically in this work, we find the previous semi-supervised methods are not only useful for the small models but also helpful for fine-tuning the pretrained models.

@SaoYear
Thank you for your inference code. I tried using my own audio with stage_2_wo_external and i got the following results

is it supposed to do this? the audio has parts of people talking.

Hi @SaoYear Thank you, I understood. after stage 2 training i.e fine-tuning both CRNN and ATST-Frame, can I only use CRNN weights differently, is there a way? if yes, how.

Hi @SaoYear Thank you, I understood. after stage 2 training i.e fine-tuning both CRNN and ATST-Frame, can I only use CRNN weights differently, is there a way? if yes, how.

@magicalvoice I never tried to do that. But I suppose that, only using the CRNN part of the ATST-SED shall not be better than a CRNN trained from scratch.
If you want to do that, you could just comment the ATST features and the merge layer MLP. And feed the CNN output to the RNN directly.
The CNN trained in ATST-SED is regarded as a compensation for some local features that ignored by FrameATST. And the RNN in the ATST-SED is traiend to learn the fused features from both FrameATST and CNN. If you want to use just the CRNN part of the entire model, the performance of both CNN and RNN would be weaken and therefore the overall performance would be weaken.

@SaoYear Thank you for your inference code. I tried using my own audio with stage_2_wo_external and i got the following results
is it supposed to do this? the audio has parts of people talking.

Hi @HeChengHui , would you mind to post the wav file? There could be some problems with the inference process.

@SaoYear
mixed.zip
the audio is >10s but the code seems to handle it by splitting and overlap.

Hi @HeChengHui , thanks for sharing the wav.
The splitting and overlapping are the intention of the inference. I have fixed some problems in the original inference code but I cannot push the repo so far. I will try to make it these days.
In the up-coming update,

the model is set to evaluation model (model.eval()) after loaded.
the visualization quality of sed results are improved.

According to the audio clip you provided, the SED results look like:

@SaoYear are you logging validation loss too ? where can I get that

@SaoYear are you logging validation loss too ? where can I get that

Sorry for the late response. The logging of validation loss is implemented in the ultra_sed_trainer.py line 477-491.
BTW, you could view it on the tensorboard, using the command:
cd YOUR_LOG_DIR
tensorboard --logdir ./ --bind_all

Hi @SaoYear, If I have to plot epoch V/s training loss and validation loss curves and training accuracy and validation accuracy curves, which metrics I should consider.
Also, while training, in the logs, what does "loss" represents ? which loss it is, how it is calculated?
Epoch 10:   3%|▎         | 3/110 [00:01<00:52,  2.05it/s, loss=0.152, v_num=0, train/step=1102.0, train/student/tot_self_loss=0.143, train/student/tot_supervised=0.0483, train/cnn_lr=0.0002, val/obj_metric=1.840]
I basically plotted this loss V/s val/obj_metric as training vs validation loss curve, is that correct ? for stage 2 For my own data I am getting this curve like this:


Fix flakey spec for lead school autocomplete

Context
This test is flakey due to random school names generated by Faker.
Changes proposed in this pull request
Hard code list of school names to avoid two potential sources of bugs:

Duplicate names that cause the assertion that the autocomplete contains exactly one match to fail.
Names that start with the same characters, e.g. Lakeacre High and Lakeacre High School causing the wrong school to be selected in the autocomplete.

Guidance to review
I tried using minimum: 1 rather than count: 1 in the assertion but this causes other issues. Also using unique in the factory causes many other tests to fail.
Important business

[x] Does this PR introduce any PII fields that need to be overwritten or deleted in db/scripts/sanitise.sql?
[x] Does this PR change the database schema? If so, have you updated the config/analytics.yml file and considered whether you need to send 'import_entity' events?

NB: Please notify the #twd_data_insights team and ask for a review if new fields are being added to analytics.yml

This had been the boss of flakes 🙏 🙏 🙏 🙏 🙏 🙏
Question - can we get rid of this line now:
expect(add_lead_school_to_user_page).to have_autocomplete_list_items(count: 1)

@AbigailMcP I think we do need that line still. When I tested it fails 2/50 times without that line with these errors:
 1) creating a new lead school for a user adding a lead school to a user with javascript works
     Failure/Error: expect(users_show_page.lead_schools.map(&:text)).to include("#{my_lead_school.name} - #{my_lead_school.urn}")
       expected ["Iceborough Secondary College - 1909705", "Add lead school"] to include "Mallowtown High - 3361276"
     # ./spec/features/system_admin/users/add_a_lead_school_to_user_spec.rb:108:in `and_i_see_the_new_lead_school'
     # ./spec/features/system_admin/users/add_a_lead_school_to_user_spec.rb:35:in `block (5 levels) in <main>'
     # ./spec/support/features.rb:43:in `block (2 levels) in <main>'
     # -e:1:in `<main>'

  2) creating a new lead school for a user adding a lead school to a user with javascript works
     Failure/Error: expect(users_show_page.lead_schools.map(&:text)).to include("#{my_lead_school.name} - #{my_lead_school.urn}")
       expected ["Iceborough Secondary College - 5824408", "Add lead school"] to include "Lakeacre High - 9554089"
     # ./spec/features/system_admin/users/add_a_lead_school_to_user_spec.rb:108:in `and_i_see_the_new_lead_school'
     # ./spec/features/system_admin/users/add_a_lead_school_to_user_spec.rb:35:in `block (5 levels) in <main>'
     # ./spec/support/features.rb:43:in `block (2 levels) in <main>'
     # -e:1:in `<main>'

I must admit I'm a bit confused. But my vague explanation is that if you don't wait for the autocomplete to have exactly one match you could end up with a mismatch because the JS hasn't caught up with the input.

I must admit I'm a bit confused. But my vague explanation is that if you don't wait for the autocomplete to have exactly one match you could end up picking the wrong school because the JS hasn't caught up with the input.

Ok i'm happy with that 🎉  I've also tried to fix this before and have been stumped!


Replay previous runs on songs just like how osu, kade engine and leather engine did those a long while ago.

What feature do you want to get added on the base engine?
Title.
To test your sight, and reliability, please select the option of what should NOT be requested.
Stage Editor and 6K+ support.

no.
i've seen another psych engine mod do this, and it absolutely breaks stages when you load a replay.

well ok


Leverage Bash associative arrays

It might be nice to consolidate the nested if ... else ... fi blocks into an iterative loop over a bash associative array.  As new installers are supported they can be added in a declarative manner instead of a deeply nested if block.
Pseudocode would look something like:
# Init
declare -a installers
installers=(
    ["Sierra"]="Install macOS Sierra.app",
    ["ElCapitan"]="Install OS X El Capitan.app",
    ["Yosemite"]="Install OS X Yosemite.app"
)
# Loop
for iso_name in "${!installers[@]}"; do
    installerExists "${installers[$iso_name]}"
    result=$?
   if [ ${result} -eq 0 ] ; then
       createISO "${installers[$iso_name]}" "${iso_name}"
       exit 0
   fi
done
# Failure
echo "Could not find any installer"
exit 1

Associative arrays are only supported in Bash 4. I am running Sierra, and Sierra still has Bash 3.


recommend a system for monitoring VM usage.

What is a recommended system for monitoring system load of VMs over time and displaying the results on a web page? The system should have a small agent that communicates with the server by http. I think that we need to set this up on:

external with the internet connection: digitalcorpora.vse.gmu.edu
internal with all the storage: digitalcorpora.vsnet.gmu.edu

I want to monitor:

system load
web connections
uptime
disk space.

Please post suggestions below. Thanks!

We've decided not to do this, as the system no longer requires a dedicated VM.


Use sed instead of ANIMATE_REGRESSION_TEST

Rather than confusing the demo content with environment variables, we should apply specific modifications with sed when running the test suite.

Just so I don't step on your toes too much, can I take this and #110 as well, and do what I did in goalie? :)

Just so I don't step on your toes too much, can I take this and #110 as well, and do what I did in goalie? :)

Honestly it's fine - take any issue you like! I only assign things to myself as a reminder to work on them.


consumePurchaseAndroid Not working in version 3.3.5

Version of react-native-iap
3.3.5
Version of react-native
0.59.9
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
calling RNIap.consumePurchaseAndroid() should remove consumed packages from getAvailablePurchases()
Actual behavior
Items still returning from getAvailablePurchases() and when we try to consume them it throws bellow error for every RNIap.consumePurchaseAndroid(purchase.purchaseToken) call
Tested environment (Emulator? Real Device?)
Steps to reproduce the behavior
const availablePurchases = await RNIap.getAvailablePurchases();
availablePurchases.forEach((purchase)=>{
       // Each of this call is throwing below mentioned error
       RNIap.consumePurchaseAndroid(purchase.purchaseToken);
});

If there are 3 packages i get bellow error thrice and packages are still available in getAvailablePurchase()
Error: Google is indicating that we have some issue connecting to payment.
Error: Google is indicating that we have some issue connecting to payment.
at createErrorFromErrorData (blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:15917:17)
at blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:15869:27
at MessageQueue.__invokeCallback (blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:16746:18)
at blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:16477:18
at MessageQueue.__guard (blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:16650:13)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:file:///5763777c-30bd-4220-b6d5-6644ff59a553:16476:14)
at e (file:///usr/lib/react-native-debugger/resources/app.asar/js/RNDebuggerWorker.js:1:136705)

It looks like the connection issue with google payment backend.

Hey @hyochan All other functionalities like make purchase, get packages are working, except RNIap.consumePurchaseAndroid(purchase.purchaseToken); otherwise RNIap.getAvailablePurchases() should not be working

Are you sure you are trying to consume purchase that is consumable?

yes I am doing this
if (Platform.OS === 'android') {
            // If consumable (can be purchased again)
            RNIap.consumePurchaseAndroid(purchase.purchaseToken);
            // If not consumable
            RNIap.acknowledgePurchaseAndroid(purchase.purchaseToken);
}

For non consumable I am sending acknoledgement and for  consumable I am  consuming

I can't actually tell why this is happening right now. Could you also try consumeAllItemsAndroid?

Yes, I Just tried , It gives following error :
YellowBox.js:67 Possible Unhandled Promise Rejection (id: 0):
Error: No purchases found
Error: No purchases found
    at createErrorFromErrorData (blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:15917:17)
    at blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:15869:27
    at MessageQueue.__invokeCallback (blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:16746:18)
    at blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:16477:18
    at MessageQueue.__guard (blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:16650:13)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (blob:file:///aba788d7-09e6-4f01-82e6-1ea46d6b8368:16476:14)
    at e (file:///usr/lib/react-native-debugger/resources/app.asar/js/RNDebuggerWorker.js:1:136705)

I am using this in sandbox enviroment

@ashutosh-s Try using await using consumePurchaseAndroid and see the results.

I am getting this
 Error: Google is indicating that we have some issue connecting to payment.
    at createErrorFromErrorData (NativeModules.js:155)
    at NativeModules.js:104
    at MessageQueue.__invokeCallback (MessageQueue.js:414)
    at MessageQueue.js:127
    at MessageQueue.__guard (MessageQueue.js:314)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126)
    at e (RNDebuggerWorker.js:1)

I am not sure yet. Hope this can help https://support.google.com/googleplay/answer/1050566?hl=en-GB.
Also try to put developerPayload

I tried putting developer payload erlier . stuck from some time :-) appreciate all the help you have done so far

@hyochan @ashutosh-s Hi men, i have the same problem. It was working few times, then it stopped working and i receive the following error:
The service is disconnected (check your internet connection.)
I checked the connection and it's not the problem.
When using consumeAllItems, every items are consumed as expected but if we have non-consummables products, it is definitely a problem.
Hope guys will help me to have a solution to that problem.
Thanks

And please where can i find the developperPayload ?

I'm using react-native-iap: 3.3.6  && react-native: 0.59.8

I had to put await when calling acknowledgePurchaseAndroid or consumePurchaseAndroid. Looks like 'then statement' is not working. not sure why.
if (Platform.OS === 'android') {
            // If consumable (can be purchased again)
            await RNIap.consumePurchaseAndroid(purchase.purchaseToken);
            // If not consumable
            await RNIap.acknowledgePurchaseAndroid(purchase.purchaseToken);
}


Refactor Makefile

Goal is to ease cross-compilation:

add PROTOC and PROTOC_PLUGINS_PATH variables
add GOOGLEAPIS_ASSISTANT_PATH variable with API path and version
remove references to /usr/local by using pkg-config
remove redefinition of default variable CXX
use default variable AR
fix broken target $(GOOGLEAPIS_ASSISTANT_CCS:.cc=.h)
add protobufs and clean to PHONY target
add a HAS_PKG_CONFIG variable to avoid it if not available

This looks good to me, thanks.


new openai realtime api

Hey would be cool to support speech-to-speech Realtime API from OpenAI
Is there any plans for that?

would be also cool to have option to automatically start voice session when opening the assistant instead of clicking microphone button

Probably it will not be added to SpeakGPT until official OpenAI SDK is released or aallam-openai library is updated to support it.


Cordova push notification - PushNotification is not defined whenever i run the example

I am getting Uncaught ReferenceError: PushNotification is not defined whenever i run the example..
I have installed this plugin - cordova plugin add phonegap-plugin-push
and android libraries from SDK manager

Android Support Library version(obsolete) 23.2.1
Android Support Repository version 35
Google Play Services version 31
Google Repository version 31

This is the line i am getting error
var push = PushNotification.init({
using Nexus HTC device
cordova --version is 6.3.0
cordova platform android version is 5.2.1
Plugin version
phonegap-plugin-push tried both 1.3.0 and 1.6.0 as well
What is the problem and how can i fix this ?

Issue resolved - received registration id as well.

How did you fix it?

I have Re-install Android Support Library and on device ready I have called
push method  - PushNotification.init({
For now I got registration id and working on to get notification on mobile device.


Move content of veracruz-docker-image repository directly in veracruz

The veracruz-docker-image repository contained artifacts that we did not necessarily want to add to the main veracruz repository (mainly to avoid bloating it). Later developments have since significantly reduced the size, leaving us with unnecessary procedural overhead of needing pull requests in both repositories.
Unfortunately git does deal very well with deleting a submodule and adding a directory with the same path, so you will need to remove the docker directory before you can checkout/pull. You also might want to save aws-nitro-enclaves-cli to avoid a long rebuild.
mv docker/aws-nitro-enclaves-cli .
rm -rf docker
git checkout pr/docker-merge
mv aws-nitro-enclaves-cli docker

+1+1 = +1 reached, merging.


[ssr] Improve integration test infrastructure

Description
Task to improve the integration test infrastructure used in lit-ssr:

[ ] Consider whether web-test-runner can be used on the client instead of mocha
[ ] Consider adding suites to break up tests
[ ] Consider allowing the basic_test runner to run multiple files-worth of tests

Closing for now, though we could potentially take advantage of https://github.com/lit/lit/issues/2351 in our own tests.


helps with tasks, and passing void * parameters

From your book:
In FreeRTOS we define a task as a C function that takes a void * parameter. For
example,
void myTask(void *myParameters)
might be a signature for a task function.
Any suggestions on how best to approach that?
Like, if i start up a message Processor, the task would have a pointer to  BLE Characteristic
so,
someMessage->start(pointerToData)
bool initiateProcessMessageTask(BLECharacteristic *pCharacteristic)
{
	ProcessMessage *pProcessMessage = new ProcessMessage();
	pProcessMessage->setName("ProcessMsg Task");
	pProcessMessage->setPriority(2);
	pProcessMessage->setStackSize(36 * 1024);
	pProcessMessage->start(pCharacteristic);

	return 1;
}

class ProcessMessage : public Task
{
	void run(void *run_data)
	{
        BLECharacteristic processData = *(BLECharacteristic *)run_data;
		ESP_LOGI(TAG, " this is the message, maybe: %s: ", processData->getValue);

what would it look like in the task?

@wegunterjr
That code you pasted looks good to me, what else would you like to know/change?


Bump version to 1.2.9.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.52%. Comparing base (bdfde91) to head (c58a5b5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #313   +/-   ##
=======================================
  Coverage   97.52%   97.52%
=======================================
  Files          35       35
  Lines        2262     2262
  Branches      231      231
=======================================
  Hits         2206     2206
  Misses         55       55
  Partials        1        1

Flag
Coverage Δ

unittests
97.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add delay and duration parameters for the JFR telemetry device

The JFR telemetry device while very useful, currently, only captures flight recordings from the time that ES starts until it's been stopped. This makes it hard to grab more focused JFRs for specific tasks, e.g. the scroll task in http_logs.
The current workaround is to leverage include|exclude tasks to reduce the amount of operations but often it's not an option as indexing usually needs to take place anyway and also skipping preceding tasks tends to affect reproducability.
Until we get a way to coordinate tasks and telemetry device execution in Rally, a short-term improvement could be allowing to pass the delay and duration parameters to jcmd, as per the official jcmd docs for JFR.start. Currently we only support one parameter (recording-template) for the jfr telemetry device, and adding those two should be a straightforward task.

Hey @dliappis, if this issue is up for grabs then I'd like to take it up.

@debanjanc01 sure go for it.

Thanks @dliappis ! Could you please assign this to me?

Thanks @dliappis ! Could you please assign this to me?

Done

@dliappis I've raise the PR for this.


Task/unit tests service

This pull requests contains unit tests for Service API.

This change is

Codecov Report

Merging #41 into master will increase coverage by 2.33%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #41      +/-   ##
============================================
+ Coverage      68.4%   70.74%   +2.33%
- Complexity      216      549     +333
============================================
  Files            24       54      +30
  Lines           671     1791    +1120
  Branches         16       73      +57
============================================
+ Hits            459     1267     +808
- Misses          207      482     +275
- Partials          5       42      +37

Impacted Files
Coverage Δ
Complexity Δ

...m/rest/service/data/PricedEventRepresentation.java
67.34% <ø> (ø)
13 <0> (?)

.../rest/service/data/PricedOptionRepresentation.java
77.58% <ø> (ø)
17 <0> (?)

...st/service/data/EventDefinitionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...st/service/data/PricedParameterRepresentation.java
60.56% <ø> (ø)
20 <0> (?)

...st/service/data/ParameterOptionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...service/data/OperationParameterRepresentation.java
97.56% <ø> (ø)
17 <0> (?)

...est/service/data/RoleDefinitionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...cm/rest/service/data/PricedRoleRepresentation.java
95.45% <ø> (ø)
16 <0> (?)

...ervice/data/ParameterDefinitionRepresentation.java
94.18% <ø> (ø)
31 <0> (?)

...cm/rest/service/data/PriceModelRepresentation.java
98.61% <ø> (ø)
27 <0> (?)

... and 36 more

Codecov Report

Merging #41 into master will increase coverage by 2.33%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #41      +/-   ##
============================================
+ Coverage      68.4%   70.74%   +2.33%
- Complexity      216      549     +333
============================================
  Files            24       54      +30
  Lines           671     1791    +1120
  Branches         16       73      +57
============================================
+ Hits            459     1267     +808
- Misses          207      482     +275
- Partials          5       42      +37

Impacted Files
Coverage Δ
Complexity Δ

...m/rest/service/data/PricedEventRepresentation.java
67.34% <ø> (ø)
13 <0> (?)

.../rest/service/data/PricedOptionRepresentation.java
77.58% <ø> (ø)
17 <0> (?)

...st/service/data/EventDefinitionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...st/service/data/PricedParameterRepresentation.java
60.56% <ø> (ø)
20 <0> (?)

...st/service/data/ParameterOptionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...service/data/OperationParameterRepresentation.java
97.56% <ø> (ø)
17 <0> (?)

...est/service/data/RoleDefinitionRepresentation.java
96.42% <ø> (ø)
11 <0> (?)

...cm/rest/service/data/PricedRoleRepresentation.java
95.45% <ø> (ø)
16 <0> (?)

...ervice/data/ParameterDefinitionRepresentation.java
94.18% <ø> (ø)
31 <0> (?)

...cm/rest/service/data/PriceModelRepresentation.java
98.61% <ø> (ø)
27 <0> (?)

... and 36 more


Add github action for automatic channel creation

When a new PR is opened that contains a modified driver, a new channel should be created with that driver assigned and an invite link should be posted on the PR

This is now in what I consider a good state. Only one invite/channel should be created per PR.
Let me know if you can think of a corner case I might have missed.
Future enhancements I could add now, depending on how folks feel:

deleting the channel after the PR is closed/merged

Current limitations I'm aware of:

if one commit includes changes to a driver, and then those changes are reverted in a later commit, the channel will still have that version of the driver. I can't think of any way to avoid this.


Mg/dirac

I have addressed most of the comments from PR#2 and modified the readme file accordingly.

Hi Lokesh, I believe you wanted to open a PR targeting the branch in #25, not main.  I changed the target branch for you, but for the record you can do it by clicking on the "edit" button on the right side of the title bar: when you click that, the target branch becomes a drop-down menu where you can choose a different branch.


Clarify Transaction Token Context

In section 2.2.1 the context that may be included in a transaction token includes "The external authorization token (e.g., the OAuth access token)". To ensure this is not interpreted to mean that an access token is included in a transaction token, I would suggest the following additions, in line with section 9.3 in Security Considerations:
"A reference to the external authorization token (e.g., the OAuth access token), including scopes or claims included in the authorization token, but not the unmodified authorization token (see Security Considerations, Section 9.3)"

Pieter, in that section of the spec we are describing what needs to be sent to the Transaction token service, I think in that case the full access token should be passed. However, when generating the request context, we want to ensure that the full access token is not included. Did I get my spec sections wrong?

Maybe instead we shouldn't say "This context MAY include:" but rather ... "The information provided to the Txn-Token Service MAY include" to not confuse readers who might think this data should be included in the request context.

Agreed - I missed that this was for initial token creation. I did create a PR with your suggested text.

PR approved


Strict-Transport-Security header does not support 'preload'

To allow for HTTPS pinning, browsers can check for the value of preload in Strict-Transport-Security header. Hyper doesn't support this.

see https://hstspreload.org/

Thanks to StrictTransportSecurity having all of its fields public, it's a breaking change to add a new one, so adding this would need to be part of 0.12. (While in there, the fields should be made private with getter and setter methods instead, so we can add more fields in the future...)

Hello, if no one is working on this I would like to start an implementation

I haven't seen a pull request, so fair game! Note that as pointed out earlier, this would be a breaking change and so couldn't be released soon...

For now, the new version of hyper won't be including the typed headers directly, so I'm closing this here as a won't fix.


Tests in the tests/interop folder are not being run

None of the tests in https://github.com/hjdivad/ember-m3/tree/master/tests/interop seem to be running right now, probably because the interop folder is not being picked up. I am not yet clear on whether this broke at some point, or never worked :(

These tests are only run in CI by default (or whenever the full ember-data package is present) since they depend on the full experience vs the stripped down experience. You can see recent test output with them in it here: https://github.com/hjdivad/ember-m3/pull/784/checks?check_run_id=809809517
This is determined at build time here: https://github.com/hjdivad/ember-m3/blob/master/ember-cli-build.js#L26-L30


[Quest issue] Can we drop support for IE9/10?

I would like to gather some feedback from all of you who use ember-bootstrap for your projects, if you still have a hard requirement to support IE 9 and 10!
The current version (1.0.0-rc.2) does support IE9 and 10, but there are quite a few good reasons for dropping it:

continuing to support them will occur additional development costs, directly in this addon, or in upstream dependencies (e.g. https://github.com/kybishop/ember-popper/issues/42)
although the RFC to drop support for IE9/10 in Ember 3.0 itself is still open, support for that move seems to be overwhelming
They have reached end of life, Microsoft itself does not support them, does not fix bugs, even security issues

The downside of such an eventual move would of course be a breaking change, that might lead users that still have to support them for whatever reason without an upgrade path.
So please give some feedback here, if you still have IE9/10 support as a requirement, or if you feel comfortable dropping support for them! Thanks a lot!

In case it helps, ember-power-select which this addon uses, does't support IE9 already. It has been that way for at least a year. Not a single person ever complained.

BS4 supports IE10+ but dropping IE9 and IE10 in ember-boostrap would speed up development, e.g., IE10 scores a ridiculous 265 in HTML5test.
As a user, I use ember-bootstrap for evergreen browsers only.

IE11 support is all my webapp needs, dropping IE9/10 should be no big deal for us.

I would be quite happy to see IE 9/10 dropped. The main ember project is also considering the same for Ember 3.0 (https://github.com/emberjs/rfcs/pull/252) and comments in the RFC seems pretty strong for dropping 9/10.

IE9 shouldn't need to be supported anyway as bs4 doesn't. I have no issues with it

No problem here. We'll have to figure out the messaging for BS3 users.

We don't support IE9/IE10 on an app I'm using this addon on. :+1: on dropping support for both of them

In favor of dropping support for IE 9 & 10.

Seems we all agree here unanimously. That's how it should be then...
Thanks all for the valuable feedback!


Online Chart Generator   Build on Chart.js & ChartNew.js

i Make a  Site Build on Charts.js Api & ChartsNew.js.
it's a Chart Builder with live preview .
take a look LiveGap Charts

Looks nice. I'm wondering if we can make a "Related Projects" and "Third Party Packaging" wiki page for stuff like this.

@fulldecent Perhaps moving Community Extensions to it's own page would make the most sense?

@nnnick Can we turn on Wiki for stuff like this?

Nice one, thanks!

@omarsedki Could you please let us know if LiveGap will support Chart.js v2?

yes, i think  a beta version  of it will be  online  at the end of june.

Hello, since we last spoke, this was only available for version 1 of Chart.js, which we are not currently working on anymore. I am closing this issue now. Please shout if your project fully supports Chart.js 2, and then we can reopen this issue for evaluation.

Livegap chart.js generator (beta) is availble in http://charts.livegap.com/chart.js


Question about dataset for training ?

Thank you for great research. I have a question about field keypoints in dataset. Why number keypoint very large 882 while max keypoint in deepfastion  is 38 .

Deepfashion2 defines 13 categories of clothes. Each category has an independent definition of keypoints. The total number of all the keypoints of the 13 categories is 293. Since a keypoint is represented by (x, y, confidence), the final number of output is 293 * 3 = 882.

@ShenhanQian  thank you for your support. I want to write script to test single image. What step preprocessing i need ?
I visualize keypoints and box but a lot of keypoint in pictures. How can i preprocessing keypoints after model inference.

You see a lot of points because you have plotted all the 293 keypoints of all 13 categories.
You just need to select the keypoints of the predicted category for each clothing instance.

@ShenhanQian  oh my god. My bad.
I am use function inference_detector in mmdetection to inference. Do i need to use any preprocessing like NMS or something else to get final output. I see a lot of box in same object

Can you explain  Why lenght of detection is 13 correspond to 13 class but score only 10.

The output is already processed by NMS. For each instance, if multiple bbox results are provided, they should belong to different clothing categories. You can either keep all of them for a high recall rate or simply take the one with the highest confidence score.

Thank you so much.


ISPN-13976 fix indentation in sec roles examples

ISPN-13976
Needs backport to 13.0.x

Thanks @tristantarrant . Should be fixed now

Merged, thanks


Add unit tests for rpkg commands

This change introduces unit tests to some of the rpkg commands.

/retest

/lgtm
/approve

This PR adds unit tests for the fix for https://github.com/nephio-project/nephio/issues/562


Added ability to delay destroying of highcharts for animations.

I've added the ability to delay destroying of highcharts to let animations finish without a memory leak.

I've found a solution. chart.destroy() needs to be called for there to be no memory leak. However, if you wait a delay inside the beforeDestroy event, this.chart becomes null and you cannot call destroy() on it. Highcharts, however, saves all the charts globally in Highcharts.charts. If you store the chart id in beforeDestroy, wait a delay for a transition to finish, then call the destroy() function on the chart stored in the Highcharts.charts array, the problem is solved.
I've forked the repo and added a destroyDelay prop that gives the option of putting in a millisecond amount before the highcharts is destroyed. I've run the build process, forked the repo, and opened a pull request. Please feel free to change the prop name.


Implement versioning of DCAS

This is not just for journals. It's just good practice ;)

Suggestion:

adopt Semantic versioning https://semver.org/
each major version is its own "category", which generates a "subdirectory", e.g, datacodestandard.org/v1
creating a new version means creating a new category, and copying all files there.
minor versions should be hard-coded (a decision made), and configured in _data/v1.yml or something like that.
patches are automatically generated by the converting the date into a string

Note: we need to separately define what's get versioned. There will be additional endorsers. The endorsement page should likely be included in the archived version, get a patch number - but should it also be archived on Zenodo with a new DOI?
One thought is that endorsements are collected on a quarterly basis, and then archived, but a V1.0 is referenced on Zenodo by the same "master" DOI. Minor versions create a new "master" DOI at Zenodo.
Thoughts?

Sounds fine to me. (This is not something for Release 1.0). Patch version should be displayed, can correspond to the commit (short version).
Needs a document/page to describe this.
Also needs implementation (preferably code) to do the versioning to URL/v1 = v1.0 in the displayed HTML, preferably linked to Github versions. The plumbing can get complicated there.
--
Lars Vilhuber, Economist
Cornell University
p: +1.607-330-5743
https://calendly.com/larsvilhuber
My working day may not be your working day. Please respond during your working day.

From: Miklós Koren @.>
Sent: Thursday, December 15, 2022 05:07
To: social-science-data-editors/DCAS @.>
Cc: Lars Vilhuber @.>; Comment @.>
Subject: Re: [social-science-data-editors/DCAS] Implement versioning of DCAS (Issue #5)
I agree on SemVer. Decide

what gets versioned
what are major, minor, patch revisions
what user see.

Implementation can follow. My suggestions:

Only text of standard: rules.csv. Not journal list, not explainers. So that versions change infrequently and many journals can join 1.0.
Major revision: if you comply with 1.x, you may not comply with 2.x. Basically, where severals journals could say "I did not sign up for this." Minor revision: Changes in rule numbering, clarification etc, but without breaking compliance. Like changing where we talk about omissions or adding a rule that only clarifies existing criteria. 1.0 -> 1.1 may create some small confusion for authors checking the site ("wasn't this rule 16?") but nothing that endangers compliance. Patch: language edits, fixing typos, but holding the structure of rules.csv constant.
The URL https://datacodestandard.org resolves to the lates version. https://datacodestandard.org/v1 or https://datacodestandard.org/v1.0 point to specific versions. Only the most recent patches are not displayed, with maybe a list of version history. Zenodo is updated with minor revisions, not with patches.

—
Reply to this email directly, view it on GitHubhttps://github.com/social-science-data-editors/DCAS/issues/5#issuecomment-1352828473, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVSQ6HZJSCBSVUHLURNOK3WNLUUVANCNFSM6AAAAAASUO4534.
You are receiving this because you commented.Message ID: @.***>

I am happy to work on the plumbing!


[Feature]: Heartbeat Monitoring

🏷 Feature Request Type
New Monitor
🔖 Feature description
Please add Heartbeat Monitoring just like in HetrixTools.
✔ Solution
Add a new monitor type which shows server's network usage, ram usage, disk and cpu usage and gives alert when usage is close to 90% so people know it's time to upgrade or add a new node.
❓ Alternatives
HetrixTools
📝 Additional Context
No response
👀 Have you spent some time to check if this feature request has been raised before?

[X] I checked and didn't find similar feature request

Nope, HetrixTool has Hearbeat Monitoring Under Uptime Monitoring Product.

Sounds like maybe you should be using HetrixTools then as you’re obviously a fan.

Nope, HetrixTool has Hearbeat Monitoring Under Uptime Monitoring Product.

What you are asking here is out of scope (perhaps for now), full stop.
Unless you are willing to code it yourself, wait until the UK developer does it.
Surely you understand that everyone who develops and contributes to a free and open-source product dedicates their free time to do so. The feature that you are asking for is from a paid product, there is a reason why it's paid, the money goes to a developer for their hard work.

Everyone relax🐻.
Just follow one rule.
Ignore it if you don't like it.

I use https://www.netdata.cloud/

@zimbres, this is amazing and Open Source. Hmm, I think I might have this running for my client reports... I will keep using the UK for internal services as those don't require reports generated. Thanks for sharing the tool name!
PS: Perhaps the UK might use some of the source code or take inspiration from that tool as it looks quite nice.

This should works like hetrixtools works, that you  can get also stats about ram, CPU, disk, network, etc. displayed in graph on status page.

Here we go again with Hetrix tools.
I wonder if all these folks suggesting UK work like Hetrixtools just want the HT functions cos they want the unlimited HT functionality without paying for it.
Sounds like it doesn’t it? 🤷🏻♂

@ririko5834 the basic answer to your request is "maybe in the future".
UptimeKuma is a relatively simple uptime monitoring application running on NodeJS. not saying that NodeJS is a bad language. Still, I am nearly pointing out that a different language is more favourable due to performance requirements for what you are asking.
As @markdesilva pointed out, and I agree with them, if you favour Hetrix Tools, you need to support the developer by getting a paid plan. UptimeKuma may be an open-source project for now, but I'm sure that when the time comes, the author will also want to have their own paid plans alongside Open Source for those people who don't want to have a hustle of setting one up themselves.
That being said, keep in mind that, as pointed out by @ImmaZoni, to know the server's hardware status, the author will require developing and requesting to installing of a separate "companion" app on the server, which will push the CPU, RAM, etc. information to UptimeKuma. If the last stable release (v1.14.0) is anything to go by, the author wants this application to just run without any additional hoops to jump through (ref. to Cloudflare proxy functionality).

@ririko5834 the basic answer to your request is "maybe in the future".
UptimeKuma is a relatively simple uptime monitoring application running on NodeJS. not saying that NodeJS is a bad language. Still, I am nearly pointing out that a different language is more favourable due to performance requirements for what you are asking.
As @markdesilva pointed out, and I agree with them, if you favour Hetrix Tools, you need to support the developer by getting a paid plan. UptimeKuma may be an open-source project for now, but I'm sure that when the time comes, the author will also want to have their own paid plans alongside open-source for those people who don't want to have a hustle of setting one up themselves.
That being said, keep in mind that, as pointed out by @ImmaZoni, to know the server's hardware status, the author will require developing and requesting to installing of a separate "companion" app on the server, which will push the CPU, RAM, etc. information to UptimeKuma. If the last stable release (v1.14.0) is anything to go by, the author wants this application to just run without any additional hoops to jump through (ref. to Cloudflare proxy functionality).
EDIT:
Almost forgot, @zimbres also noted that there is another open-source tool called netdata that you can use to monitor server hardware status.

Hey you don't have to install anything on the server just need to let uptime-kuma the option to connect via ssh to every server and get these info then parse it to the status page.
I have made a bash script that send details like this to my email once it pass the 75% disk usage same goes to the ram and CPU.
I just need to find the right way to send the data to uptime-kuma now for it to send it to me via telegram.

@InSelfControll

Hey you don't have to install anything on the server just need to let uptime-kuma the option to connect via ssh to every server and get these info then parse it to the status page.

Do you even realise how dangerous this is? Openly allow an application (of all things) to have access to a server via SSH? It's almost as if security holed don't exist. So now the hacker instead of hacking six of my servers only need to hack one of my servers and get SSH access to all the other servers.
The best and most secure way is to have a dedicated client application that would receive a request (be it via the web URL or else), process it and send a response JSON to an API on the UK side, or alternately just send the JSON data with an interval, so there is only one way communication from server to UK.
What you've proposed breaks the security best practises on so many levels.
UK - UptimeKuma

This user doesn't need any permissions except df -h, free -m commands you always can minimized the commands of a user to only 1/2 commands or give the user limited ssh access to only send this commands via ssh @rihards-simanovics, you don't have to give fully login access to ssh so no security issues.
Today I have it automatically send to my email / telegram from each server.

This user doesn't need any permissions except df -h, free -m commands you always can minimized the commands of a user to only 1/2 commands or give the user limited ssh access to only send this commands

I did think of that, that being said it is still a very junky solution. Besides, it's already been mentioned in this discussion that much better paid applications are available. If you have enough servers to warrant am advanced system like that perhaps it's time to get the wallet out.

This user doesn't need any permissions except df -h, free -m commands you always can minimized the commands of a user to only 1/2 commands or give the user limited ssh access to only send this commands via ssh @rihards-simanovics, you don't have to give fully login access to ssh so no security issues.
Today I have it automatically send to my email / telegram from each server.

Again, it's almost as if security holes don't exist, you are playing an extremely dangerous game by even allowing the potential hacker to login. Look I'm no security expert but I can guarantee you gaining access as a "limited user" is a first step to a full blown hack, so lets not.

The other option is to fix the push passive monitor, and let users to send
custom messages in it.
Now the only message it sends is "ok" kinda useless message.
I want to send the script output via curl into the push passive monitor
instead just receiving "ok" message.
Now each of my VMS runs the script all the time and if the disk usage is
more then 85% I receive an email with the status and details about the disk
usage.
On Tue, Dec 20, 2022, 07:58 Rihards Simanovičs @.***>
wrote:

This user doesn't need any permissions except df -h, free -m commands you
always can minimized the commands of a user to only 1/2 commands or give
the user limited ssh access to only send this commands
I did think of that, that being said it is still a very junky solution.
Besides, it's already been mentioned in this discussion that much better
paid applications are available. If you have enough servers to warrant am
advanced system like that perhaps it's time to get the wallet out.
This user doesn't need any permissions except df -h, free -m commands you
always can minimized the commands of a user to only 1/2 commands or give
the user limited ssh access to only send this commands via ssh
@rihards-simanovics https://github.com/rihards-simanovics, you don't
have to give fully login access to ssh so no security issues.
Today I have it automatically send to my email / telegram from each server.
Again, it's almost as if security holes don't exist, you are playing an
extremely dangerous game by even allowing the potential hacker to login.
Look I'm no security expert but I can guarantee you gaining access as a
"limited user" is a first step to a full blown hack, so lets not.
—
Reply to this email directly, view it on GitHub
https://github.com/louislam/uptime-kuma/issues/819#issuecomment-1358876746,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZOWTAC7PIYMXREERY3JFTWOFDI7ANCNFSM5G4F6O4Q
.
You are receiving this because you were mentioned.Message ID:
@.***>

Maybe I don't quite understand your description, but the status msg can take any message. It does not accept the messages in quotes like "Service is up" but it will take URL spaces as in %20. Eg:
attl=`/usr/bin/ping -c 1 <UK server IP> | tail -1 | /usr/bin/cut -d"/" -f 5`

/usr/bin/curl -k "https://<UK server IP>:3001/api/push/XXXXXXXXX?msg=Service%20is%20up,%20ping%20time%20is%20$attl&ping=$attl"

As you can see, you can even pass variables (in this case the ping time to the UK server).
Then your UK will show this:

If you're using a linux machine, normal users (non root, no sudo) have access to to cat /proc/cpu info and cat /proc/meminfo, as well as df and can use cut, sed, awk, grep whatever info they need and pass it into the status message. For windows I think there are equivalent Powershell commands normal users can use to get the values for cpu usage, memory usage and disk usage (Get-Volume).
Hope it works for you.
Cheers!

The other option is to fix the push passive monitor, and let users to send custom messages in it. Now the only message it sends is "ok" kinda useless message. I want to send the script output via curl into the push passive monitor instead just receiving "ok" message. Now each of my VMS runs the script all the time and if the disk usage is more then 85% I receive an email with the status and details about the disk usage.

@markdesilva this seems like a better solution, but would this generate a notification? @InSelfControll needs this to see what the status of the hardware is on their telegram.

With push notifications I get it directly to my teams / telegram as it should be.
I'll keep testing it and update.

@InSelfControll,
Hi, so from what I understand UK only reports on either status up or down. Once a status is reported, unless it changes (from up to down or down to up) it will not report. UK works that way for all reports. The idea behind this is so UK won't spam you multiple times via email. telegram etc. while you away from your system and can't check to rectify the error.
The only way to keep reporting the critical error is to keep keep flipping the status between up and down.
When you first report it down, store that some where, when it next reports check the previous status, and if its "down", change your url status to "up" and replace the stored status. The next time it checks the stored status, it will be "up" so then it will  change the status to "down" and so on. For your code:
#!/bin/bash

# Get disk usage
disk_usage=`/usr/bin/df -h | /usr/bin/grep "extmedia2" | /usr/bin/awk 'END {print $5}' | /usr/bin/tr -d "%"`

# Check status file and flip status for continuous notices
if [ -f /tmp/du.status ]; then
   if [ `cat /tmp/du.status` == "up" ]; then
        echo "down" > /tmp/du.status
   else
        echo "up" > /tmp/du.status
   fi
else
   echo "up" > /tmp/du.status
fi

udstatus=`cat /tmp/du.status`

# Check if disk usage is higher than 85%
if [ $disk_usage -gt 1 ]; then
  # Send push notification
  /usr/bin/curl -k "https://<IP_ADDRESS>:3001/api/push/**********?status=$udstatus&msg=Disk%20Usage%20is%20high:${disk_usage}%25"
fi

Take note, this will keep spamming you until you pause the monitor or disable the cron for the script.
Honestly I think the default of only sending the message once is the right way to go. Hope this helps.
@louislam if you have time and you think it is useful, maybe there can be an option in the monitor to allow for "down" status to keep repeating until admin intervenes.
Cheers!

Hi,
Thanks for your reply.
I think this option should be in UK that it'll repeat it every X times if the issue didn't fixed.
Let's say it repeats 4 times each time after 1 minute after 3 times the report will changed into critical and the fourth time will be sent via email by the script.
UK will keep reporting every time till it fixed only on issues.

@InSelfControll,
Hi, so from what I understand UK only reports on either status up or down. Once a status is reported, unless it changes (from up to down or down to up) it will not report. UK works that way for all reports. The idea behind this is so UK won't spam you multiple times via email. telegram etc. while you away from your system and can't check to rectify the error.
The only way to keep reporting the critical error is to keep keep flipping the status between up and down.
When you first report it down, store that some where, when it next reports check the previous status, and if its "down", change your url status to "up" and replace the stored status. The next time it checks the stored status, it will be "up" so then it will  change the status to "down" and so on. For your code:
#!/bin/bash

# Get disk usage
disk_usage=`/usr/bin/df -h | /usr/bin/grep "extmedia2" | /usr/bin/awk 'END {print $5}' | /usr/bin/tr -d "%"`

# Check status file and flip status for continuous notices
if [ -f /tmp/du.status ]; then
   if [ `cat /tmp/du.status` == "up" ]; then
        echo "down" > /tmp/du.status
   else
        echo "up" > /tmp/du.status
   fi
else
   echo "up" > /tmp/du.status
fi

udstatus=`cat /tmp/du.status`

# Check if disk usage is higher than 85%
if [ $disk_usage -gt 1 ]; then
  # Send push notification
  /usr/bin/curl -k "https://<IP_ADDRESS>:3001/api/push/**********?status=$udstatus&msg=Disk%20Usage%20is%20high:${disk_usage}%25"
fi

Your UK will look like this:

Take note, this will keep spamming you until you pause the monitor or disable the cron for the script.
Honestly I think the default of only sending the message once is the right way to go. Hope this helps.
@louislam if you have time and you think it is useful, maybe there can be an option in the monitor to allow for "down" status to keep repeating until admin intervenes.
Cheers!

With push notifications I get it directly to my teams / telegram as it should be. I'll keep testing it and update.
The issue now that's the monitor get the heart bit but never send the message more than once.
Example: (for the test I did a check that check if the disk_usage is higher than 1% it should send critical alert)
#!/bin/bash

# Get disk usage
disk_usage=`/usr/bin/df -h | /usr/bin/grep "fedora" | /usr/bin/awk 'END {print $5}' | /usr/bin/tr -d "%"`
disk_usage1=`/usr/bin/df -h | /usr/bin/grep "fedora" | /usr/bin/awk 'END {print $5}'`

# Check if disk usage is higher than 85%
if [ $disk_usage -gt 1 ]; then
  # Send push notification
  /usr/bin/curl -k "http://<IP_ADDRESS>:3001/api/push/********?msg=Disk%20Usage%20is%20high:${disk_usage}%25"
fi

 Look at the script and the picture.

Hi, Thanks for your reply. I think this option should be in UK that it'll repeat it every X times if the issue didn't fixed.
Let's say it repeats 4 times each time after 1 minute after 3 times the report will changed into critical and the fourth time will be sent via email by the script. UK will keep reporting every time till it fixed only on issues.

Right, so you can do this by setting the resend notifications if Down X times consequently to "4". But like I said, it will not update the UK status, but only keep sending to your alert (telegram, etc).

Hi, Thanks for your reply. I think this option should be in UK that it'll repeat it every X times if the issue didn't fixed.
Let's say it repeats 4 times each time after 1 minute after 3 times the report will changed into critical and the fourth time will be sent via email by the script. UK will keep reporting every time till it fixed only on issues.

Right, so you can sort of do this by setting the resend notifications if Down X times consequently to "4". But like I said, it will not update the UK status, but only keep sending to your alert (telegram, etc).

The issue that if you mark it as down in the url so it'll not send the correct message it just sending "no heartbeat" instead my message.

Yes, you are right. In the alert (eg: telegram) message, it will only say "No heartbeat in the time window". For your own message to appear in the alert message, you will need to use my modifications to your script, just that the status will keep flipping between up and down.

The issue that if you mark it as down in the url so it'll not send the correct message it just sending "no heartbeat" instead my message.

Yes, you are right. In the alert (eg: telegram) message, it will only say "No heartbeat in the time window". For your own message to appear in the alert message, you will need to use my modifications to your script, just that the status will keep flipping between up and down.

The issue that if you mark it as down in the url so it'll not send the correct message it just sending "no heartbeat" instead my message.

Hey look I have another script that works really nice and with custom status=down message but the only issue now that for some reason it doesn't get %25 (%) symbol at the end.
!/bin/bash

# This script monitors RAM, CPU, and disk usage and sends an alert if disk usage is higher than 85%.

# Get current disk usage
DISKUSAGE=`/usr/bin/df -h | /usr/bin/awk '$NF=="/"{printf "%s\t\t", $5}' | /usr/bin/tr -d "%"`
# Get current RAM and CPU usage
RAM=`free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'`
CPU=`top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'`
# Check if disk usage is higher than 85%
if [[ ${DISKUSAGE%?} -gt 21 ]]; then
  echo "High Disk Usage: $DISKUSAGE"
  echo "$RAM"
  echo "$CPU"
  # Send alert
  curl -s "https://uk.***com/api/push/******?status=down&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
  else
          curl -s "https://uk.****.com/api/push/******?status=up&msg=Disk%20usage%20is%20Fixed:${DISKUSAGE}%25"
fi

I would be very happy if we can fix it together :)

The problem is that there is a trailing newline (/n) on your DISKUSAGE variable.
if you put [ ] in front and behind the DISKUSAGE variable when you echo it (line 12), you will see.
echo "High Disk Usage: [$DISKUSAGE]"
If you echo the curl url in your code you will also see:
echo "https://uk.***com/api/push/******?status=down&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
Also the first line should be #!/bin/bash not !/bin/bash
Cheers!

Hey look I have another script that works really nice and with custom status=down message but the only issue now that for some reason it doesn't get %25 (%) symbol at the end.
!/bin/bash

# This script monitors RAM, CPU, and disk usage and sends an alert if disk usage is higher than 85%.

# Get current disk usage
DISKUSAGE=`/usr/bin/df -h | /usr/bin/awk '$NF=="/"{printf "%s\t\t", $5}' | /usr/bin/tr -d "%"`
# Get current RAM and CPU usage
RAM=`free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'`
CPU=`top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'`
# Check if disk usage is higher than 85%
if [[ ${DISKUSAGE%?} -gt 21 ]]; then
  echo "High Disk Usage: $DISKUSAGE"
  echo "$RAM"
  echo "$CPU"
  # Send alert
  curl -s "https://uk.***com/api/push/******?status=down&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
  else
          curl -s "https://uk.****.com/api/push/******?status=up&msg=Disk%20usage%20is%20Fixed:${DISKUSAGE}%25"
fi

I would be very happy if we can fix it together :)

@InSelfControll
The problem is that there is a trailing newline (/n) on your DISKUSAGE variable.
if you put [ ] in front and behind the DISKUSAGE variable when you echo it (line 12), you will see.
echo "High Disk Usage: [$DISKUSAGE]"
If you echo the curl url in your code you will also see:
echo "https://uk.***com/api/push/******?status=down&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
Also the first line should be #!/bin/bash not !/bin/bash
Cheers!

Hey look I have another script that works really nice and with custom status=down message but the only issue now that for some reason it doesn't get %25 (%) symbol at the end.
!/bin/bash

# This script monitors RAM, CPU, and disk usage and sends an alert if disk usage is higher than 85%.

# Get current disk usage
DISKUSAGE=`/usr/bin/df -h | /usr/bin/awk '$NF=="/"{printf "%s\t\t", $5}' | /usr/bin/tr -d "%"`
# Get current RAM and CPU usage
RAM=`free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'`
CPU=`top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'`
# Check if disk usage is higher than 85%
if [[ ${DISKUSAGE%?} -gt 21 ]]; then
  echo "High Disk Usage: $DISKUSAGE"
  echo "$RAM"
  echo "$CPU"
  # Send alert
  curl -s "https://uk.***com/api/push/******?status=down&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
  else
          curl -s "https://uk.****.com/api/push/******?status=up&msg=Disk%20usage%20is%20Fixed:${DISKUSAGE}%25"
fi

I would be very happy if we can fix it together :)

It didn't copied the first line 😆 my script have it already with #!/bin/bash,

It didn't copied the first line 😆 my script have it already with #!/bin/bash,

Oh ok. Also its trailing tabs not newline, my mistake.

It didn't copied the first line 😆 my script have it already with #!/bin/bash,

Oh ok. Also its trailing tabs not newline, my mistake.

Yeah printf adding tabs, I removed it but still curl doesn't get %25 ASCII

Yeah printf adding tabs, I removed it but still curl doesn't get %25 ASCII

Funny, it works for me.
This is my modified version of your script:
#!/bin/bash

# This script monitors RAM, CPU, and disk usage and sends an alert if disk usage is higher than 85%.

# Get current disk usage
DISKUSAGE=`/usr/bin/df -h | /usr/bin/awk '$NF=="/" {printf "%s", $5}' | /usr/bin/tr -d "%"`
# Get current RAM and CPU usage
RAM=`free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'`
CPU=`top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'`
# Check if disk usage is higher than 85%

if [ ${DISKUSAGE} -gt 1 ]; then
  echo "High Disk Usage: [$DISKUSAGE]"
  echo "$RAM"
  echo "$CPU"
  # Send alert
  curl -s "https://uk.***com/api/push/******?status=up&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
else
  curl -s "https://uk.***com/api/push/******??status=up&msg=Disk%20usage%20is%20Fixed:${DISKUSAGE}%25"
fi

Did you forget your 3001 or are you running your UK server on 443?

@InSelfControll

Yeah printf adding tabs, I removed it but still curl doesn't get %25 ASCII

Funny, it works for me.
This is my modified version of your script:
#!/bin/bash

# This script monitors RAM, CPU, and disk usage and sends an alert if disk usage is higher than 85%.

# Get current disk usage
DISKUSAGE=`/usr/bin/df -h | /usr/bin/awk '$NF=="/" {printf "%s", $5}' | /usr/bin/tr -d "%"`
# Get current RAM and CPU usage
RAM=`free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }'`
CPU=`top -bn1 | grep load | awk '{printf "CPU Load: %.2f\n", $(NF-2)}'`
# Check if disk usage is higher than 85%

if [ ${DISKUSAGE} -gt 1 ]; then
  echo "High Disk Usage: [$DISKUSAGE]"
  echo "$RAM"
  echo "$CPU"
  # Send alert
  curl -s "https://uk.***com/api/push/******?status=up&msg=Disk%20usage%20is%20high:${DISKUSAGE}%25"
else
  curl -s "https://uk.***com/api/push/******??status=up&msg=Disk%20usage%20is%20Fixed:${DISKUSAGE}%25"
fi

Did you forget your 3001 or are you running your UK server on 443?

This is my private server the other one is stg at work with port 3001.
This specific url run behind treafik proxy on docker :) so no port.

Ah ok. In anycase the %25 works for me.
For CPU % used, have you tried using iostat (apt get sysstat) and piping that into bc?
CPUP_IDLE=`iostat  | grep -A1 "avg-cpu" | awk {'print $6'} | tail -1`
CPUP_USED=`echo "100 - $CPUP_IDLE" | bc`

For memory, free -g take the available/total and also pipe into bc.

This is my private server the other one is stg at work with port 3001. This specific url run behind treafik proxy on docker :) so no port.

Ah ok. In anycase the %25 works for me.
For CPU % used, have you tried using iostat (apt get sysstat) and piping that into bc?
CPUP_IDLE=`iostat  | grep -A1 "avg-cpu" | awk {'print $6'} | tail -1`
CPUP_USED=`echo "100 - $CPUP_IDLE" | bc`

For memory, free -g take the available/total and also pipe into bc.

This is my private server the other one is stg at work with port 3001. This specific url run behind treafik proxy on docker :) so no port.

Done!
Thanks for your help.
I think that UK need to get this feature that send critical messages on hosts if there are issues other than the server is down.
Like that the http test that can monitor string and still get code:200 but mark as missing string.
I would love to see UK get this feature in the next release 😎

I just found an issue while running it via docker and on a VM with nodejs.
It keep losing connection every time and then sending service down - "no heartbeat" because the connection is "down" even when the service is up and running correctly.

Any updates? Would love to have this.

found existing solution https://github.com/msgbyte/tianji

@milzamsz If i'm correct, on tianji you're just having a list of servers. I don't see the possiblity to, for example, set alerts when cpu usage > x %
Neither add a server to a status page? And doesn't support mysql?

@MichaelBelgium yes but it's better for me who doesn't need advanced monitoring like netdata/prometheus. im installing with easypanel and it come with postgres

Hi. Id like to join the conversation ;)
Other idea: How about KUMA just adds a new monitor, that requests a page from the server to be monitored. Here you guys can knock yourself out and implement your GO_JS_PHP_BASH_FORTRAN or whatever module, that just responds with a percentage and does not respond when it s critical.
As for KUMA, for this Monitor, just display the data and make it NOK when it is not responding.
... easy to do for the KUMA team and nice and hackable for the rest of us ;)
Oliver

is this will make uptime kuma like hetrix tools?
for me its good if UK can have something like cpu/network/ram/disk/ usage like hetrix tools
im currently using hetrix and its help to show the current VPS usage without login to my SSH
what happened before im login to my terminal

This is about Uptime as the name of the project. Not resource monitoring. Those are different issues and have their own tools. You might use Uptime to show to a client that SLA is respected and you might have internal perf monitoring tools so you can adjust power as needed to customer sees their SLA respected. That's just MHO and I really think you shouldn't mix this up or you'll end up with a tool that really doesn't fit any need anymore.


librecast: package lcrq

Towards #3.
Package https://codeberg.org/librecast/lcrq, direct dependency of https://codeberg.org/librecast/librecast.

We referenced the Guix packaging here https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/networking.scm?h=v1.4.0#n250


PublicKey.validateAddress returning always false

I have tried like
import { PublicKey } from 'ark-ts/core'
import { NetworkType } from 'ark-ts/model/Network'

...
const isValid = PublicKey.validateAddress(address, NetworkType.Mainnet)

isValid is always false
From what I saw here, network.version is undefined
https://github.com/ArkEcosystem/ark-ts/blob/6d6060d6934d06a7452a41674ba50c68c15348ae/src/core/Key.ts#L26

Hi @ciocan
Looking at Key.ts :
public static validateAddress(address: string, network: model.Network)
2nd parameter is a model.Network, not a NetworkType.
So I think you have to build first this model.Network to pass it to the validateAddress function.

This issue has been closed. If you wish to re-open it please provide additional information.


New IPython plugin based on IPython v0.11 Qt frontend

From pierre.raybaut on 2011-08-06T05:56:07Z
This plugin will fully support IPython v0.11.
Matplotlib inline figures will be supported.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=726

From pierre.raybaut on 2012-03-26T13:30:46Z
Still experimental, but done anyway.
Status: Done

From pierre.raybaut on 2012-03-18T14:11:39Z
Labels: -Type-Enhancement Type-Enh