Panic on setting chromedriver option.

🐛 Bug description
Describe your issue in detail.
The bug occurs both in Windows and Linux platform.
name = "wasm-pack"
operating_system = "Ubuntu 22.04 (jammy) [64-bit]"
crate_version = "0.12.0"
explanation = """
Panic occurred in file '/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/parser/error.rs' at line 32
"""
cause = """
Mismatch between definition and access of `chromedriver`. Could not downcast to TypeId { t:<PHONE_NUMBER>509219037 }, need to downcast to TypeId { t:<PHONE_NUMBER>155995384 }
"""
method = "Panic"
backtrace = """

   0: 0x7f1c9f69a46f - clap_builder::parser::matches::arg_matches::ArgMatches::remove_one::h1071d0569289c63d
   1: 0x7f1c9f6d0acb - <wasm_pack::command::test::TestOptions as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::hb156d20062f3843d
   2: 0x7f1c9f67f255 - <wasm_pack::command::Command as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::hc8a723b38de367c4
   3: 0x7f1c9f6a0e31 - <wasm_pack::Cli as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::h74f30b65f521504b
   4: 0x7f1c9f64ff49 - clap_builder::derive::Parser::parse::h5ff6f522ae10d2e3
   5: 0x7f1c9f65c025 - wasm_pack::main::h55c39ae12c5d0b3d
   6: 0x7f1c9f651f33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h181e499eb01a8f78
   7: 0x7f1c9f652199 - std::rt::lang_start::{{closure}}::h0af72dc99aa94b9c
   8: 0x7f1c9f96e842 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h826ec84f4d22172a
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287
                 - std::panicking::try::do_call::h330f41e7cdb66fa2
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
                 - std::panicking::try::h30d9a927415799ae
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
                 - std::panic::catch_unwind::h0f7d81e60d1c7508
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::{{closure}}::h91e177ac1f827128
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::haf26aa5893f5930f
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
                 - std::panicking::try::hd1a491374a98c81c
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
                 - std::panic::catch_unwind::h9d9e54dec05b7526
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::hebd4e8d348b0ef95
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
   9: 0x7f1c9f65c865 - main"""

🤔 Expected Behavior
What should have happened?
Don't panic.
👟 Steps to reproduce
Clear steps describing how to reproduce the issue, including commands and flags run. If you are seeing an error, please include the full error message and stack trace.
Run a command with chromedriver option:
"wasm-pack" "test" "--release" "--chromedriver" "abc" "--chrome" "--headless"

🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.12.0 (install by official script)
rustc version: unknown

Found by running a GitHub Action with wasm-pack: https://github.com/Myriad-Dreamin/typst.ts/actions/runs/5308343457/jobs/9608436523#step:15:128


Out game level up screen improvement

When levelling up a character out of game it's annoying that the screen is closed on [Finish] is you want to level up several times.  Add a button [Next Level] to take us straight into defining the next level.

This would be a huge QoL improvement.

Will do it

;-)

https://github.com/ChrisPJohn/SolastaCommunityExpansion/pull/252/files


grpc error during initial connection

Currently, any grpc error during initial connection results in a timeout with the runtime error "The connection to the Fluent server could not be established...".  It is better to fail early in those situations by exposing the internal grpc error which may provide useful triaging information from the user's system.
Relevant is the test test_create_session_from_server_info_file_with_wrong_password which is checking the failure due to the timeout (with the 100 s wait) instead of an immediate failure due to password mismatch.
@raph-luc (originally found the issue)

Related example test failures:
https://github.com/ansys/pyfluent/actions/runs/5457287691/jobs/9931174803?pr=1759
https://github.com/ansys/pyfluent/actions/runs/5357964161/jobs/9719803655?pr=1715
https://github.com/ansys/pyfluent/actions/runs/5355190417/jobs/9713258474?pr=1712

The catched gRPC exceptions when these random failures occur are:
First this exception once:
HealthCheckService.status() caught RuntimeError: End of TCP stream
and then repeatedly every second on every gRPC attempt until timeout:
HealthCheckService.status() caught RuntimeError: failed to connect to all addresses; last error: UNKNOWN: ipv4:<IP_ADDRESS>:63599: connection attempt timed out before receiving SETTINGS frame
Any ideas what may be causing these seemingly random failures? The Fluent client remains open after this, but haven't checked if it is responsive or not as running it without GUI.
This happens not only when launching Fluent, but also when connecting to an already existing Fluent server (e.g. also happens in the middle of a tests/test_streaming_services.py::test_transcript run)
There is no particular test where this seems to happen more often than others, and nothing is written to the .trn file when this happens
Also, we probably should consider raising different exceptions for these different gRPC errors rather than RuntimeError for all/most of them, maybe we could parse the RpcError text and raise an appropriate exception if we can identify it based on the text?

First one to be logged on GitHub: https://github.com/ansys/pyfluent/actions/runs/5695317917/job/15438219836
Same issue as I had one time locally, as described in my previous message:
INFO     pyfluent.general:health_check.py:88 HealthCheckService.status() caught RuntimeError: failed to connect to all addresses; last error: UNKNOWN: ipv4:<IP_ADDRESS>:34431: connection attempt timed out before receiving SETTINGS frame
Until timeout


Help with Imagemagick

Firstly thanks @mnapoli  for helping us reimagine our infrastructure in Lambda!
@atrope thanks for your hints on Imagemagick earlier.
Sorry to trouble you all with a user issue but I am stuck trying to get Imagemagick working in bref.
I have previously made a simple mod to the php.Dockerfile to enable mysqli and this worked perfectly. I rebuilt with make build and uploaded a custom bref layer to my own repo - all good.
I have now tried to do the same with ImageMagick / Imagick but I am constantly getting:
Fatal error: Uncaught ImagickException: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/556 in /var/task/s3-php-info.php:28
Stack trace:
#0 /var/task/s3-php-info.php(28): Imagick->__construct('image.png')

when trying to open a png (same happens with JPG).
All I have done is add the following to php.Dockerfile after the existing PECL declarations:
# make sure we use the right release for Lambda
RUN sed -i 's/releasever=latest/releaserver=2017.03/' /etc/yum.conf

RUN LD_LIBRARY_PATH= yum install -y ImageMagick-devel
RUN pecl install imagick

# test to see if it worked
RUN convert -list configure

I have tried many things to rectify this but I'm stuck. One thing I have realised is that I seem to have ended up with two versions of Imagemagic.
If inside my php file in Lambda I run print_r(Imagick::getVersion ()); I get:
Array
(
    [versionNumber] => 1800
    [versionString] => ImageMagick 7.0.8-34 Q16 x86_64 2019-03-24 https://imagemagick.org
)

which seems to be 7.0.8
If I use the command line to get a version using print shell_exec ("cd /opt/bref/ && convert -list configure"); i get
..
EXEC-PREFIX   /usr
EXECUTABLE_PATH /usr/bin
FEATURES      OpenMP
FILTER_PATH   /usr/lib64/ImageMagick-6.7.8/modules-Q16/filters
HOST          x86_64-redhat-linux-gnu
INCLUDE_PATH  /usr/include/ImageMagick
LDFLAGS       -L/usr/lib64 -L/usr/lib
LIB_VERSION   0x678
LIB_VERSION_NUMBER 6,7,8,9
LIBRARY_PATH  /usr/lib64/ImageMagick-6.7.8
LIBS          -lMagickCore -llcms2 -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -llzma -lbz2 -lz -lm -lgomp -lpthread -lltdl
NAME          ImageMagick
PCFLAGS       -fopenmp
PREFIX        /usr
QuantumDepth  16
RELEASE_DATE  2016-06-22
SHARE_PATH    /usr/share/ImageMagick-6.7.8
SVN_REVISION  8903
TARGET_CPU    x86_64
TARGET_OS     linux-gnu
TARGET_VENDOR redhat
VERSION       6.7.8
WEBSITE       http://www.imagemagick.org

which seems to be 6.7.8
Either way it would seem PHP/Imagick cant find something - the shared libraries or delegates??
Any help would be appreciated!

OK - so I've figured it out and got it working - I was being stupid!
Keep up the amazing work everyone!

@yousafs what was it that you figured out? is it something other people are likely to run into?


Inaccuracy in the step #12 description

Hi, and thanks for this titanic work!
It seems there is some inaccuracy in the description of the step #12:

Encode a message containing 32 null bytes with the shared secret using HMAC SHA256. Take this value and extend it to 80 bytes using HKDF. Call this value sharedSecretExpanded. This is done with HKDF(HmacSha256("\0"*32, sharedSecret), 80).

According to the code 32 null bytes here is used as a key and not as a message.
I'm implementing the described algorithm for iOS and still cannot pass the HMAC validation, just trying to find where I could be wrong.

Using 32 null bytes as a key is correct here. I don't know why the WhatsApp developers chose to do it like this, but apparently they did.
Regarding your problem, I also tried to reimplement the encryption stuff, but in JavaScript (using SJCL) You can test it by running node index_jsdemo.js in the root directory and then just opening client/login-via-js-demo.html as a regular file:// in a web browser. In there, I can successfully get the encoding and mac keys. The line you are stuck with semantically is this one. To solve it, please make sure that the HKDF and HmacSha256 algorithm used by iOS is exactly the same as the one used here and in the Python script (it's implementation could differ from the standard and you may need to pass additional parameters to enforce the desired behavior). You could test this by hashing simple strings first and test the equality of the results.
So, as I said, getting the encoding and mac key is no problem, at least in this script. What I am stuck with is that the HMAC validation of actual messages (this line) keeps failing, although algorithmically nothing is different from the Python script.
But first, let's solve your current problem.

Thanks for the quick response!

Using 32 null bytes as a key is correct here.

By the inaccuracy, I rather meant that the phrase:

Encode a message containing 32 null bytes with the shared secret using HMAC SHA256.

is not equal to: HmacSha256("\0"*32, sharedSecret), where "\0"*32 is a key, and sharedSecret is a message. So the first time I made a mistake just reading the phrase without looking at the code first.

To solve it, please make sure that the HKDF and HmacSha256 algorithm used by iOS is exactly the same as the one used here and in the Python script

Thanks for the idea, indeed, I will try to compare the outputs of the functions between the platforms, because everything else I have checked twice. I will get back soon.

Ah, thanks so much for pointing that out. I guess I read the entire instructions so many times that I didn't even notice this; just changed the readme.
I am looking forward to hear your results! :)

So the output of the HKDF algorithm implemented on iOS (by CryptoSwift) is different, and according to RFC 5869 it is a correct one (it passes all the test cases at the end of the document).
I'm not a deep expert in cryptography but I have compared the implementation with a python version and found the difference. The iOS version implements both stages of the HKDF algorithm - extract-then-expand (with a pseudo-random key), the Python version implements only the second stage - expand i.e. it skips the extract stage.
Anyway, the second version passes HMAC validation and it means that WhatsApp engineers also prefer it and it's enough to move further.
Just in case, the swift version of the "only-expand" algorithm:
func HKDF(key: Array<UInt8>, length: Int) throws -> Array<UInt8> {
        var keyStream = [UInt8](), keyBlock  = [UInt8]()
        var blockIndex: UInt8 = 1;
        while keyStream.count < length {
            keyBlock.append(blockIndex)
            keyBlock = try HMAC(key: key, variant: .sha256).authenticate(keyBlock)
            blockIndex += 1
            keyStream += keyBlock
        }

        return Array(keyStream[0..<length])
}

