[Error when importing Flashlight] ImportError: libfl-libraries.so.0: undefined symbol: _ZN2lm5ngram6ConfigC1Ev

Question
I want to fine-tune Wav2vec with my own data. I got error when running this command:
python3.7 fairseq/train.py './labelled_manifest' --save-dir './model_finetuning_wav2vec' --wer-args '("./labelled_manifest/lm.bin","./labelled_manifest/lexicon.txt",2,-1)' --post-process letter --valid-subset valid --no-epoch-checkpoints --best-checkpoint-metric wer --num-workers 128 --max-update 400000 --sentence-avg --task audio_pretraining --arch wav2vec_ctc --w2v-path './w2v2_pre_train_model/wav2vec_small.pt' --labels ltr --apply-mask --mask-selection static --mask-other 0 --mask-length 10 --mask-prob 0.5 --layerdrop 0.1 --mask-channel-selection static --mask-channel-other 0 --mask-channel-length 64 --mask-channel-prob 0.5 --zero-infinity --feature-grad-mult 0.0 --freeze-finetune-updates 10000 --validate-after-updates 10000 --optimizer adam --adam-betas '(0.9, 0.98)' --adam-eps 1e-08 --lr 2e-05 --lr-scheduler tri_stage --warmup-steps 8000 --hold-steps 32000 --decay-steps 40000 --final-lr-scale 0.05 --final-dropout 0.0 --dropout 0.0 --activation-dropout 0.1 --criterion ctc --attention-dropout 0.0 --max-tokens 1280000 --seed 2337 --log-format json --log-interval 500 --ddp-backend no_c10d
The error is the following: NameError: name 'CriterionType' is not defined
I have successfully installed flashlight according to these steps.
I know that an issue has been opened with same error #468 but it doesn't fix my problem.
Additional Context
Im on Ubuntu 18.04
python 3.7.4
Cuda 11.2

cc @tlikhomanenko @xuqiantong

@Kamilbentounes could you first check that flashlight python tests pass and examples / imports works inside your python env? Also, could you specify fairseq commit you use?

