Wrong defaults for H264 decoder option threads

🐛 Describe the bug
I use torchaudio.io.StreamReader to create a video stream with FFmpeg H264 codec on CPU. I installed the ffmpeg 6 with brew on mac m1 and torchaudio=2.1.0.
from torchaudio.io import StreamReader

stream_reader = StreamReader("video.mp4")
reader_conf = {"decoder": "h264", "height": 1024, "width": 2048, "decoder_option": {}}
stream_reader.add_basic_video_stream(frames_per_chunk=1, buffer_chunk_size=-1, **reader_conf)

RuntimeError                              Traceback (most recent call last)
Cell In[7], line 1
----> 1 stream_reader.add_basic_video_stream(frames_per_chunk=1, buffer_chunk_size=-1, **reader_conf)

File ~/x/.venv/lib/python3.10/site-packages/torchaudio/io/_stream_reader.py:734, in StreamReader.add_basic_video_stream(self, frames_per_chunk, buffer_chunk_size, stream_index, decoder, decoder_option, format, frame_rate, width, height, hw_accel)
    689 @_format_video_args
    690 def add_basic_video_stream(
    691     self,
   (...)
    702     hw_accel: Optional[str] = None,
    703 ):
    704     """Add output video stream
    705
    706     Args:
   (...)
    732         hw_accel (str or None, optional): {hw_accel}
    733     """
--> 734     self.add_video_stream(
    735         frames_per_chunk,
    736         buffer_chunk_size,
    737         stream_index=stream_index,
    738         decoder=decoder,
    739         decoder_option=decoder_option,
    740         filter_desc=_get_vfilter_desc(frame_rate, width, height, format),
    741         hw_accel=hw_accel,
    742     )

File ~/x/.venv/lib/python3.10/site-packages/torchaudio/io/_stream_reader.py:821, in StreamReader.add_video_stream(self, frames_per_chunk, buffer_chunk_size, stream_index, decoder, decoder_option, filter_desc, hw_accel)
    819 if i is None:
    820     raise RuntimeError("There is no video stream.")
--> 821 self._be.add_video_stream(
    822     i,
    823     frames_per_chunk,
    824     buffer_chunk_size,
    825     filter_desc,
    826     decoder,
    827     decoder_option or {},
    828     hw_accel,
    829 )

RuntimeError: Unexpected options: threads

As per documentation, I can see decoder options with ffmpeg -h decoder=h264
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 15.0.0 (clang-15<IP_ADDRESS>)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Decoder h264 [H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
    General capabilities: dr1 delay threads
    Threading capabilities: frame and slice
    Supported hardware devices: videotoolbox
H264 Decoder AVOptions:
  -is_avc            <boolean>    .D.V..X.... is avc (default false)
  -nal_length_size   <int>        .D.V..X.... nal_length_size (from 0 to 4) (default 0)
  -enable_er         <boolean>    .D.V....... Enable error resilience on damaged frames (unsafe) (default auto)
  -x264_build        <int>        .D.V....... Assume this x264 version if no x264 version found in any SEI (from -1 to INT_MAX) (default -1)

As you can see, there is no threads option here.
I believe this are relevant lines causing the issue. https://github.com/pytorch/audio/blob/main/src/libtorio/ffmpeg/stream_reader/stream_processor.cpp#L138-L141. The possible fix might be to omit threads option in some case it's not supported by the codec. It seems, the previous solution was to set threads=0, but maybe FFmpeg changed their API.
Currently, I can't seem to find a hack to make it work on cpu.
Thank you.
Versions
PyTorch version: 2.1.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.0 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-15<IP_ADDRESS>)
CMake version: Could not collect
Libc version: N/A

Python version: 3.10.13 (main, Aug 24 2023, 12:59:26) [Clang 15.0.0 (clang-15<IP_ADDRESS>)] (64-bit runtime)
Python platform: macOS-14.0-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M1 Pro

Versions of relevant libraries:
[pip3] efficientnet-pytorch==0.7.1
[pip3] numpy==1.23.5
[pip3] pytorch-lightning==1.9.1
[pip3] segmentation-models-pytorch==0.3.3
[pip3] torch==2.1.0
[pip3] torchaudio==2.1.0
[pip3] torchgeometry==0.1.2
[pip3] torchmetrics==1.2.0
[pip3] torchvision==0.16.0
[conda] Could not collect