Many thanks for sending in the right direction.

Btw, I think the same issue with SJCL - https://github.com/bitwiseshiftleft/sjcl/blob/master/core/hkdf.js you need to implement only a second stage of the algorithm.

Awesome, that's good to know! I already suspected that WhatsApp doesn't fully comply with the standard, but now we have the facts. :)
By the way, would you mind adding your Swift code to the repository later? I think it would be nice to have some reference implementations of the encryption algorithm in different programming languages (e.g. in a new directory called "reference-implementations").

Sure, it should be a worthy tribute to your work!


Fix case colon completion

Ported from legacy server. Still legit?
Also closes https://github.com/HaxeFoundation/haxe/issues/9311

Doesn't seeem right to fix this here...

If only we know where to fix it... I think this happens because of triggerCharacters, not sure how it can be filtered by context or something. But asking for completion right after colon in case _:| is very annoying for sure.

I'd have to look into this in more detail, I don't remember all the logic behind this. My initial thinking was that the compiler is still returning some results here when it shouldn't, but your screenshot shows snippet completion which is from the language server, so maybe something is needed on the server-side after all.
Either way, using a regex for detection here isn't robust, we have the token tree nowadays that could be used instead.

I found a reason:
https://github.com/vshaxe/haxe-language-server/blob/6efc0b9a673983b4546a208ae1adc19ff6af25d9/src/haxeLanguageServer/features/haxe/completion/CompletionFeature.hx#L194


Local Penalization Wrong Implementation

@javiergonzalezh
In paper Batch Bayesian Optimization via Local Penalization, the local penalization factor is:
, where , which equals to .
However, the implementation of local penalization in file LP.py equals:
.
I think it should be changed to .
And the AcquisitionFunction._hammer_function should be changed from:
return norm.logcdf((np.sqrt((np.square(np.atleast_2d(x)[:,None,:]-np.atleast_2d(x0)[None,:,:])).sum(-1))- r_x0)/s_x0)

to:
return norm.logcdf((r_x0 - np.sqrt((np.square(np.atleast_2d(x)[:,None,:]-np.atleast_2d(x0)[None,:,:])).sum(-1)))/s_x0)

There are also other issues talking about the inaccurate numerical results and gradients when it comes to local penalization.  I thinks this is the corresponding reason.
#205 #87

Hey! Thanks for the issue. Would you be able to implement these changes locally and let us know if this helped resolve the gradients issue?


i can not download vgg16_reducedfc.pth,Please provide a new download link

链接：https://pan.baidu.com/s/14kQlCinB6wJuRaF_pS3hxA
提取码：xb8w
You can use this  Baidu Drive link to download it.

@LZP4GitHub  谢谢

I can't acess the links you guys providid ( drive link is  forbiden in Lab )
Is there any idea about training the mdoel without pretrained model ?  Maybe I can init the weights by random value ?
Thks

@Lin-Zhipeng

5 min by now. The download has not started. Please provide other link.


Add LIPS to the list of tested implementations

Add LIPS since some of the surveys list LIPS behavior.

We should probably remove the As of 2016-08-05,  timestamp, which is out of date. (The introduction was written by John. The surveys were started by him but have since expanded a lot.)

We can add more recent date with new implementations. Like LIPS and unsyntax. Not sure what other implementations were added recently.

Updated the header (removed the date) and added unsyntax.


New Features - especially on mobile!

Latest Features

Smoother mouse panning
Panning based on device's sensor (The canvas pans as you rotate your phone a la Streetview. Only 360 images work on mobile for now.)
Ability to disable zooming via mouse wheel

I can't seem to get the "panning based on device's sensor" to work.  I can't get anything to display on Android Chrome, iOS, or Edge Mobile actually!  Even with the regular 0.4.3 code.  Works great on desktop browsers though.


Fix for malformated mobile signing button

the "Sign In" still isn't centered and I couldn't fix that

🤔?

the "Sign In" still isn't centered and I couldn't fix that

its works by displaying center 🤔?

I could not center the <a ...>Sign In inside of the button. Ir you look closely the text itself seems to be more to the left than to the right.

the "Sign In" still isn't centered and I couldn't fix that

its works by displaying center 🤔?

I could not center the <a ...>Sign In</a> inside of the button. Ir you look closely the text itself seems to be more to the left than to the right.

that may be due to the css/scss styles that have been assigned the component which overrides the tailwindcss


⚠ Processors has degraded performance

In 64b908a, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 67 ms

Resolved: Processors performance has improved in a99326a.


Use BenchmarkDotNet for C# Benchmark

I'd like to suggest that BenchmarkDotNet be used to perform the C# benchmark. There's a lot of overhead to running the C# executable once, as the JIT is doing a lot of upfront work coupled with the RegexOptions.Compiled flag.
Once the pump is primed, you'll notice that performance is better. I suppose it depends on what is trying to be measured, though. If it's to show the performance of running an executable that is trying to match the 3 regexes once and terminate, then the current approach works. However, this doesn't represent more typical usage in an application.

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18362
Intel Core i5-8500 CPU 3.00GHz (Coffee Lake), 1 CPU, 6 logical and 6 physical cores
.NET Core SDK=3.1.101
  [Host] : .NET Core 3.1.1 (CoreCLR 4.700.19.60701, CoreFX 4.700.19.60801), X64 RyuJIT

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

Email
1,357.77 ms
2.984 ms
2.791 ms
-
-
-
335.63 KB

Uri
1,175.25 ms
3.274 ms
3.063 ms
-
-
-
1402.2 KB

Ip
83.62 ms
0.301 ms
0.281 ms
-
-
-
19.65 KB

EmailCompiled
964.28 ms
2.583 ms
2.416 ms
-
-
-
230.55 KB

UriCompiled
827.55 ms
2.150 ms
2.011 ms
-
-
-
1393.54 KB

IpCompiled
63.70 ms
0.164 ms
0.153 ms
-
-
-
15.11 KB

void Main()
{
    BenchmarkRunner.Run<RegexBenchmark>();
}

[MemoryDiagnoser]
public class RegexBenchmark
{
    private string _data;

    [GlobalSetup]
    public void GlobalSetup()
    {
        _data = File.ReadAllText(@"D:\Benchmarks\input-text.txt");
    }

    [Benchmark]
    public int Email()
    {
        MatchCollection matches = Regex.Matches(_data, @"[\w\.+-]+@[\w\.-]+\.[\w\.-]+");
        return matches.Count;
    }

    [Benchmark]
    public int Uri()
    {
        MatchCollection matches = Regex.Matches(_data, @"[\w]+://[^/\s?#]+[^\s?#]+(?:\?[^\s#]*)?(?:#[^\s]*)?");
        return matches.Count;
    }

    [Benchmark]
    public int Ip()
    {
        MatchCollection matches = Regex.Matches(_data, @"(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])");
        return matches.Count;
    }

    [Benchmark]
    public int EmailCompiled()
    {
        MatchCollection matches = Regex.Matches(_data<EMAIL_ADDRESS>RegexOptions.Compiled);
        return matches.Count;
    }

    [Benchmark]
    public int UriCompiled()
    {
        MatchCollection matches = Regex.Matches(_data, @"[\w]+://[^/\s?#]+[^\s?#]+(?:\?[^\s#]*)?(?:#[^\s]*)?", RegexOptions.Compiled);
        return matches.Count;
    }

    [Benchmark]
    public int IpCompiled()
    {
        MatchCollection matches = Regex.Matches(_data, @"(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9])", RegexOptions.Compiled);
        return matches.Count;
    }
}

I think you forgot to run against the input.

@Kryptos-FR Good catch. No wonder it was so fast! I updated my post to the correct results testing on the input.

As far as I can tell, this benchmark is intentionally including the time it takes to compile the regex in addition to the search itself. So I'd imagine that "priming a JIT" or "initial overhead of the JIT" is fair game to be included in the measurement for this specific benchmark.

Just to clarify, the benchmark is not perfect or an academic experiment. It simply measures the necessary time to find and count occurrences in a particular scenario.
I know, this scenario is no the best for all the engines or languages, it depends on default engine configuration (for example Unicode support) and language specs (for example JIT support).
Use BenchmarkDotNet seems to be fair to solve the problems you explained but it requires re-think the whole benchmark for all languages.
I'm able to receive improvement following the current implementation style but change how the benchmark works don't make sense for me right now.
Thank you for your thoughts and time.

@mariomka Makes sense. Thanks!


Boolean props default value is not undefined

Version
3.2.31
Reproduction link
sfc.vuejs.org/
Steps to reproduce
See the minimal reproduction.
What is expected?
Both myValue and myOtherValue should be undefined by default.
What is actually happening?
myOtherValue (where only the type constructor is defined) ends up false instead.

That a Boolean ends up false by default kinda makes sense, but is also inconsistent with the documentation. All the types should all behave predictably for consistency, so either the documentation needs to specify this, or it has to be changed.
The documentation states that "An absent optional prop will have undefined value" at https://vuejs.org/guide/components/props.html#prop-validation (A bit down under "Additional details:")

Related Issues #5847

This is intended behavior. Maybe you should submit a PR with your proposal to vuejs/docs

@posva Then I would need to know the intended behavior for all the types.

This is annoying default for boolean, while other type e.g string return undefined by default. only boolean return false?

This is annoying default for boolean, while other type e.g string return undefined by default. only boolean return false?

According to this unit test, Yes.


add keras example and tests

Signed-off-by: Niels Bantilan<EMAIL_ADDRESS>fixes #14

hey @eapolinario gonna merge this now, it's mainly a docs change with more tests


Cover all python test scripts by partitioning across different build instances

Before this commit, only a subset of the python test scripts were being included as a part of make check.  At the same time, all travis instances were running the same subset.  This commit assigns a unique subset to each travis instance, allowing for full coverage without any additional time overhead.

LGTM


rs.tdwg.org/ac redirection issue for variant/2020-10-13

On this page the following URL is mentioned

Previous version: http://rs.tdwg.org/ac/doc/variant/2020-10-13

It redirects to https://ac.tdwg.org/ac/variant/2020-10-13 (error) rather than https://ac.tdwg.org/variant/2020-10-13 (correct)
The Previous version and Replaced by links work for all other pages (I checked)

Fixed in https://github.com/tdwg/rs.tdwg.org/commit/f021d32f43dc28d6431c85498aa490c1e3183d52

Good catch @peterdesmet


[R-package] Error installing R package with local pre-complie option in build_r.R