@tlikhomanenko Thank's for your reply.
When I import flahslight or from flashlight.lib import audio I got no errors. When I tried to run examples scripts from flashlight/biding/python/example/*.py, I got this error:
from .flashlight_lib_sequence_criterion import (
ImportError: libfl-libraries.so.0: undefined symbol: _ZN2lm5ngram6ConfigC1Ev

First I used this commit 81c4d8d.
I used these steps to preprcess data and fine-tune the model.

did you install kenlm? Did you run examples with providing necessary cmd inputs to it too? Can you run only criterion example?

Yes I've installed kenlm and generated my own language model for finetuning. For examples, I run just python3.7 flashlight/bindings/python/example/criterion_example.py without any arguments (as it's not necessary to add them).
When running the criterion example, I got the same error ImportError: /home/kamil/Wav2vec/flashlight/bindings/python/libfl-libraries.so.0: undefined symbol: _ZN2lm5ngram6ConfigC1Ev

Ok, first thing to try is to build with USE_KENLM = OFF to see if problem is only in kenlm.
Could you confirm that you follow installation from here https://github.com/flashlight/flashlight/tree/master/bindings/python? Do you use conda env? Can you try to install binding into clean env and see if you see the same error?

I followed installation from the previous link. I used virtualenv for python3.
Now, after successfully installed flashlight and it dependencies, I got this error when running criterion example:
from flashlight.lib.sequence.criterion import ASGLoss, CriterionScaleMode
ModuleNotFoundError: No module named 'flashlight'
But still get no error when importing flashlight, flashlight.lib.audio or flashlight.lib.sequence. What am I doing wrong ?

No, USE_KENLM=OFF will just not install things related to kenlm, so it should be good for criterion. Could you post me what you have in site-packages for flashlight? tree -L 4 for flashlight folder there, please. Could you also post the whole output in the log when you run python setup.py install? If you can give me exact commands on env creation, all installations, etc. I could try repeat on clear ubuntu and check what is wrong.

Thank's for your reply. Here is the whole output of python3.7 setup.py install inside my env:
running install
running bdist_egg
running egg_info
writing flashlight.egg-info/PKG-INFO
writing dependency_links to flashlight.egg-info/dependency_links.txt
writing top-level names to flashlight.egg-info/top_level.txt
package init file 'flashlight/__init__.py' not found (or not a regular file)
package init file 'flashlight/lib/audio/__init__.py' not found (or not a regular file)
package init file 'flashlight/lib/sequence/__init__.py' not found (or not a regular file)
package init file 'flashlight/lib/text/__init__.py' not found (or not a regular file)
reading manifest file 'flashlight.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'flashlight.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext

 ON
-- -rdynamic supported.
-- CUDA found (library: /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so include: /usr/local/cuda/include)
-- CUDA architecture flags: -gencodearch=compute_30,code=sm_30-gencodearch=compute_35,code=sm_35-gencodearch=compute_50,code=sm_50-gencodearch=compute_52,code=sm_52-gencodearch=compute_60,code=sm_60-gencodearch=compute_61,code=sm_61-gencodearch=compute_70,code=sm_70-gencodearch=compute_75,code=sm_75-gencodearch=compute_75,code=compute_75
-- Will build flashlight libraries.
-- MKL_THREADING = OMP
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so
--   Library m: /usr/lib/x86_64-linux-gnu/libm.so
--   Library dl: /usr/lib/x86_64-linux-gnu/libdl.so
-- MKL library found
-- CBLAS found (include: /opt/intel/mkl/include, library: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;-fopenmp;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so)
-- FFTW found
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
-- Could NOT find cub (missing: cub_INCLUDE_DIRS)
-- Could not find cub - will download from source
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kamil/flashlight/bindings/python/build/temp.linux-x86_64-3.7
[  3%] Performing update step for 'pybind11'
[  3%] Performing download step (git clone) for 'CUB'
Cloning into 'CUB'...
[  4%] No configure step for 'pybind11'
[  6%] No build step for 'pybind11'
[  8%] No install step for 'pybind11'
[  9%] Completed 'pybind11'
[ 14%] Built target pybind11
Note: checking out 'c3cceac115c072fb63df1836ff46d8c60d9eb304'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at c3cceac1 update readme to 1.8.0
[ 16%] No patch step for 'CUB'
[ 18%] Performing update step for 'CUB'
[ 19%] No configure step for 'CUB'
[ 21%] No build step for 'CUB'
[ 22%] No install step for 'CUB'
[ 24%] Completed 'CUB'
[ 26%] Built target CUB
Scanning dependencies of target fl-libraries
[ 27%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cpu/ForceAlignmentCriterion.cpp.o
[ 29%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cpu/CriterionUtils.cpp.o
[ 31%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/set/Hungarian.cpp.o
[ 32%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cpu/ConnectionistTemporalClassificationCriterion.cpp.o
[ 34%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cpu/FullConnectionCriterion.cpp.o
[ 36%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cpu/ViterbiPath.cpp.o
[ 37%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Ceplifter.cpp.o
[ 39%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Dct.cpp.o
[ 40%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Derivatives.cpp.o
[ 42%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Dither.cpp.o
[ 44%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Mfcc.cpp.o
[ 45%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Mfsc.cpp.o
[ 47%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/PowerSpectrum.cpp.o
[ 49%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/PreEmphasis.cpp.o
[ 50%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/SpeechUtils.cpp.o
[ 52%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/TriFilterbank.cpp.o
[ 54%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/audio/feature/Windowing.cpp.o
[ 55%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/common/String.cpp.o
[ 57%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/common/System.cpp.o
[ 59%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/lm/ConvLM.cpp.o
[ 60%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/lm/ZeroLM.cpp.o
[ 62%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/LexiconDecoder.cpp.o
[ 63%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/LexiconFreeDecoder.cpp.o
[ 65%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/LexiconSeq2SeqDecoder.cpp.o
[ 67%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/LexiconFreeSeq2SeqDecoder.cpp.o
[ 68%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/Trie.cpp.o
[ 70%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/decoder/Utils.cpp.o
[ 72%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/dictionary/Dictionary.cpp.o
[ 73%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/dictionary/Utils.cpp.o
[ 75%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/tokenizer/PartialFileReader.cpp.o
[ 77%] Building CXX object CMakeFiles/fl-libraries.dir/flashlight/lib/text/tokenizer/Tokenizer.cpp.o
[ 78%] Building CUDA object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cuda/CriterionUtils.cu.o
[ 80%] Building CUDA object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cuda/ForceAlignmentCriterion.cu.o
[ 81%] Building CUDA object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cuda/FullConnectionCriterion.cu.o
[ 83%] Building CUDA object CMakeFiles/fl-libraries.dir/flashlight/lib/sequence/criterion/cuda/ViterbiPath.cu.o
[ 85%] Linking CUDA device code CMakeFiles/fl-libraries.dir/cmake_device_link.o
[ 86%] Linking CXX shared library ../lib.linux-x86_64-3.7/libfl-libraries.so
[ 86%] Built target fl-libraries
Scanning dependencies of target flashlight_lib_audio_feature
Scanning dependencies of target flashlight_lib_sequence_criterion
Scanning dependencies of target flashlight_lib_text_decoder
Scanning dependencies of target flashlight_lib_text_dictionary
[ 88%] Building CXX object CMakeFiles/flashlight_lib_text_decoder.dir/bindings/python/flashlight/lib/text/_decoder.cpp.o
[ 91%] Building CXX object CMakeFiles/flashlight_lib_text_dictionary.dir/bindings/python/flashlight/lib/text/_dictionary.cpp.o
[ 91%] Building CXX object CMakeFiles/flashlight_lib_sequence_criterion.dir/bindings/python/flashlight/lib/sequence/_criterion.cpp.o
[ 93%] Building CXX object CMakeFiles/flashlight_lib_audio_feature.dir/bindings/python/flashlight/lib/audio/_feature.cpp.o
[ 95%] Linking CXX shared module ../lib.linux-x86_64-3.7/flashlight/lib/text/flashlight_lib_text_dictionary.cpython-37m-x86_64-linux-gnu.so
[ 96%] Linking CXX shared module ../lib.linux-x86_64-3.7/flashlight/lib/sequence/flashlight_lib_sequence_criterion.cpython-37m-x86_64-linux-gnu.so
[ 98%] Linking CXX shared module ../lib.linux-x86_64-3.7/flashlight/lib/audio/flashlight_lib_audio_feature.cpython-37m-x86_64-linux-gnu.so
[ 98%] Built target flashlight_lib_text_dictionary
[100%] Linking CXX shared module ../lib.linux-x86_64-3.7/flashlight/lib/text/flashlight_lib_text_decoder.cpython-37m-x86_64-linux-gnu.so
[100%] Built target flashlight_lib_sequence_criterion
[100%] Built target flashlight_lib_audio_feature
[100%] Built target flashlight_lib_text_decoder

 ON
-- -rdynamic supported.
-- CUDA found (library: /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so include: /usr/local/cuda/include)
-- CUDA architecture flags: -gencodearch=compute_30,code=sm_30-gencodearch=compute_35,code=sm_35-gencodearch=compute_50,code=sm_50-gencodearch=compute_52,code=sm_52-gencodearch=compute_60,code=sm_60-gencodearch=compute_61,code=sm_61-gencodearch=compute_70,code=sm_70-gencodearch=compute_75,code=sm_75-gencodearch=compute_75,code=compute_75
-- Will build flashlight libraries.
-- MKL_THREADING = OMP
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so
--   Library m: /usr/lib/x86_64-linux-gnu/libm.so
--   Library dl: /usr/lib/x86_64-linux-gnu/libdl.so
-- MKL library found
-- CBLAS found (include: /opt/intel/mkl/include, library: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;-fopenmp;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so)
-- FFTW found
-- Could NOT find cub (missing: cub_INCLUDE_DIRS)
-- Could not find cub - will download from source
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kamil/flashlight/bindings/python/build/temp.linux-x86_64-3.7
[  3%] Performing update step for 'CUB'
[  3%] Performing update step for 'pybind11'
[  4%] No configure step for 'pybind11'
[  6%] No configure step for 'CUB'
[  9%] No build step for 'CUB'
[  9%] No build step for 'pybind11'
[ 13%] No install step for 'CUB'
[ 13%] No install step for 'pybind11'
[ 14%] Completed 'CUB'
[ 16%] Completed 'pybind11'
[ 21%] Built target CUB
[ 26%] Built target pybind11
[ 86%] Built target fl-libraries
[ 93%] Built target flashlight_lib_text_dictionary
[ 93%] Built target flashlight_lib_text_decoder
[ 96%] Built target flashlight_lib_audio_feature
[100%] Built target flashlight_lib_sequence_criterion

 ON
-- -rdynamic supported.
-- CUDA found (library: /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so include: /usr/local/cuda/include)
-- CUDA architecture flags: -gencodearch=compute_30,code=sm_30-gencodearch=compute_35,code=sm_35-gencodearch=compute_50,code=sm_50-gencodearch=compute_52,code=sm_52-gencodearch=compute_60,code=sm_60-gencodearch=compute_61,code=sm_61-gencodearch=compute_70,code=sm_70-gencodearch=compute_75,code=sm_75-gencodearch=compute_75,code=compute_75
-- Will build flashlight libraries.
-- MKL_THREADING = OMP
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so
--   Library m: /usr/lib/x86_64-linux-gnu/libm.so
--   Library dl: /usr/lib/x86_64-linux-gnu/libdl.so
-- MKL library found
-- CBLAS found (include: /opt/intel/mkl/include, library: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;-fopenmp;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so)
-- FFTW found
-- Could NOT find cub (missing: cub_INCLUDE_DIRS)
-- Could not find cub - will download from source
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kamil/flashlight/bindings/python/build/temp.linux-x86_64-3.7
[  3%] Performing update step for 'CUB'
[  3%] Performing update step for 'pybind11'
[  4%] No configure step for 'CUB'
[  6%] No configure step for 'pybind11'
[  9%] No build step for 'CUB'
[  9%] No build step for 'pybind11'
[ 13%] No install step for 'pybind11'
[ 13%] No install step for 'CUB'
[ 16%] Completed 'CUB'
[ 16%] Completed 'pybind11'
[ 21%] Built target CUB
[ 26%] Built target pybind11
[ 86%] Built target fl-libraries
[ 93%] Built target flashlight_lib_audio_feature
[ 93%] Built target flashlight_lib_text_dictionary
[ 96%] Built target flashlight_lib_text_decoder
[100%] Built target flashlight_lib_sequence_criterion

 ON
-- -rdynamic supported.
-- CUDA found (library: /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so include: /usr/local/cuda/include)
-- CUDA architecture flags: -gencodearch=compute_30,code=sm_30-gencodearch=compute_35,code=sm_35-gencodearch=compute_50,code=sm_50-gencodearch=compute_52,code=sm_52-gencodearch=compute_60,code=sm_60-gencodearch=compute_61,code=sm_61-gencodearch=compute_70,code=sm_70-gencodearch=compute_75,code=sm_75-gencodearch=compute_75,code=compute_75
-- Will build flashlight libraries.
-- MKL_THREADING = OMP
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - gomp - pthread - m - dl]
--   Library mkl_intel_lp64: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so
--   Library mkl_gnu_thread: /opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so
--   Library mkl_core: /opt/intel/mkl/lib/intel64/libmkl_core.so
--   Library gomp: -fopenmp
--   Library pthread: /usr/lib/x86_64-linux-gnu/libpthread.so
--   Library m: /usr/lib/x86_64-linux-gnu/libm.so
--   Library dl: /usr/lib/x86_64-linux-gnu/libdl.so
-- MKL library found
-- CBLAS found (include: /opt/intel/mkl/include, library: /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so;/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64/libmkl_core.so;-fopenmp;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so)
-- FFTW found
-- Could NOT find cub (missing: cub_INCLUDE_DIRS)
-- Could not find cub - will download from source
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kamil/flashlight/bindings/python/build/temp.linux-x86_64-3.7
[  3%] Performing update step for 'CUB'
[  3%] Performing update step for 'pybind11'
[  6%] No configure step for 'CUB'
[  6%] No configure step for 'pybind11'
[  8%] No build step for 'pybind11'
[  9%] No build step for 'CUB'
[ 11%] No install step for 'pybind11'
[ 13%] No install step for 'CUB'
[ 16%] Completed 'pybind11'
[ 16%] Completed 'CUB'
[ 26%] Built target CUB
[ 26%] Built target pybind11
[ 86%] Built target fl-libraries
[ 90%] Built target flashlight_lib_text_dictionary
[ 93%] Built target flashlight_lib_text_decoder
[ 96%] Built target flashlight_lib_sequence_criterion
[100%] Built target flashlight_lib_audio_feature
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.7/libfl-libraries.so.0.3 -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.7/libfl-libraries.so -> build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/flashlight
creating build/bdist.linux-x86_64/egg/flashlight/lib
creating build/bdist.linux-x86_64/egg/flashlight/lib/sequence
copying build/lib.linux-x86_64-3.7/flashlight/lib/sequence/criterion.py -> build/bdist.linux-x86_64/egg/flashlight/lib/sequence
copying build/lib.linux-x86_64-3.7/flashlight/lib/sequence/flashlight_lib_sequence_criterion.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/flashlight/lib/sequence
copying build/lib.linux-x86_64-3.7/flashlight/lib/sequence/criterion_torch.py -> build/bdist.linux-x86_64/egg/flashlight/lib/sequence
copying build/lib.linux-x86_64-3.7/flashlight/lib/__init__.py -> build/bdist.linux-x86_64/egg/flashlight/lib
creating build/bdist.linux-x86_64/egg/flashlight/lib/text
copying build/lib.linux-x86_64-3.7/flashlight/lib/text/decoder.py -> build/bdist.linux-x86_64/egg/flashlight/lib/text
copying build/lib.linux-x86_64-3.7/flashlight/lib/text/flashlight_lib_text_dictionary.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/flashlight/lib/text
copying build/lib.linux-x86_64-3.7/flashlight/lib/text/dictionary.py -> build/bdist.linux-x86_64/egg/flashlight/lib/text
copying build/lib.linux-x86_64-3.7/flashlight/lib/text/flashlight_lib_text_decoder.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/flashlight/lib/text
creating build/bdist.linux-x86_64/egg/flashlight/lib/audio
copying build/lib.linux-x86_64-3.7/flashlight/lib/audio/flashlight_lib_audio_feature.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/flashlight/lib/audio
copying build/lib.linux-x86_64-3.7/flashlight/lib/audio/feature.py -> build/bdist.linux-x86_64/egg/flashlight/lib/audio
copying build/lib.linux-x86_64-3.7/libfl-libraries.so.0 -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/sequence/criterion.py to criterion.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/sequence/criterion_torch.py to criterion_torch.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/text/decoder.py to decoder.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/text/dictionary.py to dictionary.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/flashlight/lib/audio/feature.py to feature.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying flashlight.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying flashlight.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying flashlight.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying flashlight.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying flashlight.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating dist
creating 'dist/flashlight-1.0.0-py3.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing flashlight-1.0.0-py3.7-linux-x86_64.egg
creating /usr/local/lib/python3.7/site-packages/flashlight-1.0.0-py3.7-linux-x86_64.egg
Extracting flashlight-1.0.0-py3.7-linux-x86_64.egg to /usr/local/lib/python3.7/site-packages
Removing flashlight 1.0.0 from easy-install.pth file
Adding flashlight 1.0.0 to easy-install.pth file

Installed /usr/local/lib/python3.7/site-packages/flashlight-1.0.0-py3.7-linux-x86_64.egg
Processing dependencies for flashlight==1.0.0
Finished processing dependencies for flashlight==1.0.0

Here is the output of tree -L 4 inside the flashlight folder:
.
├── EGG-INFO
│   ├── dependency_links.txt
│   ├── native_libs.txt
│   ├── not-zip-safe
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   └── top_level.txt
├── flashlight
│   └── lib
│       ├── audio
│       │   ├── feature.py
│       │   ├── flashlight_lib_audio_feature.cpython-37m-x86_64-linux-gnu.so
│       │   └── __pycache__
│       ├── __init__.py
│       ├── __pycache__
│       │   └── __init__.cpython-37.pyc
│       ├── sequence
│       │   ├── criterion.py
│       │   ├── criterion_torch.py
│       │   ├── flashlight_lib_sequence_criterion.cpython-37m-x86_64-linux-gnu.so
│       │   └── __pycache__
│       └── text
│           ├── decoder.py
│           ├── dictionary.py
│           ├── flashlight_lib_text_decoder.cpython-37m-x86_64-linux-gnu.so
│           ├── flashlight_lib_text_dictionary.cpython-37m-x86_64-linux-gnu.so
│           └── __pycache__
├── libfl-libraries.so
├── libfl-libraries.so.0
└── libfl-libraries.so.0.3

10 directories, 20 files

All steps I followed:

virtualenv -p python3.7 ./flaghlight-venv then source ./flaghlight-venv/bin/activate.
python3.7 -m pip install packaging torch
KenLM
git clone https://github.com/kpu/kenlm.git
sudo apt install build-essential cmake libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-test-dev libeigen3-dev zlib1g-dev libbz2-dev liblzma-dev
mkdir -p build && cd build
cmake ..
make -j 4
sudo make install
OpenBLAS
git clone https://github.com/xianyi/OpenBLAS.git && cd OpenBLAS
mkdir -p build && cd build
cmake ..
make -j 4
sudo make install
FFTW3
./configure
make
make install
Flaghlight
git clone https://github.com/flashlight/flashlight.git && cd flashlight
cd bindings/python
python3 setup.py install

Here are some tests I run:
>>> import flashlight
>>> from flashlight.lib import sequence
>>> from flashlight.lib.sequence import criterion
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kamil/flashlight/bindings/python/flashlight/lib/sequence/criterion.py", line 9, in <module>
    from .flashlight_lib_sequence_criterion import (
ImportError: libfl-libraries.so.0: cannot open shared object file: No such file or directory
>>>

criterion_example.py:
(flashlight-venv) kamil@kamil-Bentounes:~/flashlight/bindings/python$ python3.7 example/criterion_example.py
Traceback (most recent call last):
  File "example/criterion_example.py", line 12, in <module>
    from flashlight.lib.sequence.criterion import ASGLoss, CriterionScaleMode
ModuleNotFoundError: No module named 'flashlight'

Hello @tlikhomanenko,
Any updates ?

Hey @tlikhomanenko !
Thank you very much ! It works.. But I don't have enough GPU ressources to run the train script :'(.. Can I run it on colab ? Since I had to install all requirements on  my local laptop ?

can you run then from the place where you run fairseq python and try in it do import of flashlight from flashlight.lib.text.dictionary import create_word_dict, load_words? Is it working?

I've tested it out from the virtual environment and it works.. Thanks a lot @tlikhomanenko  for your help

Hi, I have the same problem as you,I successfully installed the flashlight according to your dialogue above.When I run the example script ,it shows that ModuleNotFoundError: [No module named 'flashlight.lib'],and when I run fairseq python,it shows that [NameError: name 'CriterionType' is not defined].Could you tell me how you solved the problem? Much appreciated.

Hi @mengweijing
I too am facing the same issue, did u resolve it?

Hi @tlikhomanenko ,
I have tried the different ways you mentioned, to install flashlight in colab, as shown in below pic. But I am getting flashlight.lib ModuleNotFound error still. How to solve it?

Hi @tlikhomanenko , I have tried the different ways you mentioned, to install flashlight in colab, as shown in below pic. But I am getting flashlight.lib ModuleNotFound error still. How to solve it?

Did you find the solution to this issue?

@Amartyaveer — these bindings now live in https://github.com/flashlight/text/. Follow the install instructions there, and open an issue if you run into any problems.


How do i share folder from container to host so i can edit container code in my host IDE?

Description
I want to edit my docker container source code in host IDE so I want to expose a folder in a docker container (via a share) in a named host folder. I dont want to mount a host folder into a container, but the other way around. I cant find any online documentation. If its not possible this seems like a serious limitation of docker and impairment to development on the host.  If its not possible, how may i best use my host machine to make live changes to source code in a container? Or am i limited to editing code in a container folder from the containers command line?
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:
Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 14
Server Version: 17.03.0-ce
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 172
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.4.52-boot2docker
Operating System: Boot2Docker 17.03.0-ce (TCL 7.2); HEAD : f11a204 - Thu Mar  2 00:14:47 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.8 MiB
Name: default
ID: CCJC:TFPL:MEEY:QXM3:JQLP:SGOM:H5YR:MLY2:P5DK:P3MF:F2SF:5ZGM
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 34
 Goroutines: 70
 System Time: 2017-03-31T10:47:19.838409976Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 <IP_ADDRESS>/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox 5+

"reverse mounting" a container's filesystem to the host is not something that's supported.
In general, making "live changes" in a container throws away the biggest
advantage of using containers; having a reproducible way to run your
application. Instead of making changes to a container, you replace the
container with a new version if updates are needed. This allows you to test,
and verify a container (image) before it's deployed, and also allows rolling
back to a previous version when needed.
During development, you can check out your source code from your source
control (Git, SVN) start a container and bind-mount your local source files into
the container; once changes are ready to deploy (and commited to your source
control), rebuild the image with the new version of the source, test, and
deploy the image.
Having said the above, some approaches that may work for you;

use a volume-driver plugin (note; that listing is for "non managed" plugins; docker 17.03 adds support for managed plugins that can be installed through docker plugin install) that stores the files on a location that's accessible by the IDE. For example, the "local-persist" plugin allows you to specify a custom path where volume files are stored. There's also managed plugins that allow (e.g.) to use sshfs or nfs to share a filesystem with other hosts. Keep in mind that volumes are propagated the first time the container is run, so "pulling / starting" a new version of the container won't update those files
use a "helper" container that shares a volume with the container you want to edit (this assumes the files you want to edit are in a volume). The "helper" container can run, e.g. an FTP or SSH server, allow you to access/synchronize the files.

This is largely a duplicate of some existing issues (listed below), so let me close this

https://github.com/moby/moby/issues/19990 ("[feature] Allow for named volumes to specify host mount point")
https://github.com/moby/moby/issues/26872 ("[FEATURE] Access container directory on the host")
https://github.com/moby/moby/issues/29023 ("Feature request: Configurable source for volume")
https://github.com/moby/moby/issues/34800 ("Mount volumes from container to host under specific paths")


Add iptables rule creation in noVNC launch script

Functional Requirements
For launching a standalone VM by booting an img file directly, we need to allocate a port on the webserver for accessing the VM. Traffic needs to be allowed to this webserver port by adding an iptables rules to do so.
/home//sahil/iptables.rules is the script in dev where we need to add the iptables rule.
Example
# Allowing port 1337 for testing standalone VM kali-test iptables -A INPUT -m conntrack --ctstate NEW,ESTABLISHED,RELATED -p tcp --dport 1337 -j ACCEPT
To automate this step, the following needs to be done

Add this rule in /var/www/noVNC-0.6.2/utils/launch.sh

Undo this rule when a ctrl+C input is received to terminate this script, ensuring traffic to the chosen port is no longer allowed

Update the guide's step 4, removing the manual step. /var/www/noVNC-0.6.2/utils/launch.sh

The script should also include conditional check if there is already a rule for the port or not.
[ In case if some one else is spinning the machine on the same port, port might not be available to spin new machine and it also adds double rule to the iptables. ]
iptables -C INPUT -m conntrack --ctstate NEW,ESTABLISHED,RELATED -p tcp --dport 1337 -j ACCEPT
if  [ $(echo $?) == '1' ] && [ $requires_internet = 'f' ]
then
echo "Rule Added"
iptables -I FORWARD 2 -i bond0.$vlan -s 10.$vlan.1.0/24 -j REJECT
else
echo "No need to add the rule"
fi
This would do the job


🐞 - Exported image should not have the active background if there is only one tab

Which @codeimage/* package(s) are the source of the bug?
codeimage
Please provide a screenshot or a video to a minimal reproduction of the bug
No response
Description

Expected export

Which browsers have you used?

[ ] Chrome
[ ] Firefox
[ ] Safari
[ ] Edge

Which operating systems have you used?

[ ] macOS
[ ] Windows
[ ] Linux
[ ] iOS
[ ] Android

Started exploring this issue, anyone working on this one

Hi @piyushjohnson, I think no. I can assign this issue to you 😄
If you need any information or support, feel free to ask!
Just a small recommandation

Hi @piyushjohnson, I think no. I can assign this issue to you 😄
If you need any information or support, feel free to ask!
Just a small recommandation: currently the export function clone each node and exports everything is present in the DOM. The simplest way to resolve this issue is to remove the active style of the tab if there is only one tab present.
https://github.com/riccardoperra/codeimage/tree/main/apps/codeimage/src/components/Terminal/Tabs


Iframe not working until  is rendered within a

Is this a bug report or a feature request?
Bug
Have you read the guidelines regarding bug report?
Yes
Have you read the documentation in its entirety?
Yes
Have you made sure that your issue hasn't already been reported/solved?
Yes
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Both platform
Is the bug reproductible in a production environment (not a debug one)?
Yes
Environment
Environment:
"react": "16.8.6",
"react-native": "0.59.9",
"react-native-render-html": "^4.1.2",
Target Platform:
Android (8.0)
iOS (11)
Steps to Reproduce
Just place an iframe in your html content
Expected Behavior
The video should be visible
Actual Behavior
The video is not displayed until you wrap a <ScrollView />.
Reproducible Demo
https://snack.expo.io/@pixelize_/webview-bug

Any news on this? Anyone able to get videos to work?

@pixelize Because the iframe rendering highly depends on the WebView you are using, and react-native-webview is now a peer dependency, I suggest you try again with the latest RNWV version. I'm closing now, but you are free to reopen if you have reproduced the issue with latest webview version. In which case, please post a new snack!


Asp.NET Core MVC confusing View controller with Api controller

Example: https://github.com/jonatanrinckus/RouteMvcIssue
The issue:
When I have two controller, like this:
https://github.com/jonatanrinckus/RouteMvcIssue/blob/master/RouteIssue/Controllers/SomeController.cs
with the action:
public IActionResult Create()
	    {
		    return View();
	    }

and
https://github.com/jonatanrinckus/RouteMvcIssue/blob/master/RouteIssue/Controllers/Api/SomeController.cs
with the actions:
public IActionResult Get()
	    {
		    return Ok("Something");
	    }

		[HttpPost]
		public IActionResult Create(object something)
		{
			return Ok();
		}

in my view/layout:
https://github.com/jonatanrinckus/RouteMvcIssue/blob/master/RouteIssue/Views/Shared/_Layout.cshtml
I have:

Some

or

@Html.ActionLink("Some Action Link", "Create", "Some")

the result are:

Some

Some Action Link

How you can see, the href is calling the Api, not the View, it happen when I have two actions with the same name, like the create action, but one is a HttpGet on the view controller and the other is a HttpPost on the api, and if I click on the link, it call the Get action on Api controller.

URL generation in MVC is based on controller/action names, so if the names are the same then the attribute routed action is consider first, which is the result that you found.
A few suggestions for how you can solve your issue, pick whichever you like:

Give the controllers different names
Use areas - if you put your API controllers in an area then you won't accidentally link to them, you will have to specify the area if you want to link to an API controller
Used named routes

Great, using areas solve the issue and I guess is the best way.
But I think it is a bug. Why? Because the Create action on the Api controller is a Post method and not a Get method and on a Action Link or 'a' tag helper, I just can use Get Methods. Do you agree?

Again, areas do not work.
If I use area, I need to specify de name of the Action, like: /api/some/get and it is not correct.
I try to add [Route("")] to the action, but it stop to work, can't get the action with /api/some/get or /api/some/
If I put my MapRoute like this:
routes.MapAreaRoute(
					name: "Api",
					areaName: "Api",
		            template: "Api/{controller}/{action?}/{id?}");

And a [ActionName("")], then I can acesss on /api/some/
But if I need to access with some parameter, like api/some/1 to the action:
public IActionResult Get(int id)
		{
			return Ok("Something" + id);
		}

Using [ActionName("{id}")] or [Route("{id}")], don't work.
So, how I will do a right Api, if the routes do not work?

Sorry, I should have explained a bit more. You don't need to define a new conventional route for your API controllers.
Just add [Area("API")] to them.

Ow, thanks, I was following the link.
Know it work correct.


VisionOS: can't compile

Error on file Utils.swift, extension CGSize:
Missing return in getter expected to return 'CGSize`

Hey @nguyenpham , unfortunately we do not support visionOS for now, you are most welcome to commit a PR adding this functionality, have a wonderful day!


Pulling policy from private repo only succeeds for newly cloned repos

I'm still experimenting with the Docker Compose example. When first running the OPAL server the repo is cloned, polling interval is set to 30, so every 30 seconds the server attempts to pull from the repo. Shutting it down and restarting it, it correctly detects that the volume with the repo still exists and prints this line:
opaldemo-opal_server-1  | 2023-01-30T12:06:21.169333+0000 | 7 | opal_common.sources.git_policy_source   | INFO  | SKIPPED cloning policy repo, found existing repo at '/opal/regoclone/opal_repo_clone' with remotes<EMAIL_ADDRESS>
This time however, every attempt to pull is unsuccessful:
opaldemo-opal_server-1  | 2023-01-30T12:07:03.687480+0000 | 7 | opal_common.sources.base_policy_source  |ERROR  | Error occured during polling task check_for_changes: Cmd('git') failed due to: exit code(1)
opaldemo-opal_server-1  |   cmdline: git pull -v origin
opaldemo-opal_server-1  |   stderr: 'fatal: Could not read from remote repository.'

Waiting does nothing, the poll never succeeds. Deleting the volume and forcing the Server to re-clone the repo works. The same docker-compose file with a public repo works fine.
docker-compose.yml:
version: "3.8"
services:
  opal_server:
    image: permitio/opal-server:latest
    environment:
      - OPAL_POLICY_REPO_URL=git@github.com:******
      - OPAL_POLICY_REPO_SSH_KEY=${OPAL_POLICY_REPO_SSH_KEY}
      - POLICY_REPO_MANIFEST_PATH=policy
      - OPAL_POLICY_REPO_MAIN_BRANCH=main
      - OPAL_POLICY_REPO_POLLING_INTERVAL=30
    ports:
      - "7002:7002"

OPAL version

Version: 0.3.1 (I'm running latest image)

Logs
First startup
[+] Running 1/0
 - Container opaldemo-opal_server-1  Recreated                                                                                0.1s
Attaching to opaldemo-opal_server-1
opaldemo-opal_server-1  | [2023-01-30 12:10:17 +0000] [1] [INFO] Starting gunicorn 20.1.0
opaldemo-opal_server-1  | [2023-01-30 12:10:17 +0000] [1] [INFO] Listening at: http://<IP_ADDRESS>:7002 (1)
opaldemo-opal_server-1  | [2023-01-30 12:10:17 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
opaldemo-opal_server-1  | [2023-01-30 12:10:17 +0000] [7] [INFO] Booting worker with pid: 7
opaldemo-opal_server-1  | 2023-01-30T12:10:17.641947+0000 | opal_server.server                      | INFO  | OPAL was not provided with JWT encryption keys, cannot verify api requests!
opaldemo-opal_server-1  | 2023-01-30T12:10:17.642205+0000 | opal_server.pubsub                      | INFO  | Pub/Sub broadcaster is off
opaldemo-opal_server-1  | 2023-01-30T12:10:17.679295+0000 | opal_server.server                      | INFO  | *** OPAL Server Startup ***
opaldemo-opal_server-1  | 2023-01-30T12:10:17.679595+0000 | opal_server.server                      | INFO  | leadership lock acquired, leader pid: 7
opaldemo-opal_server-1  | 2023-01-30T12:10:17.679698+0000 | opal_server.server                      | INFO  | listening on webhook topic: 'webhook'
opaldemo-opal_server-1  | 2023-01-30T12:10:17.680449+0000 | opal_server.server                      | INFO  | Policy repo will be cloned to: /opal/regoclone/opal_repo_clone
opaldemo-opal_server-1  | 2023-01-30T12:10:17.681145+0000 | fastapi_websocket_pubsub.event_notifier | INFO  | New subscription {'id': 'ee171ffb62194a8ca460fb99740b8fc0', 'subscriber_id': '7addaabf7e764da897b64cbed41c218b', 'topic': 'webhook', 'callback': functools.partial(<function trigger_repo_watcher_pull at 0x7f7591e7ab00>, <opal_server.policy.watcher.task.PolicyWatcherTask object at 0x7f758fc76380>), 'notifier_id': None}
opaldemo-opal_server-1  | 2023-01-30T12:10:17.681328+0000 | opal_server.policy.watcher.task         | INFO  | Launching policy watcher
opaldemo-opal_server-1  | 2023-01-30T12:10:17.681921+0000 | opal_server.data.data_update_publisher  | INFO  | [7] Starting Polling Updates
opaldemo-opal_server-1  | 2023-01-30T12:10:17.684244+0000 | opal_common.git.repo_cloner             | INFO  | Cloning repo from 'git@github.com:********.git' to '/opal/regoclone/opal_repo_clone' (branch: 'main')
opaldemo-opal_server-1  | 2023-01-30T12:10:19.211179+0000 | opal_common.git.repo_cloner             | INFO  | Clone succeeded
opaldemo-opal_server-1  | 2023-01-30T12:10:19.216115+0000 | opal_common.sources.base_policy_source  | INFO  | Launching polling task, interval: 30 seconds
opaldemo-opal_server-1  | 2023-01-30T12:10:19.216622+0000 | opal_common.sources.git_policy_source   | INFO  | Pulling changes from remote: 'origin'
opaldemo-opal_server-1  | 2023-01-30T12:10:20.674853+0000 | opal_common.sources.git_policy_source   | INFO  | No new commits: HEAD is at '434a482c87b4f2d6065290f62a4eb993b9f0f0fa'
Gracefully stopping... (press Ctrl+C again to force)

Second startup
[+] Running 1/0
 - Container opaldemo-opal_server-1  Created                                                                                0.0s
Attaching to opaldemo-opal_server-1
opaldemo-opal_server-1  | [2023-01-30 12:10:26 +0000] [1] [INFO] Starting gunicorn 20.1.0
opaldemo-opal_server-1  | [2023-01-30 12:10:26 +0000] [1] [INFO] Listening at: http://<IP_ADDRESS>:7002 (1)
opaldemo-opal_server-1  | [2023-01-30 12:10:26 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
opaldemo-opal_server-1  | [2023-01-30 12:10:26 +0000] [6] [INFO] Booting worker with pid: 6
opaldemo-opal_server-1  | 2023-01-30T12:10:27.119227+0000 | opal_server.server                      | INFO  | OPAL was not provided with JWT encryption keys, cannot verify api requests!
opaldemo-opal_server-1  | 2023-01-30T12:10:27.119497+0000 | opal_server.pubsub                      | INFO  | Pub/Sub broadcaster is off
opaldemo-opal_server-1  | 2023-01-30T12:10:27.153773+0000 | opal_server.server                      | INFO  | *** OPAL Server Startup ***
opaldemo-opal_server-1  | 2023-01-30T12:10:27.153964+0000 | opal_server.server                      | INFO  | leadership lock acquired, leader pid: 6
opaldemo-opal_server-1  | 2023-01-30T12:10:27.154009+0000 | opal_server.server                      | INFO  | listening on webhook topic: 'webhook'
opaldemo-opal_server-1  | 2023-01-30T12:10:27.154114+0000 | opal_server.server                      | INFO  | Policy repo will be cloned to: /opal/regoclone/opal_repo_clone
opaldemo-opal_server-1  | 2023-01-30T12:10:27.154487+0000 | fastapi_websocket_pubsub.event_notifier | INFO  | New subscription {'id': '2a3af0060678434cb572d51d3d7bcb21', 'subscriber_id': 'e86c3fdcfd984e0881af2a232de66425', 'topic': 'webhook', 'callback': functools.partial(<function trigger_repo_watcher_pull at 0x7f53e1dd6b00>, <opal_server.policy.watcher.task.PolicyWatcherTask object at 0x7f53dfbd6380>), 'notifier_id': None}
opaldemo-opal_server-1  | 2023-01-30T12:10:27.154621+0000 | opal_server.policy.watcher.task         | INFO  | Launching policy watcher
opaldemo-opal_server-1  | 2023-01-30T12:10:27.155039+0000 | opal_server.data.data_update_publisher  | INFO  | [6] Starting Polling Updates
opaldemo-opal_server-1  | 2023-01-30T12:10:27.158747+0000 | opal_common.sources.git_policy_source   | INFO  | SKIPPED cloning policy repo, found existing repo at '/opal/regoclone/opal_repo_clone' with remotes: ['git@github.com:********'])
opaldemo-opal_server-1  | 2023-01-30T12:10:27.164241+0000 | opal_common.sources.base_policy_source  | INFO  | Launching polling task, interval: 30 seconds
opaldemo-opal_server-1  | 2023-01-30T12:10:27.164853+0000 | opal_common.sources.git_policy_source   | INFO  | Pulling changes from remote: 'origin'
opaldemo-opal_server-1  | 2023-01-30T12:10:31.511693+0000 | opal_common.sources.base_policy_source  |ERROR  | Error occured during polling task check_for_changes: Cmd('git') failed due to: exit code(1)
opaldemo-opal_server-1  |   cmdline: git pull -v origin
opaldemo-opal_server-1  |   stderr: 'fatal: Could not read from remote repository.'
Gracefully stopping... (press Ctrl+C again to force)

Hi @maurice-freitag - thanks for reporting.
@asafc , @roekatz  - who'd be best to look into this?
@maurice-freitag can you try and run Git manually on the server and see if it works / what errors you get?
Might provide additional insight

Could this be the issue?
$ ssh -vT<EMAIL_ADDRESS>OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n  15 Mar 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to github.com [<IP_ADDRESS>] port 22.
debug1: Connection established.
debug1: identity file //opal/.ssh/id_rsa type -1
debug1: identity file //opal/.ssh/id_rsa-cert type -1
debug1: identity file //opal/.ssh/id_dsa type -1
debug1: identity file //opal/.ssh/id_dsa-cert type -1
debug1: identity file //opal/.ssh/id_ecdsa type -1
debug1: identity file //opal/.ssh/id_ecdsa-cert type -1
debug1: identity file //opal/.ssh/id_ecdsa_sk type -1
debug1: identity file //opal/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file //opal/.ssh/id_ed25519 type -1
debug1: identity file //opal/.ssh/id_ed25519-cert type -1
debug1: identity file //opal/.ssh/id_ed25519_sk type -1
debug1: identity file //opal/.ssh/id_ed25519_sk-cert type -1
debug1: identity file //opal/.ssh/id_xmss type -1
debug1: identity file //opal/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Debian-5+deb11u1
debug1: Remote protocol version 2.0, remote software version babeld-9727ed99
debug1: no match: babeld-9727ed99
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher<EMAIL_ADDRESS>MAC: <implicit> compression: none
debug1: kex: client->server cipher<EMAIL_ADDRESS>MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in //opal/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: //opal/.ssh/id_rsa
debug1: Will attempt key: //opal/.ssh/id_dsa
debug1: Will attempt key: //opal/.ssh/id_ecdsa
debug1: Will attempt key: //opal/.ssh/id_ecdsa_sk
debug1: Will attempt key: //opal/.ssh/id_ed25519
debug1: Will attempt key: //opal/.ssh/id_ed25519_sk
debug1: Will attempt key: //opal/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: //opal/.ssh/id_rsa
debug1: Trying private key: //opal/.ssh/id_dsa
debug1: Trying private key: //opal/.ssh/id_ecdsa
debug1: Trying private key: //opal/.ssh/id_ecdsa_sk
debug1: Trying private key: //opal/.ssh/id_ed25519
debug1: Trying private key: //opal/.ssh/id_ed25519_sk
debug1: Trying private key: //opal/.ssh/id_xmss
debug1: No more authentication methods to try.
<EMAIL_ADDRESS>Permission denied (publickey).

The correct key (~/.ssh/opal_repo_ssh_key) is never mentioned here.

@orishavit @roekatz can one of your please look into it?
(@maurice-freitag has provided a docker compose, start there)

Hey @maurice-freitag, can you check if the value you pass to OPAL_POLICY_REPO_SSH_KEY is encoded as documented here? https://docs.opal.ac/getting-started/running-opal/run-opal-server/policy-repo-location - i.e. one line, replace line breaks with _.

Hey again, I successfully reproduced the problem with your docker-compose file, and created a PR (#366) with a fix, should be available in the next couple of days.

Hey again, I successfully reproduced the problem with your docker-compose file, and created a PR (#366) with a fix, should be available in the next couple of days.

That was fast, thank you 😊

fixed by #366


FIPS requirement for "bcprov"

Hello,
I have really enjoyed using bouncy castle over the years.
We are upgrading our products to be FIPS compliant.
I noticed you do not have a version of FIPS for "bcprov" library here: http://central.maven.org/maven2/org/bouncycastle/ does anyone know why?
Sincerely,
Pranav Rao

It's there, it's just called bc-fips.


Turkish main

added The README_tr.md & CONTRIBUTING_tr.md in TURKISH language.
If there are issues  in malayalam language or french language please do let me know .
also as i said i willl be doing there lessons translation in future and may also add one more langauge .
Thankyou all

Please review the translations.md file prior to adding additional languages, ideally it would be great if you could focus on the languages already started then in the future add additional languages.

Please review the translations.md file prior to adding additional languages, ideally it would be great if you could focus on the languages already started then in the future add additional languages.

Alright 👍🏻


[orga] make the "New Event" button on the orga frontpage more consitent

The next inside the "New Event" button is all in one line, which can look a little wonky sometimes. Breaking it into two lines looks nicer, in my opinion:

Hahah, would you mind shortening the test to "Uh, a new event?"? – It's just to test that we are a) logged in and b) redirected to the cross-event dashboard.

Welp. 😁 Fixed.

Hmm, another consistent solution would be to define a maximum width for dashboard tiles and letting normal text rendering take care of the line break. What do you think?

Letting normal text rendering do the job means that the "Uh, a new event?"-text will again break at some random point. There seems to be a way around that by wrapping the lines into s, but it doesn't seem to be a clean solution in for our use case.
How about we define a maximum width and handle the "Uh, a new event?"-text via
, like before. I adapted the code to do this.

I'll merge it and I suppose we will revisit it when people have more than a few tiles. :) Thanks!


我们有很急切的事寻求您的帮忙！请第一时间联系我，电话/微信：17512549214<EMAIL_ADDRESS>

我们有很急切的事寻求您的帮忙！请第一时间联系我，电话/微信：17512549214<EMAIL_ADDRESS>PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING
Before submitting a PR, please, make sure that:

Changes are in a separate branch, not in master.
The branch contains only one commit on top of master (if not, squash them into
one commit).

The commit message contains fixes #XXXX or closes #XXXX to auto-close the
issue(s) that the PR fixes (if any).
Tests for the changes have been added (for bug fixes / features).
Documentation has been added / updated (if applicable).
All new and existing tests passed locally (if not, fix them first and amend
the commit).

IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing
guidelines.
PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING

请求您删除部分侵权代码！请您尽快联系我，电话/微信：17512549214<EMAIL_ADDRESS>


feat(styles): typography css support

@yinonov - maybe we should add to the docs how this works.

What's with the double import of fonts (mono etc.)
That it auto applies styles to certain elements
Doesn't have to be a part of this PR but a task for laters.


Journey-Policymaker

Please ensure your pull request adheres to the following guidelines:

[x] Tests for new functionality/models or Tests to reproduce the bug-fix in code.
[x] Updated documentation of features that add new functionality.
[x] Update CHANGELOG.md with major/minor changes.

The previous PR (https://github.com/econ-ark/HARK/pull/1195) did not include the latest change. I updated the params for the lifecycle case to standard ones.

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

Coverage data is based on head (be130c3) compared to base (af14685).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1214   +/-   ##
=======================================
  Coverage   73.34%   73.34%
=======================================
  Files          74       74
  Lines       12130    12130
=======================================
  Hits         8897     8897
  Misses       3233     3233

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

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


Dependency too heavy

I'm trying to port poppler
It depends on clang-format
vcpkg install llvm[clang-tools-extra]
clang-format is small, but for dependencies, it builds for hours
λ vcpkg install llvm[clang-tools-extra]
Computing installation plan...
The following packages will be built and installed:
    llvm[clang,clang-tools-extra,core,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,target-x86,tools]:x64-windows
Detecting compiler hash for triplet x64-windows...
Starting package 1/1: llvm:x64-windows
Building package llvm[clang,clang-tools-extra,core,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,target-x86,tools]:x64-windows...
Could not locate cached archive:
%localappdata%\vcpkg\archives\4c\4c9803c9697ac545a97a8cbb5bbe8485f2c767d2.zip
-- Note: llvm only supports static library linkage. Building static library.
-- Downloading https://github.com/llvm/llvm-project/archive/llvmorg-10.0.0.tar.gz...
-- Extracting source /vcpkg-root/downloads/llvm-llvm-project-llvmorg-10.0.0.tar.gz
-- Applying patch 0001-allow-to-use-commas.patch
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0003-fix-vs2019-v16.6.patch
-- Applying patch 0004-fix-dr-1734.patch
-- Applying patch 0005-fix-tools-path.patch
-- Using source at /vcpkg-root/buildtrees/llvm/src/org-10.0.0-cfac4b4b0f.clean
-- Downloading https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-amd64.zip...
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel

Installed successfully, vcpkg-root\buildtrees\llvm takes 102GB (109,870,017,874 bytes) 😭
Something like vcpkg-root\downloads\tools is better in the case, i.e. simply download clang-foramt.exe as a tool.

Sorry for that but we hope that all binaries will be built, which also matches the behavior of open source.

Give a hint warning about the size is helpful.
Then I can choose to download LLVM clang binary from the official site, and make clang-format be in PATH.
LLVM (with clang tools ...) installer is 172MB

https://github.com/microsoft/vcpkg/blob/62fe6ffbbbae9149fb8c48cde2a34b809e2a3008/scripts/cmake/vcpkg_find_acquire_program.cmake#L297-L327
We can refer to clang to find clang-format.


Stacktrace is not generated for uncaught CPP Exceptions

The provided Crasher.mm class was used to test this.
KSCrash correctly identifies the crash type and reason, however the stack trace for the crashed thread is empty.
Tested on iOS 14.3
excerpt from the KSCrash report JSON
  crash =     {
       error =         {
           address = 0;
           "cpp_exception" =             {
               name = MyException;
           };
           mach =             {
               code = 0;
               exception = 10;
               "exception_name" = "EXC_CRASH";
               subcode = 0;
           };
           reason = "Something bad happened...";
           signal =             {
               code = 0;
               name = SIGABRT;
               signal = 6;
           };
           type = "cpp_exception";
       };
       threads =         (
                       {
               backtrace =                 {
                   contents =                     (
                   );
                   skipped = 0;
               };
               crashed = 1;
               "current_thread" = 1;
               index = 0;
               "notable_addresses" =                 {
               };
           }, .......

Not happened in my KSCrash Demo App.But happened in my project.

Not happened in my KSCrash Demo App.But happened in my project.

me too

I solved this problem by removing use_frameworks from podfile!

Resolved in the same resolution.


GADTs and recursive types

tl;dr: GADTs can be implemented with existing Flow features, but a problem checking recursive types with varying constraints on type variables, and a problem with accumulated constraints prevent the implementation from type-checking.
There are multiple ways to implement algebraic data types with flow. One option that I think is interesting is to encode values as pattern match functions.
type Tree<A> = <R>(
  Node:  (left: Tree<A>, value: A, right: Tree<A>) => R,
  Empty: () => R
) => R

With this pattern, values of type Tree<A> are functions that are applied to access the data inside. The type R is the result of pattern matching. R can be any type, as long as the result of every pattern returns the same type. For example:
function includes<A>(value: A, tree: Tree<A>): boolean {
  return tree(
    /* Node */ (left, v, right) => {
      return v === value || includes(value, left) || includes(value, right)
    },
    /* Empty */ () => false
  )
}