Hi @deo-nikita
Thanks for trying it out, however I cannot reproduce this.
I tried FFmpeg 6 from both conda-forge and brew and they worked fine.
In my understanding threads is option available to all the decoder, which is not listed in individual decoder options.
In your snippet see the following part. It mentions thread capability.
Decoder h264 [H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
    General capabilities: dr1 delay threads
    Threading capabilities: frame and slice

FFmpeg usually gives a long time before making BC-breaking change, so I doubt that this is FFmpeg change.
It might be possible, even though the chances are very small, that you somehow have FFmpeg without threading capability and torchaudio is linking against it. Can you use torchaudio.utils.ffmpeg_utils.get_build_config() to verify that the FFmpeg version torchaudio is linking against is same as the one you are invoking with ffmpeg command?

Hi @mthrok. Thanks for looking into my issue.

I discovered I was having a wrong video (h265 encoded, not 264). I specifically asked torchaudio to use h264 codec, but maybe inside it changed to h265 or something?
Anyway, using the new video is all okay


Update client.py

had to change it since it was throwing error on 2.7

Thank you.
But my Python 2.7.8 on Mac OS X,
Python 2.7.8 (default, Oct 19 2014, 16:03:53)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin
>>> "http://{}:{}/".format("a", "b")
'http://a:b/'

works. What patch level version are you using?

its actually 2.6
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

I hadn't know {} is only in 2.7+. Thank you.
But, your field name based approach is a little bit complex. How about using just {0} like
addr = "http://{0}:{1}/".format(host, port)
https://docs.python.org/2.7/library/string.html#format-string-syntax
And could you remove your comment about compatiblity?
If you change your PR, I will merge. Thank you for your contribution!


cppki/segverifer: enforce AS certificate to cover AS entry

When verifying an AS entry the verifier will now only use an AS certificate that is valid until the expiration of the AS entry. Before, the verifier would use any certificate that was valid at the time of verification but not necessarily for the entire validity of the AS entry, i.e., the hop field expiration contained in the entry.
The verifier now requests certificates that cover at least the entire validity period of the AS entry, however, for backward compatibility with old trust material servers it still sets a single validity date at which point the AS certificate still must be valid. This only enforces that the AS certificate is still valid at the AS entry expiration, but not that it was also valid at the start of the hop field validity. Once all trust material servers have been upgraded, the Date field could be removed (or rather ignored) from the ChainsRequest proto and only the new Validity field will be taken into account to ensure the AS certificate actually covers the entire AS entry lifespan. Trust material servers that get a request where both Validity and Date are set will ignore the Date field.
Fixes #4286

This change is


Release v0.1.0 in Chef supermarket

The latest version on Chef supermarket is the 0.0.9, but the 0.1.0 seems to be already out.

hola buenas


misc: use solidity version caret range for interfaces and libraries

this allows apps and integrators to use this project as a library

I think this makes sense, thanks @cruzdanilo!

Great catch, thanks!


Add Base91

This adds Base91 decoding to Ciphey. For example:
ciphey -t "nX,<:WRT%yX%M^cjhMh+P:zv#F,ue9QUxA"
Format used:
base91
Final result: "This is encoded with Base91"
I tried to add a test for Base91, but when I download Ciphey locally as a zip and run it with Python, it gives me an error. Only the PyPI version works.
Anyway, I like the project and I hope this helps.

@all-contributors please add @SkeletalDemise for code, bugs, and design
Hey! Thanks so much for doing this :sparkles:
In the future, please ignore requirements.txt. That's because some of the core members need that file for Pycharm -- it doesn't actually effect Ciphey :sweat_smile:
I've added an issue to add tests to this :)

@all-contributors please add @SkeletalDemise for code


Need to set administrator run permissions settings

I hope to provide the RequestExecutionLevel API settings

Yes,me too


Switch build system to dune

This PR add switches to dune build system, which fixes a problem where the camltc.cma requires custom linking.
Since opam 2.0.0 comples packages in a sandbox, git submodules (and other git commands) are not possible. I've added a opam-release.sh  (make relase) to create a tarball, which includes all files from the submodules, and the camltc_version.ml file created locally (with all the relevant git sha's). It will complain is there are local changes / if you have not tagged the current version.

ok, I'll try to update the opam package then. This is a cool addition, thanks.
And thanks for having merged it so fast.


Dont work with helm-diff plugin

Before proceeding

[X] I didn't find a similar issue

Version
1.2.140
How to reproduce

Install diff plugin: "werf helm plugin install https://github.com/databus23/helm-diff"
Test diff plugin (suply any chart, local and unpacked in my case): "werf helm  --debug diff upgrade --allow-unreleased test rendered/"

Result
> werf helm  --debug diff upgrade --allow-unreleased test rendered/
71.480534ms  GetServiceValues result (err=%!s(<nil>)):
71.488733ms  global:
71.490391ms    env: ""
71.495166ms    werf:
71.496771ms      name: PROJECT
71.499851ms      version: 1.2.140
71.503879ms  werf:
71.505359ms    commit:
71.508416ms      date:
71.51413ms         human: 1970-01-01 07:00:00 +0700 +07
71.530045ms        unix: 0
71.536657ms      hash: COMMIT_HASH
71.543157ms    env: ""
71.546547ms    image: {}
71.551572ms    is_stub: true
71.608872ms    name: PROJECT
71.611597ms    repo: REPO
71.613586ms    stub_image: REPO:TAG
71.617ms       tag: {}
71.618917ms    version: 1.2.140
71.625381ms
********************

	Release was not present in Helm.  Diff will show entire contents as new.