Hi,
I'm having problem install lightgbm for R after I complied from source with git master branch.
My locally complied version works for my python install. But struggling with R. It seems to not be able to find lib_lightgbm.so, which I clearly have in ~/git/LightGBM/lib_lightgbm.so.
I followed the instruction here. Specifically, I followed this instruction:
"If you are using a precompiled dll/lib locally, you can move the dll/lib into LightGBM root folder, modify LightGBM/R-package/src/install.libs.R's 2nd line (change use_precompile <- FALSE to use_precompile <- TRUE), and install R-package as usual."
What exact files do I need to copy for Linux? ~/git/LightGBM/lib_lightgbm.so? And to where?
I attached the console output after I ran Rscript build_r.R below.
THANKS!
How you are using LightGBM?

 OK
* preparing ‘lightgbm’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
WARNING: directory ‘lightgbm/src/compute/test’ is empty
* looking to see if a ‘data/datalist’ file should be added
* building ‘lightgbm_<IP_ADDRESS>.tar.gz’

* installing to library ‘/home/abc/R/x86_64-pc-linux-gnu-library/4.0’
* installing *source* package ‘lightgbm’ ...
** using staged installation
** libs
installing via 'install.libs.R' to /home/abc/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-lightgbm/00new/lightgbm

Error in eval(ei, envir) : Cannot find lib_lightgbm.so

* removing ‘/home/abc/R/x86_64-pc-linux-gnu-library/4.0/lightgbm’
Error in .run_shell_command(install_cmd, install_args) :
  Command failed with exit code: 1
Execution halted

hello @esvhd , thanks for using LightGBM! We have been making a lot of changes to the R package recently and I think that installing the R package together with a precompiled lib_lightgbm.so is in a weird state.
Is there a strong reason that you need to use a precompiled binary? For example, did you build it with some customization?
If not, could you please try building from source? You can just run Rscript build_r.R.
If that doesn't work, you might have more luck with the CRAN package.
sh build-cran-package.sh
R CMD INSTALL lightgbm_3.0.0.tar.gz

Thanks for the prompt reply!
I built the package from source to enable MPI and GPU support. I read in the R install guide and found how to turn on GPU, but nothing on MPI? Is there anything I need to do there?
Thanks!
Sent from my iPhone

On 6 Sep 2020, at 02:29, James Lamb<EMAIL_ADDRESS>wrote:

hello @esvhd , thanks for using LightGBM! We have been making a lot of changes to the R package recently and I think that installing the R package together with a precompiled lib_lightgbm.so is in a weird state.
Is there a strong reason that you need to use a precompiled binary? For example, did you build it with some customization?
If not, could you please try building from source? You can just run Rscript build_r.R.
If that doesn't work, you might have more luck with the CRAN package.
sh build-cran-package.sh
R CMD INSTALL lightgbm_3.0.0.tar.gz
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@esvhd ah, maybe that is a gap in our documentation, apologies!
Can you replace R-package/src/install.libs.R with this?
new install.libs.R (click me)
# User options
use_precompile <- FALSE
use_gpu <- TRUE

# For Windows, the package will be built with Visual Studio
# unless you set one of these to TRUE
use_mingw <- FALSE
use_msys2 <- FALSE

if (use_mingw && use_msys2) {
  stop("Cannot use both MinGW and MSYS2. Please choose only one.")
}

if (.Machine$sizeof.pointer != 8L) {
  stop("LightGBM only supports 64-bit R, please check the version of R and Rtools.")
}

R_int_UUID <- .Internal(internalsID())
R_ver <- as.double(R.Version()$major) + as.double(R.Version()$minor) / 10.0

if (!(R_int_UUID == "0310d4b8-ccb1-4bb8-ba94-d36a55f60262"
    || R_int_UUID == "2fdf6c18-697a-4ba7-b8ef-11c0d92f1327")) {
  warning("Warning: unmatched R_INTERNALS_UUID, may not run normally.")
}

# system() will not raise an R exception if the process called
# fails. Wrapping it here to get that behavior.
#
# system() introduces a lot of overhead, at least on Windows,
# so trying processx if it is available
.run_shell_command <- function(cmd, args, strict = TRUE) {
    on_windows <- .Platform$OS.type == "windows"
    has_processx <- suppressMessages({
      suppressWarnings({
        require("processx")  # nolint
      })
    })
    if (has_processx && on_windows) {
      result <- processx::run(
        command = cmd
        , args = args
        , windows_verbatim_args = TRUE
        , error_on_status = FALSE
        , echo = TRUE
      )
      exit_code <- result$status
    } else {
      if (on_windows) {
        message(paste0(
          "Using system() to run shell commands. Installing "
          , "'processx' with install.packages('processx') might "
          , "make this faster."
        ))
      }
      cmd <- paste0(cmd, " ", paste0(args, collapse = " "))
      exit_code <- system(cmd)
    }

    if (exit_code != 0L && isTRUE(strict)) {
        stop(paste0("Command failed with exit code: ", exit_code))
    }
    return(invisible(exit_code))
}

# try to generate Visual Studio build files
.generate_vs_makefiles <- function(cmake_args) {
  vs_versions <- c(
    "Visual Studio 16 2019"
    , "Visual Studio 15 2017"
    , "Visual Studio 14 2015"
  )
  working_vs_version <- NULL
  for (vs_version in vs_versions) {
    message(sprintf("Trying '%s'", vs_version))
    # if the build directory is not empty, clean it
    if (file.exists("CMakeCache.txt")) {
      file.remove("CMakeCache.txt")
    }
    vs_cmake_args <- c(
      cmake_args
      , "-G"
      , shQuote(vs_version)
      , "-A"
      , "x64"
    )
    exit_code <- .run_shell_command("cmake", c(vs_cmake_args, ".."), strict = FALSE)
    if (exit_code == 0L) {
      message(sprintf("Successfully created build files for '%s'", vs_version))
      return(invisible(TRUE))
    }

  }
  return(invisible(FALSE))
}

# Move in CMakeLists.txt
write_succeeded <- file.copy(
  "../inst/bin/CMakeLists.txt"
  , "CMakeLists.txt"
  , overwrite = TRUE
)
if (!write_succeeded) {
  stop("Copying CMakeLists.txt failed")
}

# Get some paths
source_dir <- file.path(R_PACKAGE_SOURCE, "src", fsep = "/")
build_dir <- file.path(source_dir, "build", fsep = "/")

# Check for precompilation
if (!use_precompile) {

  # Prepare building package
  dir.create(
    build_dir
    , recursive = TRUE
    , showWarnings = FALSE
  )
  setwd(build_dir)

  use_visual_studio <- !(use_mingw || use_msys2)

  # If using MSVC to build, pull in the script used
  # to create R.def from R.dll
  if (WINDOWS && use_visual_studio) {
    write_succeeded <- file.copy(
      "../../inst/make-r-def.R"
      , file.path(build_dir, "make-r-def.R")
      , overwrite = TRUE
    )
    if (!write_succeeded) {
      stop("Copying make-r-def.R failed")
    }
  }

  # Prepare installation steps
  cmake_args <- "-DUSE_MPI=ON"
  build_cmd <- "make"
  build_args <- "_lightgbm"
  lib_folder <- file.path(source_dir, fsep = "/")

  WINDOWS_BUILD_TOOLS <- list(
    "MinGW" = c(
      build_tool = "mingw32-make.exe"
      , makefile_generator = "MinGW Makefiles"
    )
    , "MSYS2" = c(
      build_tool = "make.exe"
      , makefile_generator = "MSYS Makefiles"
    )
  )

  if (use_mingw) {
    windows_toolchain <- "MinGW"
  } else if (use_msys2) {
    windows_toolchain <- "MSYS2"
  } else {
    # Rtools 4.0 moved from MinGW to MSYS toolchain. If user tries
    # Visual Studio install but that fails, fall back to the toolchain
    # supported in Rtools
    if (R_ver >= 4.0) {
      windows_toolchain <- "MSYS2"
    } else {
      windows_toolchain <- "MinGW"
    }
  }
  windows_build_tool <- WINDOWS_BUILD_TOOLS[[windows_toolchain]][["build_tool"]]
  windows_makefile_generator <- WINDOWS_BUILD_TOOLS[[windows_toolchain]][["makefile_generator"]]

  if (use_gpu) {
    cmake_args <- c(cmake_args, "-DUSE_GPU=ON")
  }
  cmake_args <- c(cmake_args, "-DBUILD_FOR_R=ON")

  # Pass in R version, used to help find R executable for linking
  R_version_string <- paste(
    R.Version()[["major"]]
    , R.Version()[["minor"]]
    , sep = "."
  )
  r_version_arg <- sprintf("-DCMAKE_R_VERSION='%s'", R_version_string)
  cmake_args <- c(cmake_args, r_version_arg)

  # the checks below might already run `cmake -G`. If they do, set this flag
  # to TRUE to avoid re-running it later
  makefiles_already_generated <- FALSE

  # Check if Windows installation (for gcc vs Visual Studio)
  if (WINDOWS) {
    if (!use_visual_studio) {
      message(sprintf("Trying to build with %s", windows_toolchain))
      # Must build twice for Windows due sh.exe in Rtools
      cmake_args <- c(cmake_args, "-G", shQuote(windows_makefile_generator))
      .run_shell_command("cmake", c(cmake_args, ".."), strict = FALSE)
      build_cmd <- windows_build_tool
      build_args <- "_lightgbm"
    } else {
      visual_studio_succeeded <- .generate_vs_makefiles(cmake_args)
      if (!isTRUE(visual_studio_succeeded)) {
        warning(sprintf("Building with Visual Studio failed. Attempting with %s", windows_toolchain))
        # Must build twice for Windows due sh.exe in Rtools
        cmake_args <- c(cmake_args, "-G", shQuote(windows_makefile_generator))
        .run_shell_command("cmake", c(cmake_args, ".."), strict = FALSE)
        build_cmd <- windows_build_tool
        build_args <- "_lightgbm"
      } else {
        build_cmd <- "cmake"
        build_args <- c("--build", ".", "--target", "_lightgbm", "--config", "Release")
        lib_folder <- file.path(source_dir, "Release", fsep = "/")
        makefiles_already_generated <- TRUE
      }
    }
  } else {
      .run_shell_command("cmake", c(cmake_args, ".."))
      makefiles_already_generated <- TRUE
  }

  # generate build files
  if (!makefiles_already_generated) {
    .run_shell_command("cmake", c(cmake_args, ".."))
  }

  # R CMD check complains about the .NOTPARALLEL directive created in the cmake
  # Makefile. We don't need it here anyway since targets are built serially, so trying
  # to remove it with this hack
  generated_makefile <- file.path(
    build_dir
    , "Makefile"
  )
  if (file.exists(generated_makefile)) {
    makefile_txt <- readLines(
      con = generated_makefile
    )
    makefile_txt <- gsub(
      pattern = ".*NOTPARALLEL.*"
      , replacement = ""
      , x = makefile_txt
    )
    writeLines(
      text = makefile_txt
      , con = generated_makefile
      , sep = "\n"
    )
  }

  # build the library
  message("Building lib_lightgbm")
  .run_shell_command(build_cmd, build_args)
  src <- file.path(lib_folder, paste0("lib_lightgbm", SHLIB_EXT), fsep = "/")

} else {

  # Has precompiled package
  lib_folder <- file.path(R_PACKAGE_SOURCE, "../", fsep = "/")
  shared_object_file <- file.path(
    lib_folder
    , paste0("lib_lightgbm", SHLIB_EXT)
    , fsep = "/"
  )
  release_file <- file.path(
    lib_folder
    , paste0("Release/lib_lightgbm", SHLIB_EXT)
    , fsep = "/"
  )
  windows_shared_object_file <- file.path(
    lib_folder
    , paste0("/windows/x64/DLL/lib_lightgbm", SHLIB_EXT)
    , fsep = "/"
  )
  if (file.exists(shared_object_file)) {
    src <- shared_object_file
  } else if (file.exists(release_file)) {
    src <- release_file
  } else {
    # Expected result: installation will fail if it is not here or any other
    src <- windows_shared_object_file
  }
}