Constructors for this type look like this:
function Node<A>(left: Tree<A>, value: A, right: Tree<A>): Tree<A> {
  return function<R>(node: (l: *, v: *, r: *) => R, empty): R {
    return node(left, value, right)
  }
}

function Empty<A>(): Tree<A> {
  return function<R>(node, empty: () => R): R {
    return empty()
  }
}

Some benefits of this approach are that we get pattern matching for free, and the compiler will make sure that pattern matching is exhaustive.
Another benefit is that the pattern-match approach can encode generalized algebraic data types (GADTs).
Unfortunately, I hit a wall with GADTs due to two problems:

Certain recursive types cannot currently be checked with Flow.
A type like <A>(expr: Expr<A>) => A does not pass checking if there are multiple concrete possibilities for the type of A in a function implementation, even if the invariant A == A holds in every case.

For an explanation of why GADTs are useful, see this Wikibooks chapter on the Haskell GADTs language extension. The chapter describes a type for representing an abstract syntax tree with type-level invariants.
type Expr<A> = <R>(
  I:   (x: number)  => R,
  B:   (x: boolean) => R,
  Add: (x: Expr<number>, y: Expr<number>) => R,
  Mul: (x: Expr<number>, y: Expr<number>) => R,
  Eq:  (x: Expr<number>, y: Expr<number>) => R,
) => R