********************

Expected result
> helm  --debug diff upgrade --allow-unreleased test rendered/
Executing helm version
Executing helm get manifest test --namespace default
********************

	Release was not present in Helm.  Diff will show entire contents as new.

********************
Executing helm template test rendered/ --namespace default --validate
test, test, ConfigMap (v1) has been added:
-
+ # Source: chart/templates/configmap.yaml
+ # Source: chart/templates/configmap.yaml
+ apiVersion: v1
+ kind: ConfigMap
+ metadata:
+   name: test
+   namespace: test
+ data:
+   TEST: "test"

Additional information
Werf in helm-mode (export WERF_HELM3_MODE=1) have same problem with diff plugin.

We now have werf plan commands for those who use werf converge.
For those who preferred werf helm we will release Nelm as a standalone Helm 3 replacement, instead of half-baked werf helm. It will have plan functionality out-of-the-box (just like werf).


Update Contributer.md

Added my credentials in contributors

Please add some code to any folder

Added my credentials and made 3 contributions @tomriddle77 it is great contributing

@tomriddle77 I have already an open Pull request for adding some code in your repo with number 54


Differences between onnx extension

Hello guys,
I am looking on different onnx extensions. What are differences between following extensions .onnx, int8.onnx, opt.onnx ? Thanks a lot.
decoder-epoch-50-avg-20-opt.onnx
decoder-epoch-50-avg-20.int8.onnx
decoder-epoch-50-avg-20.onnx
encoder-epoch-50-avg-20-opt.onnx
encoder-epoch-50-avg-20.int8.onnx
encoder-epoch-50-avg-20.onnx
joiner-epoch-50-avg-20-opt.onnx
joiner-epoch-50-avg-20.int8.onnx
joiner-epoch-50-avg-20.onnx

I used following script to create onnx model. Is something wrong with it?
python zipformer/export-onnx.py
--tokens data/lang_bpe_500/tokens.txt
--use-averaged-model 1
--epoch ${epoch}
--avg ${avg}
--exp-dir zipformer/exp
--num-encoder-layers "2,2,3,4,3,2"
--downsampling-factor "1,2,4,8,4,2"
--feedforward-dim "512,768,1024,1536,1024,768"
--num-heads "4,4,4,8,4,4"
--encoder-dim "192,256,384,512,384,256"
--query-head-dim 32
--value-head-dim 12
--pos-head-dim 4
--pos-dim 48
--encoder-unmasked-dim "192,192,256,256,256,192"
--cnn-module-kernel "31,31,15,15,15,31"
--decoder-dim 512
--joiner-dim 512
--causal False
--chunk-size "16,32,64,-1"
--left-context-frames "64,128,256,-1"

Could you display the generated files produced by the above command?
Does it contain a xxx-opt.onnx? No?