# Packages with install.libs.R need to copy some artifacts into the
# expected places in the package structure.
# see https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Package-subdirectories,
# especially the paragraph on install.libs.R
dest <- file.path(R_PACKAGE_DIR, paste0("libs", R_ARCH), fsep = "/")
dir.create(dest, recursive = TRUE, showWarnings = FALSE)
if (file.exists(src)) {
  message(paste0("Found library file: ", src, " to move to ", dest))
  file.copy(src, dest, overwrite = TRUE)

  symbols_file <- file.path(source_dir, "symbols.rds")
  if (file.exists(symbols_file)) {
    file.copy(symbols_file, dest, overwrite = TRUE)
  }

} else {
  stop(paste0("Cannot find lib_lightgbm", SHLIB_EXT))
}

# clean up the "build" directory
if (dir.exists(build_dir)) {
  message("Removing 'build/' directory")
  unlink(
    x = build_dir
    , recursive = TRUE
    , force = TRUE
  )
}

Then if you use Rscript build_r.R, I believe it will build a GPU-enabled version of the package with MPI support.  This isn't a combination we've tested with the R package before, so please let me know what happens.
Could you do me a favor and open an issue called "[R-package] allow use of MPI for distributed training" and explain there why you have a strong preference for using MPI vs. socket-based distributed training? Then I can work on making this easier.
As part  of #2441 , I'm going to simplify the CMake-based installation of the R package so you'll be able to do something like Rscript build_r.R --use-gpu --use-mpi.

Hi @jameslamb Impressed by the helpful reply!
I tried this, looks like it was complaining about not finding OpenCL.
I tried adding these flags in my ~/.R/Makvars but it did not work either.
OpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so
OpenCL_INCLUDE_DIR=/usr/local/cuda/include/

When I complied the python package I had to add the following flags for cmake:
cmake -DUSE_MPI=ON -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..

Full output from build_r.R:
(base) abc:~/git/LightGBM$ Rscript build_r.R
* checking for file ‘/home/abc/git/LightGBM/lightgbm_r/DESCRIPTION’ ... OK
* preparing ‘lightgbm’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
WARNING: directory ‘lightgbm/src/compute/test’ is empty
* looking to see if a ‘data/datalist’ file should be added
* building ‘lightgbm_<IP_ADDRESS>.tar.gz’

[1] "current tarball dir: "
[1] "/home/abc/git/LightGBM"
* installing to library ‘/home/abc/R/x86_64-pc-linux-gnu-library/4.0’
* installing *source* package ‘lightgbm’ ...
** using staged installation
** libs
installing via 'install.libs.R' to /home/abc/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-lightgbm/00new/lightgbm
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- R version passed into FindLibR.cmake: 4.0.2
-- Found LibR: /usr/lib/R
-- LIBR_EXECUTABLE: /usr/bin/R
-- LIBR_INCLUDE_DIRS: /usr/share/R/include
-- LIBR_CORE_LIBRARY: /usr/lib/R/lib/libR.so
-- Found MPI_C: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- MPI libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
-- MPI C++ libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - not found
-- Looking for CL_VERSION_1_1
-- Looking for CL_VERSION_1_1 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find OpenCL (missing: OpenCL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindOpenCL.cmake:150 (find_package_handle_standard_args)
  CMakeLists.txt:111 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/RtmpA2qnFd/R.INSTALL14b751f4fcf/lightgbm/src/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/RtmpA2qnFd/R.INSTALL14b751f4fcf/lightgbm/src/build/CMakeFiles/CMakeError.log".
Error in .run_shell_command("cmake", c(cmake_args, "..")) :
  Command failed with exit code: 1
* removing ‘/home/abc/R/x86_64-pc-linux-gnu-library/4.0/lightgbm’
Error in .run_shell_command(install_cmd, install_args) :
  Command failed with exit code: 1
Execution halted

Also have to admit, enable MPI at this stage is for my learning, but happy to open an issue anyway to kick this off, I'm sure there will be more capable minds out there who can chip in.
Appreciate your help.

hmmm ok, interesting! Sorry, I know very little about OpenCL (my main role here is maintaining the R package) so I can only help so far.
My answer got long as I started typing, so I broke it up
Things to try

Symlink or copy those OpenCL libraries into a common place on the search path of CMake's find_package().
Add the customizations from your cmake command to cmake_args in R-package/src/install.libs.R. For example:

cmake_args <- c(
    "-DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so"
    , " -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/"
)

Background on why things work this way in {lightgbm}
I know for sure that the cmake command you mentioned is missing an important flag for the R package: -DBUILD_FOR_R=ON
https://github.com/microsoft/LightGBM/blob/afc76d2cb8234f6876ed75d923a7916bfef9a1e5/CMakeLists.txt#L17
There are parts of the library that are handled differently for the R package. For example, we use R's built-in logger instead of the *printf family of C functions.
I don't believe ~/.R/Makevars will have an effect on how the R package is built, since we use install.libs.R. There are a lot more details in https://cran.r-project.org/doc/manuals/r-release/R-exts.html, but basically R packages calling C++ code can do one of two options:

template a Makefile and fill it in at build time with a configure script
run R code in a src/install.libs.R

When you use Rscript build_r.R (our hook into CMake from R), you are using option 2. I don't believe ~/.R/Makevars will impact the choices that that path makes about which include dirs to use.
Hope that helps! Let me know what happens and we can debug further.

Amazing, glad to report option 2 you suggested seems to have worked!
I replaced line 137 in your build_r.R to the below, then the build script worked fine and lightgbm package is now installed for my R 4.0.2.
 cmake_args <- c("-DUSE_MPI=ON", " -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so", " -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/")

Thanks @jameslamb !!

Great! And thanks for opening #3364.
I'll close this issue since things are working for you now. Come back any time!


Custom table sort method

Added a custom table sort method that can be used like so:
const cumtomSortFunction = (items: IData[], attribute: string, ascending: boolean): IData[] => {
    // attribute === 'whatever'
    // return the items array sorted how you see fit
};

const myTableheadingAttributes: ITableHeadingAttribute[] = [
    {
        attributeName: 'whatever',
        titleFormatter: _.identity,
        attributeFormatter: _.identity,
        sortMethod: cumtomSortFunction,
    },
];

Codecov Report

Merging #748 into master will decrease coverage by 58.92%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           master     #748       +/-   ##
===========================================
- Coverage   99.77%   40.85%   -58.93%
===========================================
  Files         272      272
  Lines        7114     7118        +4
  Branches     1661     1663        +2
===========================================
- Hits         7098     2908     -4190
- Misses         16     4210     +4194

Impacted Files
Coverage Δ

src/components/tables/Table.tsx
30.76% <ø> (-69.24%)
:arrow_down:

src/components/tables/TableDataModifier.ts
40.19% <100%> (-59.81%)
:arrow_down:

...ropdownSearch/MultiSelectDropdownSearchReducer.tsx
12.82% <0%> (-87.18%)
:arrow_down:

...mponents/dropdownSearch/DropdownSearchReducers.tsx
15.34% <0%> (-83.6%)
:arrow_down:

src/components/calendar/CalendarDay.tsx
22.58% <0%> (-77.42%)
:arrow_down:

...c/components/checkbox/GroupableCheckboxReducers.ts
20.83% <0%> (-77.09%)
:arrow_down:

src/components/datePicker/DatePickerReducers.ts
23.17% <0%> (-76.83%)
:arrow_down:

src/components/syncFeedback/SyncFeedback.spec.tsx
23.91% <0%> (-76.09%)
:arrow_down:

...rc/components/searchBar/SearchBarReducers.spec.tsx
24.07% <0%> (-75.93%)
:arrow_down:

src/components/calendar/Calendar.tsx
24.27% <0%> (-75.73%)
:arrow_down:

... and 221 more

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 888f35e...f41a6c1. Read the comment docs.


[Issue: 251] Can't go to Collection detail when import account

Related issue: #251

🚀 Deployed on https://pr-252--papaya-melba-f5c160.netlify.app


Total Segmentator not running on GPU in windows

Hi, I’m using Total Segmentator on my laptop (Lenovo Legion) that has an RTX3080 laptop GPU. When I launch it from the windows powershell (and not in Slicer) via the command “python .\TotalSegmentator” it tells me that no GPU is detected and so it runs with the “fast” option. I also installed CUDA 12.0 but it still does not detect the GPU. How can I solve this problem?

Hi, have you installed pytorch? Please make sure you install TotalSegmentator in an environment where you also have installed pytorch.

Sure: I installed it using the command “pip3 install torch torchvision torchaudio” as described in this website: https://pytorch.org/
Have I done anything wrong?
Should I install CUDA too? If so, what version? I installed the 12.0 CUDA version but I don’t know if CUDA is required to run TotalSegmentator and what version

I'm opening the Windows Power Shell, when I do "pip install TotalSegmentator" it tells me: "Requirement already satisfied: TotalSegmentator in c:\users\marcosolbiati\appdata\roaming\python\python39\site-packages (1.4.0)". When I do "pip3 install torch torchvision torchaudio" it tells me "Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: torch in c:\users\marcosolbiati\appdata\roaming\python\python39\site-packages (1.13.1)
Requirement already satisfied: torchvision in c:\users\marcosolbiati\appdata\roaming\python\python39\site-packages (0.14.1)
Requirement already satisfied: torchaudio in c:\users\marcosolbiati\appdata\roaming\python\python39\site-packages (0.13.1)".
When I try to launch Total Segmentator via the command "python .\TotalSegmentator -i ct.nii.gz -o segmentations" it returns
"C:\Program Files\Python39\python.exe: can't open file 'C:\Users\MarcoSolbiati\TotalSegmentator': [Errno 2] No such file or directory". If I download the repository from this git and I type "cd C:\Users\MarcoSolbiati\Downloads\TotalSegmentator-master\bin" and "python .\TotalSegmentator -i C:\Users\MarcoSolbiati\Desktop\total-segmentator-input.nii -o C:\Users\MarcoSolbiati\Desktop\total-segmentator-out.nii" it tells me "No GPU detected. Running on CPU. This can be very slow. The '--fast' option can help to some extend.
Traceback (most recent call last):
File "C:\Users\MarcoSolbiati\Downloads\TotalSegmentator-master\bin\TotalSegmentator", line 201, in
main()
File "C:\Users\MarcoSolbiati\Downloads\TotalSegmentator-master\bin\TotalSegmentator", line 179, in main
seg = nnUNet_predict_image(args.input, args.output, task_id, model=model, folds=folds,
TypeError: nnUNet_predict_image() got an unexpected keyword argument 'force_split'".
How can I launch TotalSegmentator in Windows 10 from command line?


feat(plugin-webpack): allow a separate webpack config for the preload…

… script.

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] The changes are appropriately documented (if applicable).
[x] The changes have sufficient test coverage (if applicable).
[x] The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:
Allow the user to supply an alternate configuration for the preload script. Usually the preload script does not need a majority of plugins and rules from the main renderer config.

Can you add a test for this?

Test added

Test added - set the plugin count to 4 as no other tests expect that many plugins.

Any chance this could get reviewed? This would help a lot, including having custom plugins (like react-fast-refresh)  which should only be included in the render and break the build if used with a preload script.

Would it make more sense to add the config under WebpackPreloadEntryPoint rather than on WebpackPluginRendererConfig?

@malept Can we get this merged since the test has been added? Otherwise we cannot use babel-loader with ts-loader (for styled-jsx) as @babel/preset-react doesn't work due to React not being defined in the preload script.

+1 I've just hit this issue (have a preload script and now react-refresh isn't working) and I'm kind of blocked getting this working until this PR is merged and pushed out as a new version...