Constructors for this type specify their return type, which means that we can track which operations are legal for an AST subtree by specifying concrete types for a phantom type variable (the A in Expr<A>).
Note the return types for these constructors:
function I(x: number): Expr<number> {
  return function<R>(a: (x: number) => R, b, c, d, e): R {
    return a(x)
  }
}

function Add(x: Expr<number>, y: Expr<number>): Expr<number> {
  return function<R>(a, b, c: (x: *, y: *) => R, d, e): R {
    return c(x, y)
  }
}

function Mul(x: Expr<number>, y: Expr<number>): Expr<number> {
  return function<R>(a, b, c, d: (x: *, y: *) => R, e): R {
    return d(x, y)
  }
}

function Eq(x: Expr<number>, y: Expr<number>): Expr<boolean> {
  return function<R>(a, b, c, d, e: (x: *, y: *) => R): R {
    return e(x, y)
  }
}

The Expr<A> type can be used to implement functions with a high level of type safety.
function evaluate<A>(expr: Expr<A>): A {
  return expr(
    /* I */   x => x,
    /* B */   x => x,
    /* Add */ (x, y) => evaluate(x) + evaluate(y),
    /* Mul */ (x, y) => evaluate(x) * evaluate(y),
    /* Eq  */ (x, y) => evaluate(x) === evaluate(y)
  )
}