First of all following is output of the running of the upper scirpt.
2024-01-08 16:01:31,518 INFO [export-onnx.py:434] device: cuda:0
2024-01-08 16:01:31,522 INFO [export-onnx.py:440] {'best_train_loss': inf, 'best_valid_loss': inf, 'best_train_epoch': -1, 'best_valid_epoch': -1, 'batch_idx_train': 0, 'log_interval': 50, 'reset_interval': 200, 'valid_interval': 3000, 'feature_dim': 80, 'subsampling_factor': 4, 'warm_step': 2000, 'env_info': {'k2-version': '1.24.3', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '4c05309499a08454997adf500b56dcc629e35ae5', 'k2-git-date': 'Tue Jul 25 16:23:36 2023', 'lhotse-version': '1.20.0.dev+git.b3373c0d.clean', 'torch-version': '1.13.0+cu116', 'torch-cuda-available': True, 'torch-cuda-version': '11.6', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': 'b9137aa-dirty', 'icefall-git-date': 'Mon Jan 1 13:21:01 2024', 'icefall-path': '/workspace/inputs/alexg/asr/src/models/k2/icefall', 'k2-path': '/opt/conda/lib/python3.8/site-packages/k2/init.py', 'lhotse-path': '/opt/conda/lib/python3.8/site-packages/lhotse/init.py', 'hostname': 'gpu-alex-0-0', 'IP address': '<IP_ADDRESS>'}, 'epoch': 50, 'iter': 0, 'avg': 20, 'use_averaged_model': True, 'exp_dir': PosixPath('zipformer/exp'), 'tokens': 'data/lang_bpe_500/tokens.txt', 'context_size': 2, 'num_encoder_layers': '2,2,3,4,3,2', 'downsampling_factor': '1,2,4,8,4,2', 'feedforward_dim': '512,768,1024,1536,1024,768', 'num_heads': '4,4,4,8,4,4', 'encoder_dim': '192,256,384,512,384,256', 'query_head_dim': '32', 'value_head_dim': '12', 'pos_head_dim': '4', 'pos_dim': 48, 'encoder_unmasked_dim': '192,192,256,256,256,192', 'cnn_module_kernel': '31,31,15,15,15,31', 'decoder_dim': 512, 'joiner_dim': 512, 'causal': False, 'chunk_size': '16,32,64,-1', 'left_context_frames': '64,128,256,-1', 'blank_id': 0, 'vocab_size': 500}
2024-01-08 16:01:31,522 INFO [export-onnx.py:442] About to create model
2024-01-08 16:01:35,835 INFO [export-onnx.py:511] Calculating the averaged model over epoch range from 30 (excluded) to 50
2024-01-08 16:02:01,382 INFO [export-onnx.py:546] encoder parameters: 64256759
2024-01-08 16:02:01,383 INFO [export-onnx.py:547] decoder parameters: 522752
2024-01-08 16:02:01,383 INFO [export-onnx.py:548] joiner parameters: 256500
2024-01-08 16:02:01,383 INFO [export-onnx.py:549] total parameters: 65036011
2024-01-08 16:02:01,383 INFO [export-onnx.py:560] Exporting encoder
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/scaling.py:1485: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
zero = torch.tensor(0.0, dtype=x.dtype, device=x.device)
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/scaling.py:1411: TracerWarning: torch.tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
zero = torch.tensor(0.0, dtype=x.dtype, device=x.device)
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/scaling.py:472: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert x.shape[self.channel_dim] == self.num_channels
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/subsampling.py:330: TracerWarning: Converting a tensor to a Python number might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert x.size(1) == x_lens.max().item(), (x.size(1), x_lens.max())
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/subsampling.py:330: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert x.size(1) == x_lens.max().item(), (x.size(1), x_lens.max())
/workspace/inputs/alexg/asr/src/models/k2/icefall/icefall/utils.py:1338: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
max_len = max(max_len, lengths.max())
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/scaling.py:1656: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
if num_channels <= x.shape[-1]:
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:1612: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert p.shape[-1] == num_heads * pos_head_dim
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:1692: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert attn_scores.shape == (num_heads, batch_size, seq_len, seq_len)
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:1703: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert key_padding_mask.shape == (
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:2120: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert attn_weights.shape == (num_heads, batch_size, seq_len, seq_len)
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:1910: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert attn_weights.shape == (num_heads, batch_size, seq_len, seq_len)
/workspace/inputs/alexg/asr/src/models/k2/icefall/egs/tedlium3/asr_k2_train/zipformer/zipformer.py:1338: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
assert src.shape[0] == d_seq_len * ds
/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py:1167: UserWarning: operator() profile_node %108 : int = prim::profile_ivalue(%106)
does not have profile information (Triggered internally at ../torch/csrc/jit/codegen/cuda/graph_fuser.cpp:105.)
return self.forward(*input, **kwargs)
/opt/conda/lib/python3.8/site-packages/torch/onnx/utils.py:823: UserWarning: no signature found for <torch.ScriptMethod object at 0x7f5ec94d1cc0>, skipping _decide_input_format
warnings.warn(f"{e}, skipping _decide_input_format")
2024-01-08 16:03:41,152 INFO [export-onnx.py:324] meta_data: {'model_type': 'zipformer2', 'version': '1', 'model_author': 'k2-fsa', 'comment': 'non-streaming zipformer2'}
2024-01-08 16:03:42,187 INFO [export-onnx.py:567] Exported encoder to zipformer/exp/encoder-epoch-50-avg-20.onnx
2024-01-08 16:03:42,188 INFO [export-onnx.py:569] Exporting decoder
/opt/conda/lib/python3.8/site-packages/torch/onnx/_internal/jit_utils.py:258: UserWarning: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. (Triggered internally at ../torch/csrc/jit/passes/onnx/shape_type_inference.cpp:1884.)
_C._jit_pass_onnx_node_shape_type_inference(node, params_dict, opset_version)
/opt/conda/lib/python3.8/site-packages/torch/onnx/utils.py:687: UserWarning: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. (Triggered internally at ../torch/csrc/jit/passes/onnx/shape_type_inference.cpp:1884.)
_C._jit_pass_onnx_graph_shape_type_inference(
/opt/conda/lib/python3.8/site-packages/torch/onnx/utils.py:1178: UserWarning: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. (Triggered internally at ../torch/csrc/jit/passes/onnx/shape_type_inference.cpp:1884.)
_C._jit_pass_onnx_graph_shape_type_inference(
2024-01-08 16:03:42,266 INFO [export-onnx.py:576] Exported decoder to zipformer/exp/decoder-epoch-50-avg-20.onnx
2024-01-08 16:03:42,266 INFO [export-onnx.py:578] Exporting joiner
2024-01-08 16:03:42,266 INFO [export-onnx.py:394] joiner dim: 512
2024-01-08 16:03:42,284 INFO [export-onnx.py:585] Exported joiner to zipformer/exp/joiner-epoch-50-avg-20.onnx
2024-01-08 16:03:42,284 INFO [export-onnx.py:590] Generate int8 quantization models
2024-01-08 16:03:43.029532577 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029577702 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029588433 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029596097 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029604172 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029611727 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '927'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029619662 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029626044 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029632757 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029638989 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/0/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029743417 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029750480 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029757143 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029763565 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029770628 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '2181'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029777982 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029785847 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029792720 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029799603 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029806035 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/1/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029901807 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029908981 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029915503 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029921805 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029928307 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029934739 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029941232 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029949658 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '3485'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029958174 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.029964656 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/2/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030059857 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030067431 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030074525 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030082339 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030089252 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030097839 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030104151 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030112908 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '5253'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030120913 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030129098 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/3/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030217315 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030224098 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030230731 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030240009 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030246561 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030255748 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '7465'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030262581 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030270176 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030277199 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030283251 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/4/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030366709 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_10_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030373782 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_5_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030381237 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_48_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030388220 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_46_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030395584 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Shape_15_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030403198 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_22_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030409490 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_24_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030418337 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_37_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030424589 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '/encoder/5/encoder/encoder_pos/Constant_39_output_0'. It is not used by any node and should be removed from the model.
2024-01-08 16:03:43.030431702 [W:onnxruntime:, graph.cc:3211 CleanUnusedInitializers] Removing initializer '9211'. It is not used by any node and should be removed from the model.

For decoding I use following command
python zipformer/onnx_pretrained.py
--encoder-model-filename zipformer/exp/encoder-epoch-50-avg-20.onnx
--decoder-model-filename zipformer/exp/decoder-epoch-50-avg-20.onnx
--joiner-model-filename zipformer/exp/joiner-epoch-50-avg-20.onnx
--tokens data/lang_bpe_500/tokens.txt
1.wav
2.wav
3.wav
Output of the decoding is exactly same to the non onnnx model.

As a result of running of this script following files with following sizes were created
-rw-r--r-- 1 root 999  2.0M Jan  8 16:03 decoder-epoch-50-avg-20-opt.onnx
-rw-rw-rw- 1 root 999  528K Jan  8 16:03 decoder-epoch-50-avg-20.int8.onnx
-rw-rw-rw- 1 root 999  2.0M Jan  8 16:03 decoder-epoch-50-avg-20.onnx
-rw-r--r-- 1 root 999  249M Jan  8 16:03 encoder-epoch-50-avg-20-opt.onnx
-rw-rw-rw- 1 root 999   68M Jan  8 16:03 encoder-epoch-50-avg-20.int8.onnx
-rw-rw-rw- 1 root 999  249M Jan  8 16:03 encoder-epoch-50-avg-20.onnx
-rw-r--r-- 1 root 999 1003K Jan  8 16:03 joiner-epoch-50-avg-20-opt.onnx
-rw-rw-rw- 1 root 999  254K Jan  8 16:03 joiner-epoch-50-avg-20.int8.onnx
-rw-rw-rw- 1 root 999 1003K Jan  8 16:03 joiner-epoch-50-avg-20.onnx

Sorry, I cannot reproduce your result. There are no xxx-opt.onnx files after running zipformer/export-onnx.py on my side.
I have also checked the code but could not find any code containing the string opt.onnx.


SYSTEMD issue

Hi,
I'm trying to use nDAX from systemd
I'm using this string:
/home/user/nDAX -log-level debug -rt false -tx false
starting from user terminal it works (but it seems to ignore -rt flag and -tx flag), starting from systemd I found this error:
12:59PM FTL pulse.NewClient failed error="dial unix pulse/native: connect: no such file or directory"
Can you help me?
Thanks

I' sorry I resolved using systemctl --user.
But the flag issue remains

I think it needs to be -rt=false -tx=false. Sorry about misleading you by using the wrong syntax in a previous comment :)


⚠ Bofrost.at has degraded performance

In 6229801, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2002 ms

Resolved: Bofrost.at performance has improved in c2d7cce.


BMP file

Hello guys,
I am having issues with BMP file.
http://ilab.engr.utk.edu/ilabdocs/Epilog/BMP sample files/test.bmp
Unhandled rejection Error: Input file is missing or of an unsupported image format
at Error (native)
From previous event:

it works okay on my mac but fails in ubuntu/centos. Am i missing something?

Hello, BMP input support in libvips is provided via *magick. The pre-built binaries, as used by Linux, do not include this, hence the messages you're experiencing. If you need support for BMP images on Linux, please (globally) install your own copy of libvips.

Closing. Feel free to re-open with more details if (related) questions remain.

@lovell how about supporting output?

@hbakhtiyor Please use raw output with a module like https://github.com/shaozilee/bmp-js


Only build binaries if they are not already created

Towards https://github.com/giantswarm/giantswarm/issues/2712 and https://github.com/giantswarm/giantswarm/issues/2678
With these changes we will be able to reuse the binary created in the initial build job, improving the e2e total build time.

Already some numbers how much time that saved us? :relaxed:

Not a full aws-operator clean build yet, let's see :smile:


Unknown Error: "???" okhttp3.internal.http2.Http2Writer.data

Hi,
I'm using retrofit on my Android Project and I got a report from crashlytics but surprisingly has no stack trace:

These are my dependencies concerning this issue.
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.7.0'

Any chance we can identify such occurrence? Device used is Samsung Galaxy Tab A, Android Pie (9)
Thanks!

Unless you can provide a reproducible test case there is not much we can help with.  Please re-open with that or post in an appropriate format to stackoverflow.
Sorry, but closing until we get something more we can work with to show a real bug in okhttp.

OOMs are rarely caused by what fails when they're thrown. You have general
memory problems and should investigate leaks and heap dumps to see what is
consuming your application's memory.
On Thu, Sep 26, 2019, 2:23 AM Yuri Schimke<EMAIL_ADDRESS>wrote:

Closed #5497 https://github.com/square/okhttp/issues/5497.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/square/okhttp/issues/5497?email_source=notifications&email_token=AAAQIEIHKF3CRXF2G5K3BRTQLRINLA5CNFSM4I2VOA4KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOT3FCXEA#event-2664049552,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAQIEMO3IYJIG4IYADQ4ILQLRINLANCNFSM4I2VOA4A
.


Some problems when running 'Deep Autoencoder' on both CIFAR10 and MNIST

After downloading and unzipping cifar10 dataset, I tried deep autoencoder with:
python command_line/run_deep_autoencoder.py --dataset cifar10 --cifar_dir /home/data/cifar-10-batches-py/ --main_dir deep-autoencoder --model_name deeper-is-better --layers 8192,2048,512,256

something goes wrong at the fifth step in 1st layer pretraining:
Training layer 1...

Validation cost at step 0: 137.183
Validation cost at step 1: 137.183
Validation cost at step 2: 137.183
Validation cost at step 3: 137.183
Validation cost at step 4: 137.183
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:03:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:03:00.0)
Traceback (most recent call last):
  File "command_line/run_deep_autoencoder.py", line 121, in <module>
    srbm.pretrain(trX, vlX)
  File "./models/rbm_models/deep_autoencoder.py", line 111, in pretrain
    next_train, next_valid = self._pretrain_rbm_and_gen_feed(rboltz, next_train, next_valid)
  File "./models/rbm_models/deep_autoencoder.py", line 135, in _pretrain_rbm_and_gen_feed
    return rboltz.transform(train_set), rboltz.transform(validation_set)
  File "./models/rbm_models/rbm.py", line 260, in transform
    encoded_data = self.sample_hidden_from_visible(data)[0].eval()
  File "./models/rbm_models/rbm.py", line 201, in sample_hidden_from_visible
    hprobs = tf.nn.sigmoid(tf.matmul(visible, self.W) + self.bh_)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 1036, in matmul
    name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 911, in _mat_mul
    transpose_b=transpose_b, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 486, in apply_op
    _Attr(op_def, input_arg.type_attr))
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 59, in _SatisfiesTypeConstraint
    ", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: DataType uint8 for attr 'T' not in list of allowed values: float32, float64, int32, complex64

Then I tried MNIST with:
python command_line/run_deep_autoencoder.py --dataset mnist --main_dir deep-autoencoder --model_name deeper-is-better --layers 512,256 --verbose 1 --rbm_num_epochs 5 --rbm_batch_size 100

The pretraining process went fine:
Training layer 1...
Validation cost at step 0: 0.140783
Validation cost at step 1: 0.122195
Validation cost at step 2: 0.111817
Validation cost at step 3: 0.104732
Validation cost at step 4: 0.0994828

Training layer 2...
Validation cost at step 0: 0.162714
Validation cost at step 1: 0.13298
Validation cost at step 2: 0.117772
Validation cost at step 3: 0.108244
Validation cost at step 4: 0.101742

But at finetuning stage:
Start deep autoencoder finetuning...
Traceback (most recent call last):
  File "command_line/run_deep_autoencoder.py", line 127, in <module>
    srbm.build_model(trX.shape[1])
  File "./models/rbm_models/deep_autoencoder.py", line 203, in build_model
    encode_output = self._create_encoding_layers()
  File "./models/rbm_models/deep_autoencoder.py", line 245, in _create_encoding_layers
    hstates = utilities.sample_prob(hprobs, self.hrand[l])
  File "./utils/utilities.py", line 20, in sample_prob
    return tf.nn.relu(tf.sign(probs - rand))
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 518, in binary_op_wrapper
    return func(x, y, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 1683, in sub
    return _op_def_lib.apply_op("Sub", x=x, y=y, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 655, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2156, in create_op
    set_shapes_for_outputs(ret)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1612, in set_shapes_for_outputs
    shapes = shape_func(op)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 1390, in _BroadcastShape
    % (shape_x, shape_y))
ValueError: Incompatible shapes for broadcasting: (?, 512) and (?, 256)

Could you figure out what's wrong?

Both these issues should be solved with the latest commit. Let me know if it works now.

@blackecho
SORRY I was a little busy recently, should have replied earlier.
glad you switched to os.path.join, i was about to mention that.   and i also added reconstruct() to commit .          mnist works fine but cifar10 didn't. u missed a small FLAG and i can fixed it by just adding one.

If you mean the save_layers_output flag yes, it was missing. I added it with the latest commit.
What error does cifar10 give to you?

Yes I meant that. : - )    nothing more.


Use full 4 bytes for unicode values

Hi @rich-iannone. I discovered that some emoji may not round-trip through reencode_utf8():
emoji <- "🧑💻 🧑🏽💻"
(emoji_utf8 <- reencode_utf8(emoji))
#> [1] "\\u01f9d1\\u200d\\u01f4bb \\u01f9d1\\u01f3fd\\u200d\\u01f4bb"
(emoji_utf8_unesc <- stringi::stri_unescape_unicode(emoji_utf8))
#> [1] "ǹd1Ǵbb ǹd1ǳfdǴbb"
cat(emoji_utf8_unesc)
#> ǹd1Ǵbb ǹd1ǳfdǴbb

My understanding is that emoji that fit in two bytes are prefixed with \u
cat("\u2705")
#> ✅

but emoji that require the full 4 bytes need to be prefixed with \U
cat("\u01F638")
#> Ƕ38

cat("\U0001F638")
#> 😸

The fix I've proposed is to use the full 4-byte chunk if there are 3 or more non-zero bytes
  # reencode_utf8() ....
  if (length(bytes_nz) > 2) {
    out <- paste("\\U", paste(as.hexmode(x), collapse = ""), sep = "")
  } else if (length(bytes_nz) > 1) {
  # ...

Which appears to round-trip correctly (although stri_unescape_unicode() introduces minor modifications from the input)
emoji <- "🧑💻 🧑🏽💻"
stringi::stri_escape_unicode(emoji)
#> [1] "\\U0001f9d1\\u200d\\U0001f4bb \\U0001f9d1\\U0001f3fd\\u200d\\U0001f4bb"
(emoji_utf8 <- reencode_utf8(emoji))
#> [1] "\\U0001f9d1\\u200d\\U0001f4bb \\U0001f9d1\\U0001f3fd\\u200d\\U0001f4bb"
(emoji_utf8_unesc <- stringi::stri_unescape_unicode(emoji_utf8))
#> [1] "\U0001f9d1\U0001f4bb \U0001f9d1\U0001f3fd\U0001f4bb"
cat(emoji_utf8_unesc)
#> 🧑💻 🧑🏽💻

Thank you, this is a great improvement! I think this will also help with 4-byte chinese/japanese characters like 𠜎𠜱𠝹𠱓𠱸𠲖𠳏 (see https://github.com/minimaxir/big-list-of-naughty-strings/pull/6).

Thank you, this is a great improvement! I think this will also help with 4-byte chinese/japanese characters like 𠜎𠜱𠝹𠱓𠱸𠲖𠳏 (see https://github.com/minimaxir/big-list-of-naughty-strings/pull/6).


Upon Storage failure, the state is still updated in the metastore.

Fixed.
https://github.com/quickwit-inc/quickwit/pull/41


[NEW BONUS GUIDE + REESTRUCTURE] PostgreSQL + other related

What
One of the reasons for using PostgreSQL in LND is to address the inconvenience caused by the current bbolt database. With bbolt, node operators need to restart the node to compact the database, which can take up to 3 hours, particularly in cases with a large number of active channels. This downtime negatively impacts node uptime. By switching to PostgreSQL, this issue can be mitigated, as it offers more efficient database management capabilities without the need for node restarts, ensuring better uptime and operational efficiency.
Regarding this, PostgreSQL will no longer be used in MiniBolt solely by NBXplorer and BTCPay Server, but also by LND. Therefore, the installation/update/uninstallation process will be separated into a bonus guide, and the LND guide will be modified to include the use of PostgreSQL instead of bbolt. The BTCPay Server bonus guide will be restructured too, according to this change.
Why
General reasons to use PostgreSQL:

Power and Functionality
Scalability
Reliability and Durability
Extensibility and Customization

Several advantages to using PostgreSQL over the default bbolt backend on LND reasons:

Better handling of large data sets
On-the-fly database compaction (auto vacuum)
Database replication
Inspect data while LND is running (bbolt opens the database exclusively)
Usage of industry-standard tools to manage the stored data, get performance metrics, etc.

Furthermore, the SQL platform opens up possibilities to improve lnd's performance in the future. Bbolt's single-writer model is a severe performance bottleneck, whereas Postgres offers a variety of locking models. Additionally, structured tables reduce the need for custom serialization/deserialization code in lnd, saving developer time and limiting the potential for bugs.
How

Separate PostgreSQL installation to a separate bonus guide
Modify the LND guide to use PostgreSQL instead of bbolt
Modify the Nostr relay guide to use PostgreSQL instead of sqlite
Modify the BTCPay Server bonus guide according to these changes
Use the lndinit fork to add a bonus section to migrate an existing bbolt database to Postgres (experimental)
Include the Golang bonus guide as a common language for lndinit compile
LND v0.18 update
Regenerate Tor & I2P addresses extra Bitcoin Core section
Generate a full bitcoin.conf file extra Bitcoin Core section
Some additional fixes

Scope

[X] significant change to core configuration
[X] independent bonus guide
[ ] simple bug fix

Test & maintenance
All changes tested by me ✅
Refs:
https://github.com/lightningnetwork/lnd/blob/master/docs/postgres.md
https://github.com/lightningnetwork/lnd/pull/5366
https://github.com/lightningnetwork/lnd/blob/master/docs/release-notes/release-notes-0.14.0.md#postgres-database-support
https://github.com/lightningnetwork/lnd/releases/tag/v0.18.0-beta
Thanks to @blckbx for clarifying the way with this amazing guide: https://blckbx.github.io/lnd_postgres/

Linking LND's PR to unleash the power of concurrent access for PostgreSQL, aimed to be merged in next release 0.18: lightningnetwork/lnd#8644

Uhm...interesting...one more reason to use PostgreSQL as the database backend for LND, but I'm not sure they include it on v0.18, I can't see anything on the milestone or roadmap of v0.18: https://github.com/orgs/lightningnetwork/projects/6

You're right! The replaced PR was planned for 0.18: https://github.com/lightningnetwork/lnd/pull/7992

Ready for the merge! Let's go to the main!


support json rpc 2.0 with author_submitAndWatchExtrinsic trusted calls

tl;dr; we can subscribe to tops from the js now without any client workarounds. 🥳 Related PR: https://github.com/encointer/encointer-js/pull/116

Changes

The crucial change was that websocket clients expect that the result of the first RPC response must only contain the subscription ID if it is a subscription, and nothing else. This ID will be used to match subsequent messages to the corresponding subscriptions.
This also affected the client a little bit, but as the only send_direct_request use case is author_submitAndWatchExtrinsic currently this could be changed relatively easy.

Notes:
While implementing this, I noticed that our rpc-server doesn't really try to comply with JSON RPC 2.0 even though adhering to that standard is quite straightforward, we mostly just have to change some data types. I created an issue for that #1624.

I expect that the CI should work once the storage has been freed, this commit was basically successful: https://github.com/integritee-network/worker/pull/1623/commits/da566a0a217a676a5e04e8d5c4ebf61bdd061bce


Containerd 0.5

This branch has a lot of changes in it.  Most notably it uses runc by default but allows containerd to die and containers can be reattached so its first class daemon-less containers.  All stdio and exit status is preserved.  It uses a shim to be the parent of the container and holds open fifos for stdio and exit events.

What're those empty example files?

Just example files showing the dir layout for the processes

Looks like compilation for some tests failed.

Ok, this is updated to work off of the runc v.0.0.8 tag


Add Periscope extractor

Coverage decreased (-0.03%) to 97.651% when pulling 35aceda58a573307c19baffd0e3a85e7214dea8c on periscope into 72717f7ce1796d4c63733bcf637bd62f66e7c3dc on master.


Docker Alpine ARM and host networking.

I needed these fixes to get Docker up and running properly here, nice side effect is the generated image should be much smaller. If we decide to avoid installing some dependencies via git (check package.json) we can remove that package too.

Yeah image size is much smaller:
tcjennings/rpi-smartthings-nodeproxy  333MB
alpine/stnp                           80.8MB

One thing to note is that I call npm install:dash inside the Dockerfile, really dependencies should be installed based on which plugins are active.