Superseded by #2679


spacesEndpoint should be optional in ProviderArgs

When updating my project from Pulumi 1.13 to 2.1 I ran into this problem:
the ProviderArgs for DigitalOcean provider requires that I specify a value for spacesEndpoint, even when I'm not using the Spaces API. All the other parameters (including other Spaces related options like accessId / secretKey are optional).
I also checked the Terraform provider's documentation, this parameter is marked as Optional there.

Hey @hazsetata
I am going to raise an issue upstream as it seems that the schema marks this as required in TF - https://github.com/terraform-providers/terraform-provider-digitalocean/blob/master/digitalocean/provider.go#L29
Give me a little time here to find out
Paul


Add citation section & DOI

I've received queries around how to cite this. I should add a DOI and section on the correct citation.

See  for instructions on this.


Delete GANA again

This PR deletes the GANA package again after reintroducing it with PR #51 and reactivates coverage testing

Changes Unknown when pulling fc21b0f537556c2349bffd0641d2952c9800971c on delete-gana-again into ** on master**.


Error for Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export

After update  Followed the guides for connected router and react-redux-router
Getting following error
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
at invariant (invariant.js:44)
at ReactCompositeComponentWrapper.instantiateReactComponent [as _instantiateReactComponent] (instantiateReactComponent.js:77)
at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:367)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:258)
at Object.mountComponent (ReactReconciler.js:46)
at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:371)
at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:258)
at Object.mountComponent (ReactReconciler.js:46)
at mountComponentIntoNode (ReactMount.js:104)
at ReactReconcileTransaction.perform (Transaction.js:140)

Yes I got the same error. It is because when you install "react-router-redux", we install this one : https://github.com/reactjs/react-router-redux and not the new library...
How to get the new one is the question !

npm install react-router-redux@next

This is not working. The module is empty... There is only a "package.json" and "README.md" file in the package...

Yeah, there was a bad publish. I'll get a 5.0.0-alpha.2 out shortly.

5.0.0-alpha.2 is up on the next tag: npm install react-router-redux@next Sorry about that!

Thanks !

This kept me awake for 3 hours, last night. Thank you!
I really appreciate the effort you put in and that you give your knowledge away for free, so others can build, create, and be great. You should feel really good that the software you build is in some cases, enables some people to put food on the table.

@timdorr, so the documentation is for 5.0.0, no 4.0.0?

This issue either still exists or returned in 5.0.0-alpha.4.

Yeah. Also having this issue. Really hindering me from continuing work :/

@iDuuck As far as the tags are concerned, you can go ahead and try to install 5.0.0-alpha.2 instead of next until everything works out, so you can continue work.
By the time you'll be done with your work, I'm sure this will move to the stable version.

getting same thing on 5.0.0-alpha.2, still not working.

Do you have any code to show? If everything is ok and you installed 5.0.0-alpha.2, the problem might be somewhere else. Here are the dependencies of a project of mine, working flawlessly with this version of the library: https://github.com/opreaadrian/workee.fit/blob/master/package.json

Yes, everything is working. It was some kind of funky npm/yarn cache state. After ccahe clean,  rm -R and reinstall its working.