This means that the expression Add( I(3), I(4) ) is legal, but Add( I(3), B(true) ) results in a type error. The implementation of evaluate can take advantage of that, so it does not need error handling to check for nonsensical inputs.
Unfortunately this does not work yet. When I type-check the code above, I get these errors:
gadts.js:49
 49:   return expr(
              ^ boolean. This type is incompatible with
 48: function evaluate<A>(expr: Expr<A>): A {
     ^ some incompatible instantiation of `A`

gadts.js:49
 49:   return expr(
              ^ number. This type is incompatible with
 48: function evaluate<A>(expr: Expr<A>): A {
     ^ some incompatible instantiation of `A`

gadts.js:52
 52:     /* Add */ (x, y) => evaluate(x) + evaluate(y),
                             ^^^^^^^^^^^ function call
 48: function evaluate<A>(expr: Expr<A>): A {
     ^ polymorphic type: function. *** Recursion limit exceeded ***
 48: function evaluate<A>(expr: Expr<A>): A {
     ^ function evaluate

The full source of gadts.js is available at https://gist.github.com/hallettj/bbf4e75566123a8ed07a

Thanks for doing this background work! Improvements to union types in general will happen in the coming months, and specific use cases like this are great to keep at the back of our minds for adequate coverage. cc @bhosmer

I’m going to close assuming the necessary union work happened. If this issue still needs discussion please reopen 😊

@calebmer FYI, trying the example code in Try Flow on v0.52 still fails with the same error messages.

This is still failing in v0.53.1. Would be super cool to get it to work, or at least have a clearer picture of why it doesn't. It seems like I'm still hitting the problem mentioned above:

A type like (expr: Expr) => A does not pass checking if there are multiple concrete possibilities for the type of A in a function implementation, even if the invariant A == A holds in every case.

@asolove I'm glad I'm not the only one who is interested in this kind of stuff! I updated the gist demonstrating the Expr<A> type to make the code less verbose and more readable.
https://gist.github.com/hallettj/bbf4e75566123a8ed07a
I wanted to note that there is a workaround for this issue: I put a $FlowFixMe on the implementation of evaluate. Flow is not able to check the implementation of evaluate itself, but it will note the type signature and will correctly typecheck expressions that use evaluate. (An alternative would be to declare the type of evaluate and provide the implementation with no type annotation, in case consumers have configured Flow to use a different "fix me" comment.) So GADTs can be useful in Flow code today with the caveat that functions that pattern match on GADTs cannot be checked, but their types can be declared.

The design of generic functions in Flow is that when you call the function and we create new types for function generic arguments we do not look at the implementation of the function. We only look at the function signature. So in this case:
function fn<A>(): A;

There isn’t really a sensible type for A. So Flow does not allow generic arguments in output positions. (I’m not the most qualified to speak on why this makes sense from a type system design perspective, but I tried my best 😊)
Removing A as the return type and annotating it as the type you want to return gives you the results that I think you want. See my modified example here:
type Expr = <R>(
  I:   (x: number)  => R,
  B:   (x: boolean) => R,
  Add: (x: Expr, y: Expr) => R,
  Mul: (x: Expr, y: Expr) => R,
  Eq:  (x: Expr, y: Expr) => R,
) => R

function evaluate1(expr: Expr): number | boolean {
  return expr(
    /* I */   x => x,
    /* B */   x => x,
    /* Add */ (x, y) => evaluate1(x) + evaluate1(y),
    /* Mul */ (x, y) => evaluate1(x) * evaluate1(y),
    /* Eq  */ (x, y) => evaluate1(x) === evaluate1(y)
  );
}

function evaluate2(expr: Expr): number {
  return expr(
    /* I */   x => x,
    /* B */   x => x ? 0 : 1,
    /* Add */ (x, y) => evaluate2(x) + evaluate2(y),
    /* Mul */ (x, y) => evaluate2(x) * evaluate2(y),
    /* Eq  */ (x, y) => (evaluate2(x) === evaluate2(y)) ? 0 : 1,
  );
}

https://flow.org/try/#0C4TwDgpgBAogHmATlAvFAPAJQHwAoBQUUAkgFxFS5zkB2ArgLYBGEiAlEStlJgDSFQAQuSJVyTAPYSANhACGNDlx78iAQQAmG8mNgJEvKCHLwkS7nwEBZOtJ3U9SQ8cftUF1bACOI3aYNGJvrmKvghmPj4AGZ0NADGwACWEjRQEABuctJ0csAQAIy4EPpBZrSMLMgAPlCSMvKpAN4CiBDAdIipxUgEFFAA9ABUJFCD-RRw7lBwnkRDQqPjRJPKMwJzw5oai5QzRiEZWTl5hXAcANRpmdm5BbggbLMDwzbSO1TOB9fHd2ejV0dboUHk95jAvEQxrtPlNDjcTlQlCg0HCfsC2AI2ABufAAX0iMXiSRSAPhEAATEUSq42OVmKwoM0iK12p00vpehR5sQdsspms+vNBLzpvyoAB+KAABig5HyoM2WneewesO+t0pf0uqI190e62eUFeyphyh1eU1HGG5opeoV3kh4w++ymRXVFsRqGRpJ+lIeHElMrlnmxePwQA

@calebmer: I think that the use of a generic variable in the return type is not the problem. Note that in the signature for evaluate the variable A appears in both the input and the output. So there is a sensible type for A for a given invocation, which Flow can infer from the type of the input:
function evaluate<A>(expr: Expr<A>): A

(Btw, I'm reasonably confident that Flow does allow type variables that appear in the output type but not in any inputs. The result is an unresolved type that does not yet have any constraints. I often do this instead of using any. For example, function decode<T>(input: string): T { return JSON.parse(input) })
Removing the type variable from Expr<A> and using a union type for the output for evaluate does lead to a function that typechecks. But the result is no longer a generalized algebraic data type, which was the point of my exercise. My goal was an evaluate function that can infer the correct type for the evaluation of an expression based on the type parameter given for that expression. Flow can do this - as I mentioned in my previous comment if I declare the type for evaluate Flow is able to correctly typecheck invocations of evaluate. The problem is just that Flow is not able to typecheck the implementation of evaluate itself. Here are some examples from the gist:
/*
 * This example represents the expression (2 + 1) * 4, and has the type `Expr<number>`
 */
const expr = Mul(
  Add(I(2), I(1)),
  I(4)
)

const a: number = evaluate(expr)
const b: boolean = evaluate(Eq(I(1), I(1)) /* has the type `Expr<boolean>` */)

/*
 * Does not typecheck because `expr` evaluates to a `number` not a `boolean`
 * $FlowFixMe
 */
const c: boolean = evaluate(expr)

I have made a blog post last year about encoding GADTs in Flow: http://coq-blog.clarus.me/approximating-gadts-in-flow.html. In particular, this handles Expr<A> example well. The gist of it:
// Expr definition.
type Expr<A> = {
  type: 'I',
  _eq: number => A,
  value: number
} | {
  type: 'B',
  _eq: boolean => A,
  value: boolean
} | {
  type: 'Add',
  _eq: number => A,
  x: Expr<number>,
  y: Expr<number>
} | {
  type: 'Mul',
  _eq: number => A,
  x: Expr<number>,
  y: Expr<number>
} | {
  type: 'Eq',
  _eq: boolean => A,
  x: Expr<number>,
  y: Expr<number>
};

// Constructors.
function i(value: number): Expr<number> {
  return {type: 'I', _eq: x => x, value};
}
function b(value: boolean): Expr<boolean> {
  return {type: 'B', _eq: x => x, value};
}
function add(x: Expr<number>, y: Expr<number>): Expr<number> {
  return {type: 'Add', _eq: x => x, x, y};
}
function mul(x: Expr<number>, y: Expr<number>): Expr<number> {
  return {type: 'Mul', _eq: x => x, x, y};
}
function eq(x: Expr<number>, y: Expr<number>): Expr<boolean> {
  return {type: 'Eq', _eq: x => x, x, y};
}

// Evaluation.
function evaluate<A>(expr: Expr<A>): A {
  switch (expr.type) {
    case 'I':
      return expr._eq(expr.value);
    case 'B':
      return expr._eq(expr.value);
    case 'Add':
      return expr._eq(evaluate(expr.x) + evaluate(expr.y));
    case 'Mul':
      return expr._eq(evaluate(expr.x) * evaluate(expr.y));
    case 'Eq':
      return expr._eq(evaluate(expr.x) === evaluate(expr.y));
    default:
      return expr;
  }
}

// Examples.
const e1: Expr<number> = add(i(2), i(4));
const e2: Expr<number> = mul(i(2), i(3));
const e3: Expr<boolean> = eq(e1, e2);
console.log(evaluate(e1), evaluate(e2), evaluate(e3));


Pp mo nc multivat speedup

🚀 Pull Request
Description

Consult Iris pull request check list

It had looked like the tests in  #4135 were failing, but now the cirrus-ci is updated, it is showing that they all pass. So this (which was going to be my backup) is no longer needed and can be closed.


Transform files and intercept original calls to build ones

Is your feature request related to a problem? Please describe.
After my last issue, I was eager to build a tool like vitebut without any resolver algorithms as it is already handled by the modern es spec and the importmap spec (trough polyfill for most browsers atm).
But I was wondering how to resolve non-native files like Typescript, Vue or any other files that need to be pre-processed. I tried a proof-of-concept, here (available on npm too), that doesn't process the source code except for files which have a transformer available. They are placed in a special directory, and when the non-native files are requested, the request is intercepted to send the transformed build. But this use a Service Worker placed at the root of the user app (it's the only way for a SW to work), and it's not really sexy.
Describe the solution you'd like
I would want to extend the "without bundler" concept to the build step, and try to extend vite so that it process only files that needs to be compiled to be understood by the browser and try to find a way to intercept the calls to files that have been transformed to serve the transformed one.
Additional context
But I don't know if this is a good feature and in the scope of vite, so let me know if not.

This is something I have on the roadmap - a service worker that caches compiled files and avoid sending any unnecessary requests to the server.

I managed to use a different approach than the Service Worker, I use the import-map specification here https://github.com/nestarz/esdev. I will try to use vite as an inspiration and grow it in parallel.


Rename ruff cli to ruff

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

I'm confused by the macOS failures, but the Linux successes look like progress.

I'm confused by the macOS failures, but the Linux successes look like progress.

Yeah something on the conda build side.

            clang-16: error: linker command failed with exit code 1 (use -v to see invocation)

  error: could not compile `serde_derive` (lib) due to previous error
  warning: build failed, waiting for other jobs to finish...
  💥 maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit status: 101": `CARGO_ENCODED_RUSTFLAGS="-C\u{1f}link-arg=-Wl,-rpath,/Users/runner/miniforge3/conda-bld/ruff_1706063684077/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib\u{1f}-C\u{1f}link-arg=-Wl,-headerpad_max_install_names\u{1f}-C\u{1f}link-arg=-Wl,-dead_strip_dylibs" "cargo" "rustc" "--target" "x86_64-apple-darwin" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/runner/miniforge3/conda-bld/ruff_1706063684077/work/crates/ruff/Cargo.toml" "--release" "--bin" "ruff" "--" "-C" "link-arg=-s"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/Users/runner/miniforge3/conda-bld/ruff_1706063684077/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
  error: subprocess-exited-with-error

  × Building wheel for ruff (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/runner/miniforge3/conda-bld/ruff_1706063684077/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/python /Users/runner/miniforge3/conda-bld/ruff_1706063684077/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpfug80u8b
  cwd: /Users/runner/miniforge3/conda-bld/ruff_1706063684077/work
  ERROR: Failed building wheel for ruff
  Building wheel for ruff (pyproject.toml): finished with status 'error'

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=863744&view=logs&j=9c5ef928-2cd6-52e5-dbe6-9d173a7d951b&t=20c71c51-4b27-578b-485d-06ade2de1d00&l=348


Update gitops-operator v1.14 to Argo Rollouts operator v<IP_ADDRESS>

What type of PR is this?
/kind chore
What does this PR do / why we need it:
Update v1.14 to Argo Rollouts v<IP_ADDRESS>, to pick up https://github.com/argoproj-labs/argo-rollouts-manager/pull/95
Have you updated the necessary documentation?

[ ] Documentation update is required by this PR.
[ ] Documentation has been updated.

Which issue(s) this PR fixes:
Fixes #?
Test acceptance criteria:

[ ] Unit Test
[ ] E2E Test

How to test changes / Special notes to the reviewer:

/lgtm

Thanks @jparsai!


[npm-check-updates] 2021-12-12 v12.0.3.

Excluding discord.js.

Codecov Report

Merging #15 (43da25c) into main (5ff8788) will decrease coverage by 0.89%.
The diff coverage is 81.81%.

@@             Coverage Diff             @@
##              main      #15      +/-   ##
===========================================
- Coverage   100.00%   99.10%   -0.90%
===========================================
  Files           21       21
  Lines          222      223       +1
  Branches        23       24       +1
===========================================
- Hits           222      221       -1
- Misses           0        1       +1
- Partials         0        1       +1

Impacted Files
Coverage Δ

<EMAIL_ADDRESS>100.00% <ø> (ø)

<EMAIL_ADDRESS>77.77% <33.33%> (-22.23%)
:arrow_down:

<EMAIL_ADDRESS>100.00% <100.00%> (ø)

src/commands/choice-command.ts
100.00% <100.00%> (ø)

src/commands/dice-command.ts
100.00% <100.00%> (ø)

src/commands/n-sided-dice-command.ts
100.00% <100.00%> (ø)

src/commands/skill-command.ts
100.00% <100.00%> (ø)

src/commands/skill-dice-command.ts
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


fix: decouple workflows

:tada: This PR is included in version 1.4.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fixed formatting errors in motion pdf (Fixed #3228).

for diff view

@normanjaeckel I have to merge it now because critical formatting errors for customer. Please let me know if you have some remarks.

This pull request contains unmerged changes of #3234 which are required to fix a formatting error of deleted list items.

ok


[Bindgen Tool] Improve support for passing/retrieving java Null values via generated Ballerina functions

Description
As per the current Ballerina bindgen tool implementation, the generated bindings seems to be not consistent when support passing/retrieving null values to/from the underlying java code. And this can lead to unexpected behaviour and runtime errors in the resulting Ballerina code.
Describe your problem(s)
Consider the following Java method and the counterpart Ballerina function generated using the bindgen tool
Java method
public String getHeadElement(String[] param) {
}

Generated ballerina function
public function getHeadElement(string[] param) returns string  {
}

As per the generated function signature, it neither allows passing nil values to the function or, retrieving nil values as the return values. This could be problematic if the underlying Java function has logic depending on the parameter/return being null, as the that scenario won't be supported by the generated bindings.
Describe your solution(s)
As per the discussion had with @sameerajayasoma and @hevayo, the following alternatives were suggested to overcome the situations like above.
Option 01:
Modify parameter and return bindings generation logic to always generate nilable types (i.e. T?), for all the Java types which extends java.lang.Object (hence nullable).
e.g:
public function getHeadElement(string?[]? param) returns string? {
}

Pros:
- The generated bindings from the tool will be null-compatible, OOTB
Cons:
- Users will always have to use match statements/ type checks to handle the () case, when accessing return values from the generated bindings
Option 02:
Provide CLI option(s) for users to selectively make the parameter and return types nillable.
Here, the generated bindings not not be null-compatible by default and, users will have the control to generate nilable types
incase they have Java functions having logics depending on the parameter/return being null. This can be achieved either by,

Using a single command option (e.g. --allow-null) or
Using separate options for parameter and return types (e.g. --allow-null-params and --allow-null-returns)

Pros:
- Users will have some level of fine-grained control to generate bindings(based on the underlying java function logic)
Option 03:
Generate null-compatible bindings, only when the underlying java functions contain nullable-related annotations (e.g. @NotNull, @Nullable)
Cons:
- Since these are not built-in annotations and from 3rd party tools, hard to rely-on
- Therefore users will have no control to decide the null-compatibility, when using 3rd party classes (i.e. Java library classes, maven dependencies)
@hevayo @sameerajayasoma Appreciate your concerns and the preferred option to move forward with
Related issue(s) (optional)
https://github.com/ballerina-platform/ballerina-lang/issues/39059

AFAIR, in option 2 we generate bindings without the support for passing nil or return nil values. The suggestion options can be used to change this behavior.

I can think of following CLI options. I prefer the last one.
--with-optional-types
--with-optional-param-types
--with-optional-return-types
--with-optional-types
--with-optional-types-param
--with-optional-types-return
bal bindgen java.lang.String --with-optional-types

AFAIR, in option 2 we generate bindings without the support for passing nil or return nil values. The suggestion options can be used to change this behavior.

Yes, you are correct :)

I can think of following CLI options. I prefer the last one.

+1 to move forward with the option 02 and, the following set of command options
--with-optional-types
--with-optional-types-param
--with-optional-types-return
@hevayo appreciate your thoughts on this


Three-Inspect does not work whether by ImportMap or Vite in plain ThreeJS project

I am attempting to run Three-Inspect in a plain ThreeJS project (plain javascript).
Whether I try to load this by import map (eg. using LiveServer add-on in Visual Studio Code) or Vite it does not work.
Utilization
My simple code to try to use this in my project is:
import { createInspector } from 'three-inspect'
import { Inspector  } from 'three-inspect'

/**@type {Inspector}*/
var inspector;
function addInspector(){
	inspector = createInspector({ scene, camera, renderer })
}

Errors
However, this fails no matter how I try to get Three-Inspect running in my project.
1) Import Map
In my index.html I have:
<script type="importmap">
		  {
		    "imports": {
		      "three"<EMAIL_ADDRESS>			  "three/addons/"<EMAIL_ADDRESS>			  "three-inspect"<EMAIL_ADDRESS>		    }
		  }
		</script>

However, while such an approach works well for other packages, on running the application in Visual Studio LiveServer, I get the error:

Uncaught SyntaxError: The requested module<EMAIL_ADDRESS>doesn't provide an export named: 'createInspector'

I am not sure what this represents, but it does not appear to work.
2) Using Vite
I have also tried installing it in Vite with both commands:
npm i --save-dev three-inspect
npm i --save three-inspect

But when I run npx vite or npx vite build on the project, I get:

✘ [ERROR] Failed to resolve entry for package "@threlte/core". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@threlte/core" package [plugin vite:dep-pre-bundle]

A fix appears to be posted here for this identical error:

https://github.com/threlte/three-inspect/issues/11
https://github.com/threlte/three-inspect/pull/12

This is also posted as an error here:

https://github.com/threlte/three-inspect/issues/15

A suggestion there as a workaround is:

I have fixed the issue by installing @sveltejs/vite-plugin-svelte with updating vite.config.js :
import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({
plugins: [...,  svelte()],
})

But I am not sure where vite.config.js even is located on my system or whether this is the appropriate way this should be managed.
Based on the fix above, I presume we should not be getting this error.
Solution
Any help with either problem? Currently one cannot use Three-Inspect with any approach in a standard ThreeJS project based on both errors.
It looks like a great project and would be very helpful if working. I would greatly appreciate any further fix.
@michealparks as it appears you fixed this once before I'm wondering if you would be willing to take a look? Thanks for any help.

Thanks for reporting! The vanilla export has been fixed in 0.5.0. Check out the docs for setup (which has changed) or this stackblitz example: https://stackblitz.com/edit/vitejs-vite-pxodhz?file=src%2Fmain.ts. Let me know if that fixes things for you.

Thanks for reporting! The vanilla export has been fixed in 0.5.0. Check out the docs for setup (which has changed) or this stackblitz example: https://stackblitz.com/edit/vitejs-vite-pxodhz?file=src%2Fmain.ts. Let me know if that fixes things for you.

Thank you very much for responding, continuing to maintain the package, and for the tutorial for adding it. I really appreciate it. ThreeJS is very good it seems, but without an inspector it is hard to understand how hierarchies and objects are coming together. This goes a long way.
1) NPM/Vite Working
I was able to install the 0.5.0 with NPM and npx vite now allows me to see the inspector overlay.
My function was added from yours as:
import { createInspector } from 'three-inspect/vanilla'
function addInspector(){
	document.body.append(renderer.domElement);
        renderer.domElement.style = `
                width: 100%;
                height: 100%;
                position: absolute;
        `;
        createInspector(document.body, {
		scene,
		camera,
		renderer,
	});
}

2) Import Map - Not working
I see you have now also added the package here which is great:
https://www.jsdelivr.com/package/npm/three-inspect
But I am not able to make it work using that. Using the same code above but in LiveServer of Visual Studio Code (just running locally off import maps), I tried:
<script type="importmap">
		  {
		    "imports": {
		      "three"<EMAIL_ADDRESS>			  "three/addons/"<EMAIL_ADDRESS>			  "three-inspect/vanilla"<EMAIL_ADDRESS>		    }
		  }
		</script>

But then I get

Uncaught SyntaxError: The requested module<EMAIL_ADDRESS>doesn't provide an export named: 'createInspector'

Is there any trick to making it work by import map or any fix that you can further offer? Having it work both ways makes the build and coding process much more versatile and easy to perform.
Thanks again for your help.


docs(architecture): rename missing library

@angular/animate doesn't exist, so let's use http so we don't change the sentence.
Fixes #1970

Hi, my bad for having chosen animate. When I made that edit a little while ago I was looking for three libraries that existed in both TS and Dart. Unfortunately, http doesn't exist on the Dart side (it does exists as a stand alone library, not a submodule of ng2).
How about using the following three: core, common and router, in that order?
cc @kwalrath

Closed after merging


what about mysql/mariadb

Hi,
any notice about mysql mariadb support?
Thanks

We currently haven't planned to add official Mysql support, but there is nothing stopping you from using Mysql together with Serverpod. There are packages available on pub.dev with Mysql bindings.


The generator imposter data's code

Hi @huangshiyu13,
When the generator data is available ?
Thanks

If you mean the synthetic dataset, I have already put it here: https://drive.google.com/open?id=0BzU4ETbYHM6feVM2ZE9qNzVxeHM

I mean the tool to generate a massive amount of synthetic data and thw code for training a discriminative classifier to select a realistic subset (that fools the classifier).

We are not going to release the Unity3D code and 3D models, because of the copyright issues. As for the discriminator, we said in the paper that we use the vgg16 network, which is not our contribution, so we will not provide the code here.  If you want to use the vgg16 network, we recommend this repository : https://github.com/machrisaa/tensorflow-vgg


Update riak_repl test

Also update erlcloud to error out when content length does not match returned content.

We have v3 test, including proxy_get. I guess this had been completed. (right?)

I think so...

yes!

@kuenishi  @metadave Thanks :zap:


[Enhancement] String concatenation '+=' in loop

Search before asking

[X] I had searched in the issues and found no similar issues.

Enhancement Request

located at:
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/handler/ShowClientBySystemHandler.java line 76
Describe the solution you'd like
Cnvert variable "result" from String to StringBuilder
Are you willing to submit PR?

[x] Yes I am willing to submit a PR!

I want to fix it.


Broken link on https://course.fast.ai/Lessons/lesson1.html#links

Re: broken link on https://course.fast.ai/Lessons/lesson1.html#links
Meta Learning is now located here: https://rosmulski.gumroad.com/l/learn_machine_learning

A Mathematician's Lament is also now archived at https://web.archive.org/web/20230827222504/https://www.maa.org/external_archive/devlin/LockhartsLament.pdf


Add auto release genereator

Is your feature request related to a problem? Please describe.
Releases are not generating automatically
Describe the solution you'd like
include @semanti-release/github to generate release automatically

:tada: This issue has been resolved in version 1.6.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Process Serialization with Inheritance

Currently, Process.__init__() saves off a copy of the parameters to self._original_parameters. Then when serializing, Process.__getstate__() returns self._original_parameters and Process.__setstate__() calls self.__init__() with the parameters.
This is problematic in class hierarchies where constructors change parameters. For example:
class A(Process):

    def __init__(self, parameters):
        super().__init__({'2': parameters['1']})

a = A({'1': True})
a2 = pickle.loads(pickle.dumps(a))

Here, A receives a parameter under the key 1 but passes that parameter to Process under key 2.
Here's how the serialization/deserialization flow looks:

When an instance of A is serialized, Process.__getstate__() returns {'2': True}.
Then when we want to deserialize and get a2, Process.__setstate__() calls self.__init__(parameters). However, it is A.__init__() that runs here, not Process.__init__(), so A.__init__() will be looking for a nonexistent key 1 in the parameters.

The fact that A.__init__() runs is correct. There could be code there that we need to run to initialize instance variables. The problem is that a.__getstate__() should be returning the original parameters passed to A.__init__(), not those passed to Process.__init__().
Here are some possible solutions:

Add an optional parameter to Process.__init__() for the original subclass parameters, which will then be saved in self._original_parameters. This route will require that we update all constructors in an inheritance hierarchy to handle the new parameter.
Add a new Process.save_parameters() method that subclasses can call to save off their original parameters. With this approach, we will only have to change Process and the class at the bottom of the hierarchy. However, we will have to handle multiple calls to Process.save_parameters() since we only want to save the parameters from the child-most subclass.
Add a new special key to the parameters dictionary for the original parameters. If provided, Process.__init__() will save this in self._original_parameters instead of parameters.

I prefer approach (3) since I think it's most in line with how we pass other special configs to Process.

I think we should avoid this swapping of parameter names, and maybe add asserts to make sure it is not being done. How about we assert that the keys going into the super().__init__() parameters are in the defaults? This won't rule out all cases -- for example if the 2 key in your example was in defaults -- but it will help avoid most of the bad cases.

This swapping happens in subclasses of convenience kinetics, and I think it happens for a good reason. If you create a process to model e.g. glucose phosphorylation, you shouldn't force your users to specify all the reaction stoichiometry in the config. Since you as the process author know the stoichiometry, your process should be able to just accept a few parameters like rate constants and then build the parameter dict that convenience kinetics expects.

So (3) would be something like:
super().__init__({'2': parameters['1'], '_parameters': parameters})

That seems easy enough?


Assisted upgrade of file-type available

Version 8 of file-type is available.
The JSFIX tool can help you through the update process (Ensuring that all the necessary changes are made to your project in the process).
Use this link to start the upgrade process (It's completely free).
Leave a comment on this issue if you have any questions or concerns.

Who asked?


Add Silo Finance (Arbitrum)

Revision checks

[x] Used smart contracts were audited.
[x] Your Safe App include a manifest.json file at the root with the required data.
[x] The app can be loaded as a custom Safe App in the Apps section of https://app.safe.global.
[x] The app auto-connects to the Safe.
[x] You are able to trigger and execute one transaction with a Safe.
[x] RPC requests are optimized (not triggering many requests in a very short time period).

Name/Description
Silo Finance - Arbitrum
Type

Update

Silo Finance (Mainnet) has already been reviewed and added, during review process there was an RPC issue with Arbitrum that has now been resolved. Original ticket asked for this new ticket to be created. https://github.com/5afe/safe-apps-list/issues/214#issuecomment-1423950919
Compatible Networks
- Mainnet
- Arbitrum

Audit document
[QuantStamp] (https://www.silo.finance/_files/ugd/fd5034_0e99427a343b48bdabf6248b451bbef5.pdf)
[ABDK] (https://www.silo.finance/_files/ugd/fd5034_b73283e612ec4b05867a913e718d3983.pdf)
[CETORA (Formal Verification)] https://www.silo.finance/_files/ugd/fd5034_98066b4c70ea46b5862a00670179f067.pdf
Code for review
[Github] (https://github.com/silo-finance/)
Note: code was reviewed and approved as part of last submission
App Url
https://app.silo.finance/
- Project logo: https://app.silo.finance/silo-logo.png
- Project landing page: https://silo.finance
- Team or discord contact: @siros-ena
- Twitter link: https://twitter.com/SiloFinance
- Github link: https://github.com/silo-finance/

Enabled on Arbitrum, thank you! ✅


fix: make line numbers in code block right aligned for a consistent UI

Before
When enabling line numbers using showLineNumbers in a MD code block, the line numbers were left aligned causing the code from Line 1-9 to be slightly on the left than for code from L10 onwards.

After
This PR fixes the above bug and right aligns the line numbers (following IDE conventions), and if merged code blocks will look like

Reasoning
This also follows the same way IDEs represent line numbers,

VSCode:

WebStorm:

Thanks!


Is it possible to set repetition_penalty?

Discussed in https://github.com/microsoft/guidance/discussions/174

Originally posted by ein-ich June  2, 2023
I guess there are 2 cases:

Locally to the gen
Considering the whole context

2 is more important for me (and it should be simple to implement?). It seems, however, like neither is possible?
I really like the library, but I'm using base LLaMa and not being able to set repetition_penalty makes it almost useless for me.
Am I missing something?

This no longer works in the new version of guidance.


Changing material in MATL editor resets animation to frame 1

If a boolean or texture is changed in the material editor, the model will revert to frame 1 and go back to normal once you click play on the animation agian.

If the animation is playing, material animations will update as expected even while using the matl editor. If the animation is paused, editing a value in the matl editor will override the animation values. ssbh_wgpu updates the entire material when animating or editing materials. This is for performance reasons and is also easier to maintain.  I don't think it's worth the added complexity to try and fix, since material animations tend to override most of the parameters anyway.


connect to existing server

I think it would be reasonable to allow connecting to an existing server. For example, the cli args could take a host/port to connect to, instead of starting a new server process. This is particularly useful if the sc2 server is running on a remote host

It is possible, the agent use websocket to connect the game

Why would you want the SC2 instance to run on a remote host? Why not run it locally?

The only reason I can think of in my case is that running the instance remotely frees up more of my vram on my graphics card for ML tasks. You could also get into some fun (but probably silly) clustering for your bot to talk to the client at that point. I don't see any harm in being able to connect to a remote client.

The game itself is quite large (30gb), so offloading that would be a nice benefit too.

I'm trying to run SC2 in a docker container and it's exposes the API via a port. So this would make it possible to connect.

Yeah, I want the remote connection too.