Not working with Latest Version :(

Could you set up a bare project that replicates this issue. I moved on and it worked for me afterwards. Would be glad to help out.

Still broken in latest

It's not on latest, it's on next.

@timdorr are there any workarounds for react-router-redux at this given moment?  Been beating my head against the wall for the past 2 days trying to get this to work by tomorrow.

I get this error because
import { Link } from 'react-router-dom'
maybe help

I still keep getting this error and don't know what to do. Please help:
This is my AzForm.js saved at: "./components/testComponent"
`import React from 'react'
import { Provider } from 'react-redux'
//import { createStore } from 'redux'  //NOT sure whether I need it, but I still get the same error
import { reduxForm } from 'redux-form'
const SignInForm = props => {
return (

);
};
export default reduxForm({
form: 'simple' // a unique identifier for this form
})(SignInForm)`
and this is an extract from index.js
`import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Image } from 'react-native';
import { SignInForm } from "./components/AzForm";
export class HomeScreen extends Component {
render() {
return (

);
}
}`
http://azmeer.info/delme/RN-element-type-invalid-err.png

FWIW, I was getting this error when my import was from react-router rather than react-router-dom, which I guess I was just used to from previous versions?
So instead of
import { Link } from 'react-router';

it should be
import { Link } from 'react-router-dom';

or I suppose for react-native:
import { Link } from 'react-router-native';

@sbauch  thanks!  some error from the Link

@sbauch's answer worked for me as well—as I've been upgrading several apps from @2/3 to @4 a good rule of thumb seems to be anything that's called as a component probably needs to be imported from 'react-router-dom'

Im still gaving the issue with
"react-router-redux": "^5.0.0-alpha.9",

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Hello ! I had the same error and the transition from version 4 to version 5 alpha 9 of react-router-redux solved my problem.
BUT I HAVE ANOTHER PROBLEM: Now, my  do not work anymore (The url changes but the redirection is not done)
import { Link, withRouter } from 'react-router-dom';
"react": "^16.1.1",
"react-dom": "^16.1.1",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^5.0.0-alpha.9",

Guys maybe it should be time to warn about this on the README here


Improvement: allow to choose the home page url

In a Web Browser section in the Options Dialog:
Here is VS2019 UI:

Fixed by 9373ae08831eba7444a71b4ddafe7f0e9d371439


perf: close sessions async

Sessions should be closed using an async gRPC call in order to speed up the closing of a large session pool. Instead of using its own executor, which is limited to 8 worker threads, to execute asynchronous delete session calls, the session pool should use the asynchronous call option in gRPC. This allows a larger number of asynchronous delete session calls to be executed
in parallel and speeds up closing a session pool with a large number of sessions.
Testing against a real Cloud Spanner database with a session pool containing 1,000 sessions shows the following performance for closing the session pool:
Before (3 runs):
6603ms
8169ms
8367ms
After (3 runs):
1297ms
1710ms
1851ms
Fixes #19

The binary compatibility check fails because of:
[ERROR] 7012: com.google.cloud.spanner.Session: Method 'public com.google.api.core.ApiFuture asyncClose()' has been added to an interface
[ERROR] 7012: com.google.cloud.spanner.spi.v1.SpannerRpc: Method 'public com.google.api.core.ApiFuture asyncDeleteSession(java.lang.String, java.util.Map)' has been added to an interface

Both Session and SpannerRpc are public interfaces, but are only used internally in the client library. There are no public methods returning either a Session or a SpannerRpc.


[Dependent] Fix project import with skeletons

Motivation and context

Depends on https://github.com/cvat-ai/datumaro/pull/8

Updated Datumaro version
Added Datumaro Skeleton annotation type
Small fixes for backups (an issue with same sublabels)
Fixed project import with skeletons

How has this been tested?

Checklist

[ ] I submit my changes into the develop branch
[ ] I have added a description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[ ] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.

/check

/check

/check

/check

/check

@kirill-sizov, thanks. Fixed.

/check

Full check can be considered as green for this PR, the reason why is was red currently unknown, but I've created issue about this problem.

/check


Cameras and marks not showing on map

I noticed that there are no cameras shown on my map when I went for a mapping walk today.
None of the cameras I marked showed up either.
It was a fresh install on Lineage OS 16 (Android 9).
My location was shown correctly.
Source is FDroid, current version.

This is... odd. The API has not changed, and the server seems to be responding to requests correctly with the iOS client. On Android, I see the same behavior as you. The logs complain that the position is NULL, despite the device clearly having location data and displaying the user position on the map.

This is definitively a problem in the Android code. Specifically, the error is in DownloadPinsTask.java:
// Here we round our GPS coordinates to gross approximations for anonymity
if( p.position == null ) {
    Log.d("GPS", "Position is null!!");
    return null;
}

This should only occur when the app is first starting and doesn't yet have position data, or if permissions are set wrong and prevent the app from getting location data. The data is sent from GPS.java:
    public void onLocationChanged(Location loc) {
        // If this is our first location update just prime everything
        if( position == null || lastKnown == null ) {
            Log.d("GPS", "Initial ping, downloading first pins.");
            position = loc;
            lastKnown = new Date();
            new DownloadPinsTask().execute(new PinData(new HashMap<LatLng, Integer>(), map, position));
            return;
        }

Which should... update the position as soon as we receive non-null location data, and then send a new HTTP request. Given that this has been working for years, and we have not pushed an update in quite some time, my guess is something has changed in the Android API or OS permissions system, so our approach is no longer correct.

The app is functioning correctly on at least some Android devices (@tfdahlin confirmed), so this may be vendor or OS-version specific. Just to confirm, can you check that location permissions for the app are enabled, restart the app, and verify that the cameras don't show up when you're zoomed out? This is obviously a bug no matter what, but perhaps it's poor handling of permissions changes rather than a flaw in the area of code I highlighted.


chore: start to clean kubeinvaders.js

Part of #82

Ah, someone else already completed the task!
Closing in favour of https://github.com/lucky-sideburn/kubeinvaders/pull/88

hi @gdorsi
ok thank you!


Not able to add plugin to an API

I am not able to add plugin to an API. Please check the attached image.

Chrome is showing the below error in console:-
XMLHttpRequest cannot load http://kong-dev:8001/apis/95877502-4469-43fe-c347-2e25cd831800/plugins. Request header field Content-Type is not allowed by Access-Control-Allow-Headers.

For our environment adding Access-Control-Allow-Headers : "Content-Type" in server was good enough and solved the issue.


Can i merge this to my uBlacklist repo?

Can i merge this to my uBlacklist repo?

https://github.com/eallion/uBlacklist-subscription-compilation

It's a compilation subscription for uBlacklist.
Thanks!

Sure!

Thanks very much!


Planting the garden with projects.json

The goal of this pull request is to populate our functional DiscoverBOS curation system with data from NEAR Catalog, thanks to Shot, Robert, and Kent, who initially organized available project data from AwesomeNEAR, Horizon, and Near Social.
Background / Context
We need to distinguish a catalog from the actual project curations with source IDs related to specific data for each thing.
Catalogs
Catalog Data
There is a demo NEAR catalog accessible via this path (for testing purposes):
awesomebos.near/catalog/**
Catalog Example
{
"nearweek": {
    "source": {
      "near-social": "nearweek.near",
      "awesomenear": "nearweek"
    },
    "status": "active"
  },
  ...
 }

Projects
Project Data
Query uploaded project IDs
NEAR_ENV=mainnet near view social.near keys '{"keys":["legacy-awesome.near/project/*"]}'

Query project details of NEARWEEK:
NEAR_ENV=mainnet near view social.near get '{"keys":["legacy-awesome.near/project/nearweek/**"]}'

Project Curation Example
{
"nearweek": {
    "profile": {
      "name": "NEARWEEK",
      "tagline": "Decentralised news sources within the NEAR ecosystem.",
      "description": "NEARWEEK is the one-stop-shop for all NEAR related news. Each weekly newsletter and edition is made possible via news contributions from the NEARWEEK community to the NEWS DAO. Subscribe or visit NEARWEEK.com to get your weekly dose of news from the NEARverse!",
      "image": {
        "url": "https://web.archive.org/web/20230521202108im_/https://awesomenear-spaces.fra1.digitaloceanspaces.com/production/projects/nearweek/nearweek.jpg"
      },
      "tags": {
        "ECOSYSTEM": "",
        "EDUCATION": "",
        "GUILDS": ""
      },
      "linktree": {
        "twitter": "https://twitter.com/NEARWEEK",
        "medium": "https://medium.com/nearweek",
        "telegram": "https://t.me/nearweek",
        "linkedIn": "https://www.linkedin.com/company/nearweek/",
        "astroDAO": "nearweek-news-contribution.sputnik-dao.near",
        "whitepaper": "https://docs.nearweek.com/"
      }
    }
  },
  ...
}

ACTION PLAN

[ ] initialize curation data
[ ] save with discover.near
[ ] enable updates via proposals
[ ] activate curation system
[ ] engage project leaders

OTHER / BACKLOG

[ ] integrate customizable pages
[ ] build groups with community features
[ ] experiment with project settings

The projects.json file is in the build/discoverbos folder. Let me know if there is a better place for it.
We also have this project curation editor, which pulls from that JSON file by default.
Here is the data.projects widget and module (data provider).
Demo: project viewer, based on results from Hackoween!


Absolute paths don't work on Windows

On 1.1.1
Config:
    new CopyWebpackPlugin([
        {from: 'src/assets/*.*', to: path.resolve(__dirname, '../dist')}
    ])

I had to revert to 1.0.0 to get this working
The path resolves to C:\node\sp_app\dist

some on OSX

don't seem to work on Linux either.

had same problem on windows. had to use To = relative and set output path

index.js line 51 relDest = path.relative(baseDir, relDest);  =>  relDest = path.relative(relDest, baseDir);
it works

Absolute to paths were broken, but this should work in v2.0.1 now


feat: add preserveEmptyObjects filter option + remove keepEmptySchema option

Having a dedicated option--keepEmptySchema to prevent removal of empty schema object wasn't flexible enough.
I decided to completely remove it and instead I added a preserveEmptyObjects which is a filtering option.
It can be :

undefined : we keep original behavior (removal of all empty objects except for examples)
false : we remove all (even examples)
true : we keep all
[...] : for instance with ['examples', 'schema'] value, we preserve all empty objects defined inside examples and schema paths.

@mamatsunami this is a great addition for the filtering option. It suits better than making it a separate option. Thanks again for taking the time and effort to provide a ready to merge PR.


shard timeout / req strict timeout

to offer stronger guarantees against stragglers, re-investigate shard and request level timeout
previous timeout try was https://github.com/rom1504/img2dataset/pull/153 ; it was slower

http://<IP_ADDRESS>/axis-cgi/mjpg/video.cgi?&dummy=1437918680761 example of timeout


added validatorBypass parameter to Annotate

solves issue #345

🙌
@djayatillake my thought (and it might be a crazy one) was to use this parameter in the buz metaschema to disable validation on a schema-by-schema basis.
Was thinking something like this:
self-describing event comes in with an associated schema reference -> get schema from registry -> disable = schema.get('disableValidation', false) -> either skip validation or proceed w/ validation, depending on value
Does that make sense on your side? It definitely seems like a nice mechanism to have @ a schema level

Yeah I think that makes sense, so then Annotate would need to look for that parameter in the metaschema and then decide not to validate.
I'm guessing then our opinionated position is that if you don't want to validate a schema, you have to explicitly say you don't want to in the metaschema - you don't get to manually call Annotate bypassing the schema validation (I couldn't see any other calls to Annotate so assumed that someone deploying Buz would use the Annotate function themselves).
Is this also to leave all or as much configuration as possible in the metaschema?

I'm naturally leaning towards "as much schema-specific config as possible via metaschema properties". Examples of this includes:

md5 these pii props as soon as this event is collected
tokenize these fields
don't validate this schema at all
annotate these fields as pii/gdpr/whatever (easily find schemas w/ pii/gdpr props)
this is the org/team/individual to be considered owner (alert them if invalid event volume spikes)
-...etc

If it's helpful, the use case I had in mind here was one where you want to add properties/types/descriptions (so they can be pushed downstream into data discovery tooling or whatev) but are nervous about going all-in on validation+bifurcation (due to not being able to control source or something).
A similar validation-bypass mechanism at the moment is creating a wildcard schema with no props defined. Downside of these is you can't use any other discovery/annotation/metadata mechanisms:
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "blah/v1.0.json",
    "type": "object",
    "properties": {}, <--------------------- [Will pass validation perfectly fine, but it isn't very useful]
    "additionalProperties": true
}

🙌
@djayatillake my thought (and it might be a crazy one) was to use this parameter in the buz metaschema to disable validation on a schema-by-schema basis.
Was thinking something like this:
self-describing event comes in with an associated schema reference -> get schema from registry -> disable = schema.get('disableValidation', false) -> either skip validation or proceed w/ validation, depending on value
Does that make sense on your side? It definitely seems like a nice mechanism to have @ a schema level

I've had a go at changing to this way.
Assumptions:

An array of envelopes can have different kinds of events, some of which may have validation disabled and some of which may not.
It's better to try to understand if disableValidation is True ahead of doing Validation. I could in theory do it after ValidatePayload is run as then schemaContents would already exist, but then I've validated the payload unnecessarily.
If someone is using disableValidation they won't want the envelope.EventMeta fields populated... but this goes against what you've said:

If it's helpful, the use case I had in mind here was one where you want to add properties/types/descriptions (so they can be pushed downstream into data discovery tooling or whatev) but are nervous about going all-in on validation+bifurcation (due to not being able to control source or something).

Added another commit to add those fields regardless of Validation as I think it makes sense to do so.

I was also wondering if this scales well, as we're validating n events inside a loop where each time we have to find the schema from the registry and then validate the event.
Would it be better for each validation to be a lambda of its own elsewhere? Or is it the case that this process would never have so many events sent to it in one call that scaling would be an issue as something else is microbatching to it?

@jakthom let me know if you want me to change anything

Would it be better for each validation to be a lambda of its own elsewhere? Or is it the case that this process would never have so many events sent to it in one call that scaling would be an issue as something else is microbatching to it?

Another great q. There's a few go-specific things to think about, which would prob mitigate the concerns:

buz is based on [gin](https://github.com/gin-gonic/gin, which is built on top of net/http. net/http serves each request in a separate goroutine, so it scales well as concurrent requests 📈 📈 📈 📈
The schema cache is shared by all goroutines - once it's warm all other goroutines benefit and don't go remote. Which limits the overhead of going remote.

I just fiddled a bit - tried pushing a branch to your fork (to then cut a pr against djayatillake:345-add-schema-level-validation-bypass-mechanisms) but wasn't able to push.
What do you think about this way of doing it?
https://github.com/silverton-io/buz/pull/450
It keeps schema-property-getting in a single place (func getMetadataFromSchema) and keeps # of trips to onboard schema cache at 1 (instead of 2).

I just fiddled a bit - tried pushing a branch to your fork (to then cut a pr against djayatillake:345-add-schema-level-validation-bypass-mechanisms) but wasn't able to push.
What do you think about this way of doing it?
#450
It keeps schema-property-getting in a single place (func getMetadataFromSchema) and keeps # of trips to onboard schema cache at 1 (instead of 2).

Weird I have allow edits from maintainers.

I just fiddled a bit - tried pushing a branch to your fork (to then cut a pr against djayatillake:345-add-schema-level-validation-bypass-mechanisms) but wasn't able to push.
What do you think about this way of doing it?
#450
It keeps schema-property-getting in a single place (func getMetadataFromSchema) and keeps # of trips to onboard schema cache at 1 (instead of 2).

Yes I like this, I didn't want to change the eventMeta type as I wasn't sure of the knock on effects but had thought about it.
I did consider only keeping trips to the schema cache at 1 rather than two but it felt wrong to validate the event when we specifically wanted to disable validation 😂, but this may be me putting principle over pragmatism.

Can you use the get method on that key even though it's nested because it's the only one with that name? Does it end up traversing the tree inefficiently because it is searching through all the keys? Minutae I guess.
I've made you a collaborator on my repo to see if that allows you to push.

🚢 :shipit:


Remove usage of global $_POST

Only the local $post var is used for now in captcha.class.php.
So the iconcaptcha lib performs better with 3rd apps.
Did some other small code improvements.

Thanks for pointing this out. Since I was already working on the code, I added it myself instead of merging your pull request. I however did add your username to the commit, see https://github.com/fabianwennink/IconCaptcha-Plugin-jQuery-PHP/commit/e380139618786ba381c9dc22da19f031146df9ca.


Encoding of NIL

In the code it is mentioned that empty list is encoded as null, but that is not the case:
NEOSW> (neo4cl::encode-element '())
#(160)
NEOSW> (neo4cl::encode-element :null)
#(192)
NEOSW> (neo4cl::encode-null)
#(192)

I don't know if this is OK or not. Just letting you know, as I stumbled when passing NIL as a parameter of a query, gets encoded as an empty list, not null, and signals an error (neo4j only allows primitive types in query parameters, and a list is not a primitive type).
I have to explicitly use :null in query parameters. Or add this:
(defmethod neo4cl::encode-element ((element (eql nil)))
	 (neo4cl::encode-null))

To be clearer, this query fails with: "Bolt error [Neo.ClientError.Statement.TypeError]: Property values can only be of primitive types or arrays thereof. Encountered: Map{}."
(neo4cl:bolt-transaction-autocommit *db* "CREATE (o:MyObject {x: $x})" :parameters '(("x" . nil)))

this works:
(neo4cl:bolt-transaction-autocommit *db* "CREATE (o:MyObject {x: $x})" :parameters '(("x" . :null)))

I guess that's OK as there's no good way of solving the ambiguity of NIL in Common Lisp. But letting you know just in case.

You're right: I failed to handle that case, despite documenting it.
You guessed correctly, too: I had to resolve the ambiguity somehow, and this was the least-bad option I could think of. If you can suggest a better way to handle this, I'd love to know about it, because I don't really like this solution either.

The NIL ambiguity problem is one of the things I don't like about CL. I know, if I say it out loud, everyone will tell me I'm wrong. But it causes problems in lots of places. JSON encoding libraries, Postmodern, and it will be a problem in this library too. I haven't seen a good solution anywhere.

You're in good company regarding that ambiguity; I'd prefer an explicit boolean type, too.
I've started work on fixing this, because I can at least see what needs fixing. It'll take time to extend the testing and be happy with that but, if you're willing to live on the bleeding edge, there's now a 23_Encode_empty_lists_as_Null branch in this repo so you can follow along there.

You're in good company regarding that ambiguity; I'd prefer an explicit boolean type, too.

And you would also need an explicit list too somehow, as NIL can be either null or empty list.
I suspect Clojure implements a solution for this, but Clojure doesn't have CONS lists, so ...
Sometimes a "solution" is to force more explicit datatypes, like instead of lists, use vectors. And let's say you want to encode some "object" as an alist, use a hash-table instead. Etc. But still ...

Btw, I think the current encoding/decoding is "fine". I mean, if user needs to use :null instead of NIL, so be it. That's how things are handled in other libraries like Postmodern, or CL-JSON.

Now that I'm back at a computer, testing this was simpler than I'd expected.


How do I download the complete dataset?

The title.
I was unable to find the complete dataset with all the scenes. I could only get one of the scenes from the releases page. Please guide how to download it.

Hi @Kirang96, great question. We're planning on releasing more scenes in the near future. In the meantime, we wanted to release our test scene as soon as it was ready, for people that want to begin experimenting with our platform immediately.


General structure discussion

r_monitors contains automatic data  from the remote monitors and also manually validated data from the ICU.  We must study the data and decide to split this table in  remote monitors  and uci manually validated data.

how does one tell the difference?

if USUARIO like  BETTERCARE  is from remote monitors and if is anything else its manually validated


What does this error mean?

I am getting this response when placing a limit order with your Orderbook API:
{
  statusCode: 400,
  message: 'bit invalidator only supported for RFQ orders',
  error: 'Bad Request'
}

What does this mean? I can't find any reference for bit invalidator (outside of the contract).

If anyone is struggling with this, their documentation is outdated. For examples, please read the unit tests in the current codebase.


Add a publishing method to Resources

For some use cases, we need transformed assets to be published even if their .RelPermalink/.Permalinkare not printed within a Hugo template file. (ex. fonts, images from Mardkdown etc...).
For this reason I think we need a .resource.Publish method.
{{ with Resources.Match "/fonts/**" }}
    {{ range . }}
         {{ resources.Publish }}
     {{ end }}
{{ end }}

What is wrong with:
{{ with Resources.Match "/fonts/**" }}
    {{ range . }}
        $foo := {{ .RelPermalink }}
     {{ end }}
{{ end }}

True, I didn't realize saving it in a variable would work. Still feel a bit hackish, but it removes any urgency for this issue.


addition of signadot job submit -f ... --wait

24-12-30 scott@air cli % cat ~/tmp/job.yaml
spec:
  namePrefix: jwait
  runnerGroup: scott-jrg
  script: |
    #!/bin/sh
    echo not exiting-28
24-12-30 scott@air cli % ./signadot job submit -f ~/tmp/job.yaml --wait
Job jwait-lfl0zyi succeeded on Job Runner Group: scott-jrg

Dashboard page: https://app.signadot.com/testing/jobs/jwait-lfl0zyi

24-12-30 scott@air cli % echo $?
0

24-12-30 scott@air cli % cat ~/tmp/job.yaml
spec:
  namePrefix: jwait
  runnerGroup: scott-jrg
  script: |
    #!/bin/sh
    echo exiting-28
    exit 28
24-12-30 scott@air cli % ./signadot job submit -f ~/tmp/job.yaml --wait
Job jwait-k3mbgby failed on Job Runner Group: scott-jrg

Dashboard page: https://app.signadot.com/testing/jobs/jwait-k3mbgby

Error: job "jwait-k3mbgby" failed
24-12-30 scott@air cli % echo $?
1

24-12-30 scott@air cli % ./signadot job submit -f ~/tmp/job.yaml --wait --attach
Error: cannot specify both --attach and --wait

Just to get a little bit of context,  the main difference is that wait don't print the logs? Or there is other difference?


Upgrade GameSalad.app to v0.13.22 and update appcast (use SSL)

Also added comment # amazonaws.com is the official download host per the vendor homepage as @alebcay pointed out in #11955.

Looks good, thanks! :+1: Travis seems to be hanging at the moment.


Id from object

I have options
days: [
{ id: 1, day: 'Poniedziałek' },
{ id: 2, day: 'Wtorek' },
{ id: 3, day: 'Środa' },
{ id: 4, day: 'Czwartek' },
{ id: 5, day: 'Piątek' },
{ id: 6, day: 'Sobota' },
{ id: 7, day: 'Niedziela' }
]

How in model return id of selected item? I need this to laravel request

@majweb, could you show concrete code so that we can help you?
If, for example, you're using v-model with multiselect, try accessing the id of the selected value simply with value.id. Here is an example of single selection of objects like you probably have: http://monterail.github.io/vue-multiselect/#sub-single-select-object

Imię polskojęzyczne więc spróbuje😊. Bazowałem na tym przykładzie lecz interesuje mnie zwrócenie nie całego obiektu tylko id w nim mieszczacego się. Mam model , który wchodzi w skład metody do żadania post i ten input misi zawierać wartość liczbowa czyli id zwracanego obiektu.15.07.2017 19:18 Piotr Czarnecki<EMAIL_ADDRESS>napisał(a):@majweb, could you show concrete code so that we can help you?
If, for example, you're using v-model with multiselect, try accessing the id of the selected value simply with value.id. Here is an example of single selection of objects like you probably have: http://monterail.github.io/vue-multiselect/#sub-single-select-object
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

There are already issues regarding returning just a primitive value rather than the whole object passed to v-model. I’m still thinking how to properly approach this and not break the support for dynamic/async options and preselecting options that don’t yet exist in the options list.
As for now, please manually extract the needed value and use it. When preselecting, try to find the option/rebuild it into an object that matches the option schema.

<label class="typo__label">Select with search</label>
<multiselect v-model="plan_start" :options="days" placeholder="Select one" label="day"
track-by="day"></multiselect>

data () {
return {
days: [
{ id: 1, day: 'Poniedziałek' },
{ id: 2, day: 'Wtorek' },
{ id: 3, day: 'Środa' },
{ id: 4, day: 'Czwartek' },
{ id: 5, day: 'Piątek' },
{ id: 6, day: 'Sobota' },
{ id: 7, day: 'Niedziela' }
],
newItem : {'plan_start':'','part_id':'','exercise_id':'','series':'','repeat':'','weight':'','time':''}
methods: {
axios.post('/klient/plany/zapisz', {
plan_start: this.newItem.plan_start,
part_id: this.newItem.part_id,
exercise_id: this.newItem.exercise_id,
series: this.selected,
repeat: this.repeatsValue,
weight: this.weightValue,
time: this.timeValue
})
.then(response => {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}

In newItem.plan_start must by Id from object

This is easily dealt with. Simply add a @input listener and push the ID's into another data array that you send with your post requests:
<template>
    <multiselect
        v-model="users"
        :options="options"
        :multiple="true"
        label="name"
        track-by="id"
        placeholder="Select approvers"
        @input="updateApprovers"
    ></multiselect>
</template>

<script>
    import Multiselect from 'vue-multiselect';

    export default {
        props: {
            dataUrl: String,
            saveUrl: String,
        },

        data() {
            return {
                approvers: [],
                users: [],
                options: [],
            }
        },

        mounted() {
            this.fetchApprovers();
        },

        methods: {
            /**
             * Updates the approvers form array when a selection is made.
             *
             * @param users
             *
             * @return void
             */
            updateApprovers(users) {
                let approvers = [];

                users.forEach((user) => {
                     approvers.push(user.id);
                });

                this.form.approvers = approvers;
            },

            /**
             * Fetches valid approvers.
             *
             * @return void
             */
            fetchApprovers() {
                axios.get(this.dataUrl).then(({data}) => {
                    this.options = data;
                });
            },
        }
    }
</script>

show me how this looks im my example

@majweb
W przykładzie ze zmianami dla plan_start to by wyglądało tak
<multiselect v-model="plan_start" @input="save" :options="days" placeholder="Select one" label="day"
track-by="day"></multiselect>

data () {
  return {
    days: [
      { id: 1, day: 'Poniedziałek' },
      { id: 2, day: 'Wtorek' },
      { id: 3, day: 'Środa' },
      { id: 4, day: 'Czwartek' },
      { id: 5, day: 'Piątek' },
      { id: 6, day: 'Sobota' },
      { id: 7, day: 'Niedziela' }
    ],
    newItem : {'plan_start': null,'part_id':'','exercise_id':'','series':'','repeat':'','weight':'','time':''}
  }
}

methods: {
  save (plan_start) {
    axios.post('/klient/plany/zapisz', {
      plan_start: plan_start.id,
      part_id: this.newItem.part_id,
      exercise_id: this.newItem.exercise_id,
      series: this.selected,
      repeat: this.repeatsValue,
      weight: this.weightValue,
      time: this.timeValue
    })
    .then(response => {
      console.log(response);
    })
    .catch(function (error) {
      console.log(error);
    });
  }
}

Co w przypadku jeżeli używam @submit.prevent na formularzu i wtedy wysyłam żadanie post axiosem a widzę że metoda jest przypisana do @input?22.07.2017 16:59 Piotr Czarnecki<EMAIL_ADDRESS>napisał(a):@majweb
W przykładzie ze zmianami dla plan_start to by wyglądało tak
<multiselect v-model="plan_start" @input="save" :options="days" placeholder="Select one" label="day"
track-by="day">
data () {
return {
days: [
{ id: 1, day: 'Poniedziałek' },
{ id: 2, day: 'Wtorek' },
{ id: 3, day: 'Środa' },
{ id: 4, day: 'Czwartek' },
{ id: 5, day: 'Piątek' },
{ id: 6, day: 'Sobota' },
{ id: 7, day: 'Niedziela' }
],
newItem : {'plan_start': null,'part_id':'','exercise_id':'','series':'','repeat':'','weight':'','time':''}
}
}
methods: {
save (plan_start) {
axios.post('/klient/plany/zapisz', {
plan_start: plan_start.id,
part_id: this.newItem.part_id,
exercise_id: this.newItem.exercise_id,
series: this.selected,
repeat: this.repeatsValue,
weight: this.weightValue,
time: this.timeValue
})
.then(response => {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
}
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

@stevebauman your answer works percect thanks.

@majweb then without @input
data () {
  return {
    days: [
      { id: 1, day: 'Poniedziałek' },
      { id: 2, day: 'Wtorek' },
      { id: 3, day: 'Środa' },
      { id: 4, day: 'Czwartek' },
      { id: 5, day: 'Piątek' },
      { id: 6, day: 'Sobota' },
      { id: 7, day: 'Niedziela' }
    ],
    newItem : {'plan_start': null,'part_id':'','exercise_id':'','series':'','repeat':'','weight':'','time':''}
  }
}

methods: {
  save () {
    axios.post('/klient/plany/zapisz', {
      plan_start: this.newItem.plan_start.id,
      part_id: this.newItem.part_id,
      exercise_id: this.newItem.exercise_id,
      series: this.selected,
      repeat: this.repeatsValue,
      weight: this.weightValue,
      time: this.timeValue
    })
    .then(response => {
      console.log(response);
    })
    .catch(function (error) {
      console.log(error);
    });
  }
}

@majweb:
this simple idea will do the trick.

change your days variable as below:
var days = {1: 'Sun', 2: 'Mon', 3: 'Tue', 4: 'Wed', 5: 'Thu', 6: 'Fri', 7: 'Sat'}

insert component:

<multiselect
     v-model="plan_start"
     :options="Object.keys(days)"
     :custom-label="opt => days[opt]"
</multiselect>

Have a try, it works for me.

@jetmiko great approach!
@majweb and if you need the preserve the initial type of the keys add .map(Number)

<multiselect
v-model="rule.type_ids[i]"
@change="getVehicles"
:options="types.map(type => type.id)"
:custom-label="opt => types.find(x => x.id == opt).name">

Hi guys, I still have a problem with this plugin. When I try to modify an item that I retrieve from the backend with an axios request, instead to see the selected value I see the placeholder:"select a story". I tried to use both (v-model and :value) without success. Initially the multiselect should be initialized with the correct value.
If I use :value="chapter.story" then I can see the properly value, but can't swtich to another one
<multiselect
  v-model="chapter.story"
  :searchable="false"
  track-by="id"
  placeholder="Select a story"
  :options="stories.map(story => story.id)"
  :custom-label="opt => stories.find(x => x.id == opt).title"
/>

If I use :value="chapter.story" then I can see the properly value, but can't swtich to another one
Any suggestion?

@realnot if you’re passing primitives as options (so IDs only), you don’t need track-by anymore.

@shentao, ok thanks, but I'm still getting problem on find method. When I retrieve the object from the backend, I get "undefined" the first time.
chapter is an object:
chapter: {
...
...
story: 4
}
the options is a list of objects:
options: [
0: {id: 1, title: 'my story title 1'},
1: {id: 2, title: 'my story title 2'},
]
The prolem here is that initially when I get the chapter, story is not an object. Maybe the solution is binding the :value to a custom method that change the selected value from: story: 4 to `story: {id: 4, title: 'my story title 4'}?

Yeah. That’s one of the requirements. The value has to be a subset of the options and have the same structure (so if options are objects, so must be the value).
It doesn’t have to include all the fields. The minimum is the property that you passed into track-by which in this case would be id and title that you might be using for showing the label.
Please take a look at the following example: https://vue-multiselect.js.org/#sub-single-select-object

What worked for me with an array of objects like:
let types = [
{id: 1, name: "john"},
{id: 2, name: "steve"}
];
<multiselect
  v-model="rule.id"
  :options="types.map(type => type.id)"
  :custom-label="opt => types.find(x => x.id == opt).name">
</multiselect>

@sietzekeuning In my system the selected value comes from the database in the form of an integer, your code selects the correct value based on that idea. However, every option is Selected, so there is only the "Press enter to remove" option on each option. So I have to click that on any row and then I can select a different row.
Any idea how this happens?

Multiselect explain about these here

[ { id: 1, day: 'Poniedziałek' }, { id: 2, day: 'Wtorek' }]

<multiselect
  v-model="value"
  :options="options"
  :custom-label="customLabel"
   track-by="day">
</multiselect>

//Now you have to create a method
customLabel ({ name, day }) {
      return day
}

this issue should be include by default in the library instead of these little hacks hm

@vortechron Maybe it will in the future version. Maybe not. If you dislike the "hacks", feel free to build your own solution. I’m not forcing anyone to use this library.

@shentao hey man, your library is awesome, used it all the time, just this bit bother me. hm

Yeah, I get that, I also had some use cases where this could be useful and I’m strongly considering adding this to v3 that I finally found some time to work on again. But the workaround isn’t that problematic IMO. And as answered in here on any of the duplicates of that feature request – this collides with how the async function works. I don’t want to introduce mutually exclusive features since that might end up being even more confusing.

What worked for me with an array of objects like:
let types = [
{id: 1, name: "john"},
{id: 2, name: "steve"}
];
<multiselect
  v-model="rule.id"
  :options="types.map(type => type.id)"
  :custom-label="opt => types.find(x => x.id == opt).name">
</multiselect>

Great solution, but it creates a problem with search, as the label field is not stated and the search works by searching the IDs.


[BUG] Resources - Get By Id - GET https://management.azure.com/{resourceId}?api-version=2021-04-01 is not returning workspace

Library name and version
Azure REST Api: management.azure.com
Version: 2021-04-01
Describe the bug
The GET REST API Resources - GetById call give a error on resourcetype OperationalInsights/workspaces
var resourceId = "/subscriptions/{subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"
response = await _httpClient.GetAsync($"https://management.azure.com{resourceId}?api-version=2021-04-01");
https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id
Message:
{"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'westeurope' and API version '2021-04-01' for type 'workspaces'. The supported api-versions are '2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview, 2017-03-15-preview, 2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-06-01, 2021-03-01-privatepreview, 2021-12-01-preview, 2022-10-01'. The supported locations are 'eastus, westeurope, southeastasia, australiasoutheast, westcentralus, japaneast, uksouth, centralindia, canadacentral, westus2, australiacentral, australiaeast, francecentral, koreacentral, northeurope, centralus, eastasia, eastus2, southcentralus, northcentralus, westus, ukwest, southafricanorth, brazilsouth, switzerlandnorth, switzerlandwest, germanywestcentral, australiacentral2, uaecentral, uaenorth, japanwest, brazilsoutheast, norwayeast, norwaywest, francesouth, southindia, koreasouth, jioindiacentral, jioindiawest, qatarcentral, canadaeast, westus3, swedencentral'."}}
Exception type:
400 Bad Request
Failed method:
Resources - Get By Id - GET https://management.azure.com/{resourceId}?api-version=2021-04-01
Resource Management
API Version:
2021-04-01
Expected behavior
The call await _httpClient.GetAsync($"https://management.azure.com{resourceId}?api-version=2021-04-01") is returning the workspace resouretype
Actual behavior
_httpClient.GetAsync($"https://management.azure.com{resourceId}?api-version=2021-04-01") gives 400 Bad Request
Reproduction Steps
Calling this part of code:
var resourceId = "/subscriptions/{subscription}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"

response = await _httpClient.GetAsync($"https://management.azure.com{resourceId}?api-version=2021-04-01"); .

Environment
N/A

@int292 Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.

@int292 While I invoked the Get By ID Rest API, I was able to get the 200 success status code. Sending my Request URL here if that helps:

https:// management.azure.com/subscriptions/XXXXX/resourceGroups/MYRGName/providers/Microsoft.OperationalInsights/workspaces/MyLAWorkspaceName?api-version=2022-10-01

So could you please change the API version to 2022-10-01 and try ?
Alternatively, you could also invoke the Workspaces - Get REST API to get a workspace instance. Hope this helps.

@int292 I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please let us know if you had any updates on this. Awaiting your reply.

@int292 The action is currently pending on you to try the above suggestion. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.

@int292 While I invoked the Get By ID Rest API, I was able to get the 200 success status code. Sending my Request URL here if that helps:

https:// management.azure.com/subscriptions/XXXXX/resourceGroups/MYRGName/providers/Microsoft.OperationalInsights/workspaces/MyLAWorkspaceName?api-version=2022-10-01

So could you please change the API version to 2022-10-01 and try ?

Yes this works, could you apply the fix in that version to the latest api version?
Also, using this api for these resources using api-version=2022-10-01 results in an 'unsupported' error. Could you please fix getting all types of resources in the latest api version?
     "Microsoft.OperationalInsights/workspaces",
            "Microsoft.Logic/workflows",
            "Microsoft.KeyVault/vaults",
            "Microsoft.Web/connections",
            "Microsoft.Logic/integrationAccounts",
            "MICROSOFT.WEB/connections"


Allow later pydantic releases

The PyPI entry for mozart-api points to this repo. Not sure if it's a mistake as there here is no source code...
Anyways the pyproject.toml files says pydantic = "^1.10.5, <2". Could you please consider to allow later pydantic? This is an issue for some distributions (like Nixpkgs) as only pydantic>2 is available. The constraint for <2 doesn't affect users which are using venvs or the Home Assistant integration.
Thanks

Hi
Most of the code is auto-generated and was therefore not included (This was also meant to be a language-independent repo for the API). We've however had some requests for the source code to be available somewhere, so it is probably going to available here.
Currently the Python API was generated with pydantic v1 as there were some problems with Home Assistant as far as I can remember, but it seems that is no longer the case. We'll release an updated API client with support for pydantic v2 shortly.
Kind regards

Here you go https://pypi.org/project/mozart-api/<IP_ADDRESS>.2/

OK. Home Assistant does not allow pydantic v2. The <IP_ADDRESS>.2 release will remain available, but we will unfortunately be switching back to pydantic v1 for future releases for now.


Implement DualRefCounted interface for objects needing strong and weak refs.

Classes that need both internal (weak) and external (strong) refs can inherit from DualRefCounted<>.  It works the same way as our existing RefCounted<> interface does, except that it supports both weak and strong refs.
I have also added a WeakRefCountedPtr<> smart-pointer class for enforcing ownership of weak refs.

Known issue: #22523


Added 'Career Guide' Project: Helping Users Explore Career Paths

Type of change

[x] Added new project
[ ] Bug fix
[ ] New features
[ ] Enhanced documentation

Changes proposed in this pull request

Project name :

Career Guide

Short description :

Career Guide is an interactive Python application designed to help users explore various career paths and make informed decisions about their future. It provides information about ten popular career options, visualizes the demand percentage for each career over the years, and offers educational guidance.
Checklist

[x] The code is Python 3 compatible
[x] I have added relevant comments in my file to make the code understandable
[x] I have added my project in a folder which includes all the necessary files

Thanks for your contribution @ShivaNagachander 🚀