Configure failure: missing include symlink for Python 2.7

Description
Configure failure: missing include symlink for Python 2.7

Steps/Code to Reproduce
unzip master.zip
cd turicreate-master
./configure
Expected Results
Configure completes normally

Actual Results
When running ./configure in preparation to build, it fails saying

/opt/turicreate-master

linux_patch_sigfpe_handler
[[ linux-gnu == linux* ]]
targfile=deps/local/include/pyfpe.h
echo '#undef WANT_SIGFPE_HANDLER'
cat - deps/local/include/pyfpe.h
cat: deps/local/include/pyfpe.h: No such file or directory

And higher up we see this has happened:

mkdir -p deps/local/lib
mkdir -p deps/local/include
pushd deps/local/include
/opt/turicreate-master/deps/local/include /opt/turicreate-master
++ ls '../../env/include/python2.7/'
ls: cannot access '../../env/include/python2.7/': No such file or directory

By that time the script has made .../deps/env/include and put a symlink in there to /usr/include/python3.6m called python3.6m but it needs to also create one to /usr/include/python2.7 called python2.7. Create that symlink by hand, go back up to the distribution root and do ./configure again and it will work. This is on Gentoo Linux and its order of preference for Python is currently 3.6, 3.4, 2.7, and 3.5.
Versions

import platform; print(platform.platform())
<EMAIL_ADDRESS>import sys; print("Python", sys.version)
Python 3.6.5 (default, Apr 18 2018, 09:46:48)
[GCC 6.4.0]
import numpy; print("NumPy", numpy.version)
NumPy 1.10.4
import scipy; print("SciPy", scipy.version)
SciPy 0.19.1
import sklearn; print("Scikit-Learn", sklearn.version)
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'sklearn'

@TobyRoseman I'm guessing this is caused by lack of virtualenv (I suspect we don't really check for its existence, we just rely on it and fail to error out early enough if it's missing). The fix might be to check for virtualenv earlier and error out with a useful message.

Nevermind, this is what you get if you don't have virtualenv:
6692b6d7aa2a /turicreate # ./configure
Installing python toolchain.
python version = python2.7.
/turicreate /turicreate
+ set -e
+ [[ -z '' ]]
+ VIRTUALENV=virtualenv
+ PIP=pip3
+ PYTHON_FULL_NAME=python2.7m
+ [[ python2.7 == \p\y\t\h\o\n\2\.\7 ]]
+ PIP=pip
+ PYTHON_FULL_NAME=python2.7
+ virtualenv /turicreate/deps/env
./scripts/install_python_toolchain.sh: line 19: virtualenv: command not found
6692b6d7aa2a /turicreate #

Oh, I think this is what happens if you don't have libpython2.7-dev.

Ok, I think the root cause of the issue here is that nothing is checking whether --python[2.7|3.5|3.6] supplied to ./configure (or lack thereof, which is 2.7) matches the actual Python version. I think we should be using the --python= option on virtualenv to make the environment's Python version match our ./configure script.

Looks like this will be fixed with the fix for #494.


Feature Request: Allow items to be selected multiple times

Bug description:
An item cannot be selected multiple times, and I can't find a configuration to enable this behaviour.
This has been discussed before, but I haven't been able to find a clear answer on whether or not this use case is supported.
I'm building an LED animation sequencer, and I want users to be able to specify colours for various effects (e.g. fill lights with a Blue-Red-Blue gradient).
Ideally I'd like to be able to select the same item multiple times, like this (mockup):

Link to minimally-working plunker that reproduces the issue:
https://plnkr.co/edit/cTOcau8kJhTECgAuPM7W?p=preview
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Angular: 1.5.8
UI-Select: 0.19.7
Bootstrap/Select2/Selectize CSS (if applicable): Bootstrap 3.3.7

I've had a crack at implementing this, just by changing the ui-select Plunkr:
https://plnkr.co/edit/7KyteAUvcV8Yfw22CDo1?p=preview
I'm happy to raise my changes as a PR if there's interest.

To be honest I don't think this quite fits with the direction of the component, sorry.
You might instead want to look at the typeahead components available in angular-strap or angular-ui/bootstrap as all you are really after here is the auto-suggestions part.
If there is significant interest we can look at reopening but for now I think this a rather niche requirement so I'm going close.

Thanks for your consideration @user378230. I've implemented this feature in my fork. The feature and unit tests can be seen at https://github.com/chrisparton1991/ui-select/commit/154d308a119dbe76d551c31639c3ada005c28966 in case anyone wants this in the future.
Have a great day!

I just thought, if you're using object you can just have a select callback that adds a new copy of item to the select list with one of properties different, this will register it as a different object and let the user select it again.

Thanks for the suggestion @user378230. I had considered this too but I was concerned about edge cases and maintainability (e.g. removing extra items when they are unselected, handling arbitrary amounts of duplicate selection, handling multiple ui-select instances using the same dataset etc).
The solution I implemented in my work is working great for me so far, so I'll stick with that. If I find some show stopping issue I'll look into the callback approach. Also the callback approach could be good for people who can't use a fork of the repo in their project for whatever reason.
Here's mine in action (I need to add more colours, but the concept is there):


added conversion support,

ignore referrals
content grouping
Attribution overriding

Dear David, how are you doing? Allow me to ask you a few things. But first: thank you for your script, it works really well to make AMP compatible with GA4.

First, I'm not sure if I should asking anything through this thread, but it seems to be the only one related to Conversions. Let me know if I should sharing my comments in any other branch/link/channel.
Well, I'm having some complications while trying to measure Conversions. Basically I need that some Events in GA4 could be marked as Conversions. But this is not happening at all.. I'm not sure if this is an issue with GA4 (a  bug) or if I should be adding anything to the script you have shared with the community. Can you please give point me to the right direction? In case you need any information, just let me know. Thank you!

You can check the Conversion section on the README, here it explains how to set conversions.

@thyngster thank you! It worked perfectly: check it out https://markuphero.com/share/l2fTr5fFaUuul3PJrYBP
Now I'm going to try to setup the other conversions.

Hello @nicolasfranz, I appreciate your engagement with the project. I wanted to clarify the purpose of the issues section on GitHub. Its primary objective is to address genuine bugs, suggest improvements, and facilitate technical discussions related to the project.
However, it's important to note that the issues section is not intended for seeking free support or requesting others to complete your work. We encourage you to utilize the resources available, such as documentation and community support , to troubleshoot and find solutions to your technical questions.
If you have encountered any specific technical issues, please provide detailed information, and I will be more than happy to assist you in the right direction.
Thank you for your understanding and cooperation in adhering to the intended usage of the GitHub issues section.

Fully understood, thanks a lot @thyngster for your orientation!


CMake 3.22 requirement prevents build on ROS 2 Humble recommended platforms

The packages generate_parameter_library and parameter_traits in this repository declare a requirement on CMake 3.22.
While this version is available on the required platforms (Ubuntu 22.04 and Windows 10) listed in REP-2000, it is not available for the recommended platforms. In particular RHEL 8 which we build binary packages for by default on the build farm.
If it's possible to relax this CMake version constraint to CMake 3.16 it would add support for Ubuntu Focal, Debian Bullseye, and RHEL 8. If not, I'll go ahead and block this package from building on RHEL 8.

Thank you for the issue! I'll work on verifying it works on older cmake. I think I should be able to work around having older cmake.

@nuclearsandwich here are PRs to rosdistro that release this and its one dependency with cmake minimum reduced to 3.16. It turns out I was using no features of newer cmake and it just works on older cmake:

https://github.com/ros/rosdistro/pull/34681
https://github.com/ros/rosdistro/pull/34682
https://github.com/ros/rosdistro/pull/34692
https://github.com/ros/rosdistro/pull/34693

Thank you for opening this issue. Hopefully these PRs fix the issue for RHEL 8.

Thanks very much for the swift response. I've merged the Rolling releases in order to try and resolve these packages for the pending sync.


Allow debug launch configurations to be added dynamically

Today, when a C# .NET Core project is opened, the C# extension does a fair amount of work to generate a launch.json file (if none exists already) that matches the current settings in the project. However, if the user changes the launch configurations in their project it gets out-of-sync with launch.json. For C#, the duplication of launch configurations between launch.json and the project files adds a lot of complexity for the user. It might be a better experience for C# developers if the extension were able to provide debug launch configurations to VS Code dynamically when a project is opened or modified.

Another possibility (which would help greatly with the PowerShell extension) would be to provide a way specify a command or function to be called in the language extension which could dynamically generate the parameters to send as part of launch.json.  My language server holds some connection details that are unique for each VS Code window with the PowerShell extension active (TCP port numbers, etc).  It'd be nice if the language server could provide that information to the debugger to be passed to the debug adapter without having to manipulate launch.json.
I was considering the option to update the launch.json directly for each session using the new configuration APIs but I'd feel a little bad having the user deal with edits to their checked-in launch.json file when they work in a repo shared with other develoeprs.

From the C# extension's perspective it would be easier to provide the launch configurations that we know about unless the launch.json already exists. If the launch.json is present, we would assume that the user is defining their own configurations and not provide any.
Our biggest concern in generating a launch.json is with user modifications. Today, we generate a launch.json for the user when we analyze their project for the first time. However, if the user changes their project, it's now up to them to keep the launch.json in sync. We could re-generate the launch.json, but we would want to detect whether the user has modified it first to avoid stomping on their changes.

As part of #9061 it is now possibly to modify the launch.json at any time through extension host code. Please try that out and let me know if something is missing for your scenarios - thanks!

@isidorn, if I understand the work correctly, this means that extensions now have an easier way to modify the launch.json file. This will definitely simplify some of the code we already have in the C# extension to generate that file. However, this particular issue was about being able to provide launch configurations programmatically (i.e. without modifying the file).
In our scenario, we already have all of the launch configuration information in the user's project files in a different format. Duplicating this information in a launch.json file and keeping it in sync when the user makes changes is a major headache. Unless I'm missing something, I don't think #9061 addresses our scenario.

@DustinCampbell thanks for claryfing -> reopening this

@DustinCampbell are you aware that it is possible to do this and does that help with your scenario? This way you are passing a custom launch configuration to be used instead of modifying the underlying launch.json
 let launchConfig = {
        "name": "Test",
        "type": "node",
        "request": "launch",
        "program": "${workspaceRoot}/test.js",
        "cwd": "${workspaceRoot}",
        "stopOnEntry": true
    };

    vscode.commands.executeCommand('vscode.startDebug', launchConfig).then(() => {
        vscode.window.showInformationMessage('OK!');
    }, err => {
        vscode.window.showInformationMessage('Error: ' + err.message);
    });

I'm aware of that, but as I understand it, there are limitations:

I don't think I can hook the existing F5 keyboard shortcut in an extension. That's really an assumption though and I'd be delighted to be wrong. :smile:
It doesn't provide the user with a way to pick a different configuration from the debug panel.

Your extension can get activated on event 'onDebug:type' where type is 'node', 'cpp'. This happens once the user hits F5
vscode.commands.executeCommand('vscode.startDebug', 'myConfigName') should pick a configuration from the debug panel and start debugging that configuration

'cpp'? Is that a typo? This is the C# extension I'm referring to.

You can put any type you want there, go, php, c# - whatever debug type your C# extension registers

@isidorn hmmm, so if an extension registers for onDebug:language, does that override the normal behavior for F5?  If so, what gets invoked inside of the extension's code to take its place?

FWIW, this strikes me as a weird hoop to make extension authors jump through. Also, it's not clear to me how activating the extension on the onDebug:type event helps. I would expect that the C# extension would already be activated.

@daviwil currently we only have limited support for this, an extension can be activiated onDebug:language. So it will not override the normal behavior of F5 but an extension can do additional things once it is activated. What you are looking for sounds to me like a new feature request.
@DustinCampbell yes, this does not seem to help with your use case. I am not sure when you activate your c# extension, probably on first open of a c# file

The is activated on a handful of events, but primarily onLanguage:csharp

This is supported now by the startDebug action
Example how the node debug is generating a configuration dynamically can be found here https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/extension.ts#L364

Yes, you said this before, but I'm still not sure how this solves our scenario. Our extension doesn't execute the startDebug command. The user is the one pressing F5. Perhaps I'm missing something, but it's not clear to me at what point we can introduce a custom launch configuration. Could you please clarify?

I am explaining it in this comment https://github.com/Microsoft/vscode-go/issues/745#issue-203043691
Please note that this is startSessionCommandnot startDebug I made a typo in the previous comment, this is a new feature which we support for the last couple of milestone

Thanks, I'll take a look.


Custom size mode

First cut of allowing custom size modes.

I am now utilizing this code in my local repo, if this could have a final review that would be appreciated.
May need to tweak a couple of things:

Passing fn + params into Size component (L1065)
Creating new array for resolving dependencies (L360)
Scope of custom mode fn (L370)

@alexanderGugel

@jd-carroll I am a bit torn on this.
While I think this is really cool and adds flexibility I wonder if custom size mode functionality should be part of the Node or if it should just be a component attached to a Node that manages the size.  I think the counter would be that Relative and Render size should then be be components as well.
Anyone else have thoughts on this?  Need to think on this for a bit.

@jd-carroll either way, thanks for introducing the idea!

After a lot of back and forth on this, I'm against this change. At least at this point in time. I agree with @michaelobriena that this should be a component. In fact, I would even argue that every size mode should be a component and pixel size should be the only core size mode.
After all, I don't think this is something we currently want/ need and it introduces unnecessary complexity.
@jd-carroll Thanks for the PR though, but I don't think this is something we currently want/ need.
@michaelobriena Can we close this?


API 0.6: Support the new buildpack.toml description, keywords and licenses fields

In order to support Buildpack API 0.6, we need to support this new buildpack.toml feature:

Adds new descriptor keys to buildpack.toml (https://github.com/buildpacks/spec/issues/181, https://github.com/buildpacks/spec/pull/208, RFC 0070).

Spec:
https://github.com/buildpacks/spec/blob/buildpack/0.6/buildpack.md#buildpacktoml-toml
It looks like all fields are optional, however the spec is ambiguous:
https://github.com/buildpacks/spec/pull/208#pullrequestreview-775068273
This will need implementing here:
https://github.com/Malax/libcnb.rs/blob/f46bdda85838c9cc21cd1de3243d4160b85afc12/src/data/buildpack.rs#L48-L58

From https://github.com/Malax/libcnb.rs/issues/95#issuecomment-925453064 it looks like if unrecognised fields are seen in buildpack.toml then they'll currently be ignored (which is fine) - I'm presuming this is due to:
https://serde.rs/container-attrs.html#deny_unknown_fields

Always error during deserialization when encountering unknown fields. When this attribute is not present, by default unknown fields are ignored for self-describing formats like JSON.

I wasn't entirely clear what self-describing meant - I found some references in the docs but wasn't 100% helpful:
https://github.com/serde-rs/serde-rs.github.io/search?q=self-describing
Though I found this in a code comment:
https://github.com/serde-rs/example-format/blob/e0735fa963a03fecf70b0994cbae67aa90f6772b/src/de.rs#L143
And the toml crate does have a deserialize_any():
https://github.com/alexcrichton/toml-rs/blob/83d787c60dbaaaf5b769f0948a5e8760ea5695cf/src/de.rs#L212
(plus logically I would presume TOML is self-describing given the docs references)


BREAKING CHANGE: rename xExchange to ExchangeDsc

Pull Request (PR) description
This will rename the module to be more standard to the rest of the DSC modules maintained by the community. We are also renaming all resources and which removes the resources such as xExchAddressList to ExchAddresslist.
This Pull Request (PR) fixes the following issues

Fixes #484

Task list

[x] Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
Entry should say what was changed and how that affects users (if applicable), and
reference the issue being resolved (if applicable).
[x] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in README.md, schema.mof and comment-based
help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as appropriate.
[ ] Examples appropriately added/updated.
[ ] Unit tests added/updated. See DSC Community Testing Guidelines.
[ ] Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
[ ] New/changed code adheres to DSC Community Style Guidelines.

This change is

I will review as soon as I have time, but it could take a while. But on todo list. 🙂

Just wondering how this change is progressing?

Yes, but I very busy so haven't had time to review. If someone have time to help look through this it would be great.

@mhincapie can you rebase this one?

@johlju all yours! let me know if anything else needs to be done.

I will deploy a new version of xExchange first that also deprecate it self. @raandree is about to make a PR soon too that I thought also need to go into the xExchange. Then we merge this PR.
I will look through this PR to see if I there is something we missed. 🙂

@mhincapie there were a bunch of resources named that had been wrongly renamed (looked some kind of regex search mishap), and a few files that hadn't been renamed. Instead of commented I just sent in https://github.com/dsccommunity/xExchange/pull/490/commits/e3fd512f3e372e0786156f7dbaa6ca41d3c3bcb8 to this PS. 🙂

Thank you! @johlju . Sorry about that. Is there anything else that i can help with?

@johlju was able to push this commit: https://github.com/dsccommunity/xExchange/pull/490/commits/7c7e3dad5e9b4a89e825b80a2c15e85a517e0c95. Can you please review it once more. We should be getting closer 😄

@mhincapie unless we missed something that we can't find this is looking good to be merged. 🙂  Holding off merging for a while so @raandree can get a PR merged.

Must do a few other steps too before merging this.

@mhincapie can you rebase this now after I merged in the last PR for xExchange? I will continue on with this PR as soon as it is rebased (during next week).

@johlju let me know if this looks good now. 😄

@mhincapie looking good to me, this is now merged. Let see if there are any issues reported related to this after I release 2.0 (later today).


PlacerOrder Symbol not found

Hi @saniales
I had been using the this library to check balances and tickers, but at the moment of creating a new order, it is returning
{"error":{"code":2001,"message":"Symbol not found"}}
I checked the symbol using the function GetSymbols and checking the api endpoint from hitbtc but not luck. Also I enabled the debug mode to check the HTTP request/response and copied the payload an executed with curl and with curl it is working properly.
here is the code am using
package main

import (
	"fmt"
	"github.com/saniales/go-hitbtc"
	"log"
	//"net/http"
	//"strconv"
	//	"time"
)

const (
	API_KEY    = "XXXXXXXXXXXXXXXXXXXXXXX"
	API_SECRET = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
)

func main() {
	HClient := hitbtc.New(API_KEY, API_SECRET)

	HClient.SetDebug(true)

	sellOrder := hitbtc.Order{
		Symbol:      "BTCUSD",
		Side:        "sell",
		Price:       4,
		Quantity:    1,
		Type:        "limit",
		TimeInForce: "IOC",
	}
	orderNumber, err := HClient.PlaceOrder(sellOrder)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(orderNumber.ClientOrderId)
}

Thanks in advance

Can you also write the output of the debug? This can help a lot

Also, please refer to main fork from @bitbandi not this one.

Hi @saniales ,
here is the output of the debug
2020/08/17 16:24:19 dumpReq ok:POST /api/2/order HTTP/1.1
Host: api.hitbtc.com
Accept: application/json
Authorization: Basic XXXXXXXXXXX

price=4.00000000&quantity=1.00000000&side=sell&symbol=BTCUSD&timeInForce=IOC&type=limit
2020/08/17 16:24:19 dumpResponse ok:HTTP/1.1 400 Bad Request
Content-Length: 52
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Date: Mon, 17 Aug 2020 14:24:19 GMT
Server: nginx

{"error":{"code":2001,"message":"Symbol not found"}}
2020/08/17 16:24:19 400 Bad Request
exit status 1

Shall I move this ticket to @bitbandi ?
thanks in advance

this is my go version, just in case
❯ go version
go version go1.14.6 linux/amd64

could you test the request with curl?
curl -v -o - -X POST -u "publicKey:secretKey" \
    "https://api.hitbtc.com/api/2/order" \
    -d 'price=4.00000000&quantity=1.00000000&side=sell&symbol=BTCUSD&timeInForce=IOC&type=limit'

maybe the parameter order is matter :/ (symbol, side, type, timeInForce, quantity, price)

Hi @bitbandi
I already did tested, I got the same feeling that the order may be an influence. But with curl in that order, is working. :/

could you paste a working request with curl debug output?

Hi @bitbandi
here is the output of curl in -v mode
❯ curl -vvv -X POST -u "XXXXX:XXXXX" \
    "https://api.hitbtc.com/api/2/order" \
    -d 'price=4.00000000&quantity=1.00000000&side=buy&symbol=BTCUSD&timeInForce=IOC&type=limit'
Note: Unnecessary use of -X or --request, POST is already inferred.
* Uses proxy env variable no_proxy == 'localhost,<IP_ADDRESS>/8,::1'
*   Trying <IP_ADDRESS>:443...
* Connected to api.hitbtc.com (<IP_ADDRESS>) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=*.hitbtc.com
*  start date: May 12 00:00:00 2020 GMT
*  expire date: May 17 23:59:59 2021 GMT
*  subjectAltName: host "api.hitbtc.com" matched cert's "*.hitbtc.com"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
* Server auth using Basic with user 'XXXXXX'
> POST /api/2/order HTTP/1.1
> Host: api.hitbtc.com
> Authorization: Basic NWNydUprQWUtUWcydktPOXlhbm1PSXlFRE1MVmZzelM6UnZJTW92TC1XUEdtVlZWN0ptenJNdE5VY2dadnNyNHA=
> User-Agent: curl/7.69.1
> Accept: */*
> Content-Length: 86
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 86 out of 86 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Mon, 17 Aug 2020 19:49:30 GMT
< Content-Type: application/json; charset=UTF-8
< Content-Length: 304
< Connection: keep-alive
< Request-ID: 1435214c2918b36131769aba4397dbbe
< Referrer-Policy: strict-origin-when-cross-origin
<
* Connection #0 to host api.hitbtc.com left intact

I see the content type is different, but I tried before changing to that content type and also the problem was the same.
Let me know if I should run curl with different options.
all the best

Hi @bitbandi
I’m that the request that @alebeta90 is doing is by REST API. There’s a way to do it by websocket?
Thanks for the collaboration mate!

@bitbandi @saniales any help? Please.

@mofer please open another issue on @bitbandi repository.
This is just a fork and @bitbandi will be more comfortable in answering problems from his repo
Cheers

It look like, you have to set the content type. Modify the code something like this:
        req, err := http.NewRequest(method, rawurl, strings.NewReader(formData))
        if err != nil {
                return
        }

        req.Header.Add("Accept", "application/json")
        if method != "GET" {
                req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        }


0.9.1

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

test
asdf


Using 'home' as vite base breaks vitest on linux filesystems

Describe the bug
If you configure vite with
base: 'home',
test: {
  //
},

...

and run "vitest" on any linux file systems, you get the following error:
Error: Failed to load url /projects/vitest-dev-vitest-98qlmqvh/node_modules/vitest/dist/spy.js (resolved id: /projects/vitest-dev-vitest-98qlmqvh/node_modules/vitest/dist/spy.js). Does the file exist?
 ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:51969:17
 ❯ ViteNodeServer._transformRequest node_modules/vite-node/dist/server.mjs:561:16
 ❯ ViteNodeServer._fetchModule node_modules/vite-node/dist/server.mjs:523:17
 ❯ Proxy.fetch node_modules/vitest/dist/chunks/resolveConfig.RxKrDli4.js:6647:22
 ❯ EventEmitter.onMessage node_modules/vitest/dist/chunks/index.68735LiX.js:104:20

This bug is not reproducible on macOS or Windows and occurs on both npm and pnpm. Configuring the base as '/home/' or '/home' has the same effect.
Reproduction (StackBlitz uses Linux)
https://stackblitz.com/edit/vitest-dev-vitest-98qlmqvh?file=vite.config.ts

It was reported on Vite https://github.com/vitejs/vite/issues/18279 but I couldn't find a reproduction with only Vite, so probably having the issue here makes sense.


windows build is failing on appveyor

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\twisted\trial\runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "c:\python27\lib\site-packages\twisted\python\modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "c:\python27\lib\site-packages\twisted\python\reflect.py", line 300, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "c:\python27\lib\site-packages\twisted\python\reflect.py", line 247, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "C:\projects\lbry\lbrynet\tests\unit\lbrynet_daemon\test_ExchangeRateManager.py", line 7, in <module>
    from lbrynet.tests.mocks import ExchangeRateManager as DummyExchangeRateManager
  File "C:\projects\lbry\lbrynet\tests\mocks.py", line 6, in <module>
    from lbrynet.core import PTCWallet
  File "C:\projects\lbry\lbrynet\core\PTCWallet.py", line 8, in <module>
    from lbrynet.core.client.ClientRequest import ClientRequest
  File "C:\projects\lbry\lbrynet\core\client\ClientRequest.py", line 1, in <module>
    from lbrynet.blob.blob_file import MAX_BLOB_SIZE
  File "C:\projects\lbry\lbrynet\blob\__init__.py", line 1, in <module>
    from blob_file import BlobFile
  File "C:\projects\lbry\lbrynet\blob\blob_file.py", line 4, in <module>
    from twisted.web.client import FileBodyProducer
  File "c:\python27\lib\site-packages\twisted\web\client.py", line 42, in <module>
    from twisted.internet.endpoints import TCP4ClientEndpoint, SSL4ClientEndpoint
  File "c:\python27\lib\site-packages\twisted\internet\endpoints.py", line 36, in <module>
    from twisted.internet.stdio import StandardIO, PipeAddress
  File "c:\python27\lib\site-packages\twisted\internet\stdio.py", line 30, in <module>
    from twisted.internet import _win32stdio
  File "c:\python27\lib\site-packages\twisted\internet\_win32stdio.py", line 9, in <module>
    import win32api
exceptions.ImportError: DLL load failed: The specified module could not be found.```

This error isn't happening any more, but the build is still failing (appveyor raised our limit from 1gb to 10): https://ci.appveyor.com/project/LBRY/lbry/build/1.0.3339#L1418

The error was happening due to policy changes from AppVeyor aimed to prevent abuses. Fortunately, the error isn't happening anymore.


Disable dismiss?

Hey, is there a way to disable dismissing the bottom sheet? E.g. it should not be swipeable and clicking on scrim would not close it too. I couldn't find it in documentation and looking at the code.
EDIT: actually empty onDismiss would work, but is there a way to disable swiping?
Thanks.
EDIT2: I just added a sheetLayoutModifier = Modifier.pointerInteropFilter { true } and it seems to do the trick.

@GytisBarakauskas I adopted the API from the official ModalBottomSheetLayout, so swiping gestures and scrim clicks are disabled with this parameters:
sheetPropertiesSpec = {
    BottomSheetProperties(confirmValueChange = { it != BottomSheetValue.Hidden })
},

Basically it doesn't allow to transition to Hidden state. Note, however, that the bottom sheet still will react to swipes, it will just always return to Expanded/HalfExpanded state as it has been before. A bit weird to my taste, but that is how ModalBottomSheetLayout works, so I decided not to mess with people's expectations.
I definitely might have missed this in documentation, as I assumed for some reason people might be familiar with the official API. My bad.

I never really bothered to play around with official navigation, since it has quite a bad reputation.
Thank you for so fast answer! I guess for my use case this will do nicely.

@GytisBarakauskas

I never really bothered to play around with official navigation, since it has quite a bad reputation.

Me too, haha. But I really meant ModalBottomSheetLayout from just the Compose Material package.
Also, note that you can provide different properties for each bottom sheet, in case only some of them should be non-dismissable.


Integrate master branch from crab

Crab master branch changes the CFG language so the class CfgBuilder needs to be updated accordingly.

This issue was moved to seahorn/crab-llvm#5


Docs: Remove Deprecated network-plugin Kubelet Flag

From the docs:

CNI - Container Network Interface is the plugin layer used by Kubernetes to delegate networking configuration. CNI must be enabled in your Kubernetes cluster in order to install Cilium. This is done by passing --network-plugin=cni to kubelet on all nodes.

The --network-plugin flag was removed in k8s v1.24 and should be removed or updated accordinly in the docs.

/assign


feat(ui-watt): drawer content switch

Description
This PR adds support for closing the drawer by "clicking outside", while still preventing it from closing if the click action triggers a call to drawer.open() (this behavior is identical to the drawer found in zenhub for instance).
I also added a built-in loading state to the drawer for ease-of-use along with a story showing how to structure your code if you wish to reuse the same drawer component.

praise: the implementation works like a charm 👍
suggestion: can we add a test that verifies the behaviour implemented in this PR?

praise: the implementation works like a charm 👍
suggestion: can we add a test that verifies the behaviour implemented in this PR?

@dzhavat I gave it a shot, but I couldn't really get it to work - seems pretty tricky to test this "click outside" behavior without tightly coupling the test to the implementation. If you have any ideas I'm all ears 🙂

@dzhavat I gave it a shot, but I couldn't really get it to work - seems pretty tricky to test this "click outside" behavior without tightly coupling the test to the implementation. If you have any ideas I'm all ears 🙂

Hmmm ... the "closes drawer when another drawer is opened" test already does something in that direction. I don't know how a new test will be much different (from a user's perspective).
But maybe a test based on the Loading story where closedOutput is asserted for not being called when button 1 and 2 are clicked, and another assertion for the content of the drawer.
And a separate test for the loading input - that an element with class watt-drawer__spinner is present.
What do you think about such tests?


Multiple TournamentTeams with same identical members are possible

They should not be...

I'll try myself out on this one. But I don't promise anything from my lacking amount of python skills >_>

Go ahead :D
And feel free to message me, if need help with anything :)


Suggest using strict boxed vectors to avoid accumulation of thunks

Closes #23.

Thank you! We will consider lazy helpers anyway.


Repeating problem

Just installed this to try it out...well
Seems it goes to some kind of loop or repeating mode.
Tried to use it with server and client and run local. Both results are the same:
/speech-to-speech/.venv/lib/python3.11/site-packages/transformers/generation/configuration_utils.py:567: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.0` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`.
  warnings.warn(
ASSISTANT: I'm sorry for the confusion, but as an AI, I don't have the ability to see or interact with the world in the same way humans do.
ASSISTANT: I'm here to provide information and assistance within the scope of our conversation.
ASSISTANT: Again, I apologize for any confusion.
ASSISTANT: I'm here to provide information and assistance within the scope of our conversation.
ASSISTANT: I'm here to provide information and assistance within the scope of our conversation.
ASSISTANT: I'm here to provide information and assistance within the scope of our conversation.
ASSISTANT: I'm here to provide information and assistance within the scope of our

this is how I start it...maybe I have missed something?
python s2s_pipeline.py --lm_model_name cognitivecomputations/dolphin-2.9.4-gemma2-2b --tts_compile_mode default --recv_host <IP_ADDRESS> --send_host <IP_ADDRESS> --language en
Tried also if it's parler problem, seems to be also on melo.
Another test with debug log on:

USER:  in there
2024-10-20 22:07:56,849 - STT.whisper_stt_handler - DEBUG - Language Code Whisper: en
2024-10-20 22:07:56,849 - baseHandler - DEBUG - WhisperSTTHandler:  0.085 s
2024-10-20 22:07:56,849 - LLM.language_model - DEBUG - infering language model...
/speech-to-speech/.venv/lib/python3.11/site-packages/transformers/generation/configuration_utils.py:567: UserWarning: do_sample is set to False. However, temperature is set to 0.0 -- this flag is only used in sample-based generation modes. You should set do_sample=True or unset temperature.
warnings.warn(
2024-10-20 22:07:57,032 - baseHandler - DEBUG - LanguageModelHandler:  0.183 s
ASSISTANT: Sure, I can help with that.
2024-10-20 22:07:57,033 - TTS.parler_handler - DEBUG - padding to 16
2024-10-20 22:07:57,442 - baseHandler - DEBUG - LanguageModelHandler:  0.410 s
2024-10-20 22:07:57,813 - baseHandler - DEBUG - LanguageModelHandler:  0.371 s
2024-10-20 22:07:57,930 - baseHandler - DEBUG - ParlerTTSHandler:  0.898 s
2024-10-20 22:07:58,234 - baseHandler - DEBUG - ParlerTTSHandler:  0.303 s
ASSISTANT: What do you need assistance with?
2024-10-20 22:07:58,234 - TTS.parler_handler - DEBUG - padding to 8
2024-10-20 22:07:58,258 - baseHandler - DEBUG - LanguageModelHandler:  0.445 s
2024-10-20 22:07:58,499 - baseHandler - DEBUG - LanguageModelHandler:  0.241 s
2024-10-20 22:07:58,916 - baseHandler - DEBUG - LanguageModelHandler:  0.417 s
2024-10-20 22:07:58,928 - baseHandler - DEBUG - ParlerTTSHandler:  0.694 s
2024-10-20 22:07:59,218 - baseHandler - DEBUG - LanguageModelHandler:  0.302 s
2024-10-20 22:07:59,322 - baseHandler - DEBUG - ParlerTTSHandler:  0.394 s
ASSISTANT: I'm here to help with that.
2024-10-20 22:07:59,323 - TTS.parler_handler - DEBUG - padding to 16
2024-10-20 22:07:59,607 - baseHandler - DEBUG - LanguageModelHandler:  0.389 s
2024-10-20 22:07:59,900 - baseHandler - DEBUG - LanguageModelHandler:  0.293 s
2024-10-20 22:08:00,022 - baseHandler - DEBUG - ParlerTTSHandler:  0.700 s
2024-10-20 22:08:00,243 - baseHandler - DEBUG - ParlerTTSHandler:  0.220 s
ASSISTANT: What do you need assistance with?

That's weird, and it seems like it happened repeatedly. What system are you running this on?

I just did install it on a ubuntu system, with intel 12th gen cpu with 64gb ram and rtx3080(10GB)


(feat): markdown linter

All of my workflows: https://github.com/szepeviktor/byte-level-care/tree/master/.github/workflows

All of my workflows: https://github.com/szepeviktor/byte-level-care/tree/master/.github/workflows

I’ll take a look at these. Thanks for sharing!

I recommend you to leave the licence file alone: LICENSE.md -> LICENSE

I recommend you to leave the licence file alone: LICENSE.md -> LICENSE

Hi @szepeviktor, can you explain your recommendation?

the Markdown linter will not check it
everyone names that file without an extension
GitHub create LICENSE with "Propose" button https://github.com/yardinternet/skeleton-package/community

the Markdown linter will not check it
everyone names that file without an extension: 5.3M vs. 225k
GitHub create LICENSE with "Propose" button https://github.com/yardinternet/skeleton-package/community


Show ESMValTool and ESMValCore documentation on a single readthedocs site

This needs https://github.com/ESMValGroup/ESMValCore/pull/89 from the core part of the ESMValTool to work.
See this PR at esmvaltool-core for details.
Note that #1148 needs to be merged first. -> Done
Closes #1155

Can you please merge the version2_development branch into this, so we can see what is changed and the merge conflicts get resolved?

I have added the gensidebar script to this branch for testing purposes, it should preferably be removed before merging.

@axel-lauer @schlunma
Could you maybe review the documentation for this pull request? Please review the structure and not the actual content.
The documentation built from this branch (and pull request) can be found here:
https://esmvaltool.readthedocs.io/en/docu_join/index.html

I just took a look at the new structure. Here a few thoughts.

In my opinion, the main structure (on the first page) is a bit oversimplified now yet containing terms that only make sense if you already know the tool (e.g. core, recipes).
I would therefore rather prefer an approach similar to what we had in v1.1 with the first two levels visible on the first page, e.g.:

Preface
Known issues
User's guide

Introduction
Installation
Configuration
Running the ESMValTool
The ESMValTool preprocessor (core)
Scientific diagnostics (recipes)
[...]

Developer's guide

Writing a diagnostic script or a metrics set
Scientific documentation
Term of use
[...]

Appendices

[...]

I still like the idea of clearly distinguishing between the user's guide and the developer's guide to make the documentation easier to browse for users who are only interested in applying the tool (in contrast to developers wanting contributing to the code).
I my personal opinion, a gallery should not be part of a user's / developer's guide. This would be rather something for a revised website (see also #997).

Hi Axel, thank you for the feedback.

I would therefore rather prefer an approach similar to what we had in v1.1 with the first two levels visible on the first page

Unfortunately this does not work well when the documentation is spread out over two projects. You end up seeing only the subsections that are part of the project that you clicked on most recently, giving a rather confusing user experience. I could spend some more time on fixing this, but I think it would probably be better to just create easier to understand main headings, because you loose this overview immediately once you start reading the documentation. Note that the subsections are still visible in the navigation sidebar on the left (which actually looks way too long for the recipes).

I still like the idea of clearly distinguishing between the user's guide and the developer's guide to make the documentation easier to browse for users who are only interested in applying the tool (in contrast to developers wanting contributing to the code).

I agree, I think this is very important. The first five sections (Preface, Gallery, Getting started, Recipes, Core) are meant for esmvaltool users and the last three are mostly for developers, though the Core API can also be used by users of the core library. Do you have a suggestion for how to communicate this more clearly? I think we should probably rename Core to something more clear and maybe add titles between the two groups?

One minor thing that if not straight forward should better go in a separate issue later:
The pdf generated by RTD for the docu_join branch does not show the core part, see
https://buildmedia.readthedocs.org/media/pdf/esmvaltool/docu_join/esmvaltool.pdf
I checked this because for one project the documentation was desired in this format to be handed in as a deliverable.
However, the search is working fine for all projects (core and tool)!

I  my personal opinion, a gallery should not be part of a user's /  developer's guide. This would be rather something for a revised website  (see also #997).

@axel-lauer Instead of arguing whether this should be on one or the other website, we should maybe consider having just a single website, as also suggested in the presentation on user feedback that @ledm gave at the workshop.

One minor thing that if not straight forward should better go in a separate issue later:
The pdf generated by RTD for the docu_join branch does not show the core part, see
https://buildmedia.readthedocs.org/media/pdf/esmvaltool/docu_join/esmvaltool.pdf
I checked this because for one project the documentation was desired in this format to be handed in as a deliverable.

You can still download the two separate PDF files though or I guess you could build the PDF locally, but I agree that it's not very good.

@bouweandela I do not consider readthedocs as a website or a substitute for one. In my opinion this is nothing but a user's guide that is available in different formats, i.e. html and pdf.

agreed with Axel on the point of having a website that links to the documentation in the most hassle-free way. Especially now that the website (the new draft one) is so nice

Thank you all for the comments!
@axel-lauer

In my opinion, the main structure (on the first page) is a bit oversimplified now yet containing terms that only make sense if you already know the tool (e.g. core, recipes).

I think that having a good landing page is essential for a good user experience. Maybe a welcoming text explaining the structure of ESMValTool / Core in combination with some changes in section titles will be enough. This seems to be in the scope of this pull request. Do you have suggestions?

I would therefore rather prefer an approach similar to what we had in v1.1 with the first two levels visible on the first page.
I still like the idea of clearly distinguishing between the user's guide and the developer's guide to make the documentation easier to browse for users who are only interested in applying the tool (in contrast to developers wanting contributing to the code).

I like the idea but let's not discuss and change this in this pull request. If we want to completely change the structure, that should be a separate issue (looks like there is one over here: #1207). We now just want to make this a merged and workable version based on v2.

I my personal opinion, a gallery should not be part of a user's / developer's guide. This would be rather something for a revised website (see also #997).

also @bouweandela @axel-lauer @valeriupredoi
I think the discussion whether or not to have the gallery in the docs and how many websites/documentations we need, is a really interesting discussion but it can continue after the merge. For example in #997 or a different pull request if need be.
@bouweandela @mattiarighi @axel-lauer @schlunma
Can we maybe come up with things that we all agree on, that need to be done before we can merge this pull request and than actually do the merge? Also can you all review #89 in the same way, trying to avoid long off topic discussions?

One minor thing that if not straight forward should better go in a separate issue later:
The pdf generated by RTD for the docu_join branch does not show the core part, see
https://buildmedia.readthedocs.org/media/pdf/esmvaltool/docu_join/esmvaltool.pdf
I checked this because for one project the documentation was desired in this format to be handed in as a deliverable.

@bjoernbroetz You can still download the two separate PDF files though or I guess you could build the PDF locally, but I agree that it's not very good.

@bouweandela There is an option to switch off the pdf generation for RTD. So we might just turn it off and build it locally if we really need a pdf.

I propose we collect the remaining points in a separate issue and approve this two PRs. The tech implemented that does the magic to make the two separate repositories appear as on thing on RTD is not in doubt I would say. The alternative discussed in #1155 using git submodules with a separate github repository was lacking support. I cannot approve because I started this PRs but I would If I could :smile:

:beer:


[BUG] On M2 mac dooit is taking 15% of CPU

Describe the bug 🐛
Just by having dooit running on my terminal it takes more CPU than any other app I have open.
To Reproduce 🐣
Steps to reproduce the behavior:

Using the Warp.app terminal
Start dooit and add tasks with expiry dates etc.
Check CPU usage

Expected behavior  🤔
To have zero CPU usage when I'm not using it.
Screenshots 🧐
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):  🤖

OS: [e.g. Mac OS
Version 2.2.0

Additional context 📝
Add any other context about the problem here.

Hmm.. weird
can you run other apps of textual?
Example:
textual colors

python -m textual

Sure, how do I install textual?

I ran python -m textual and the sample app took negligible CPU.

Closing this in favor of https://github.com/dooit-org/dooit/issues/183, Can you install the latest version and lemme know again? Thanks!


Add end to end test

Create a pipeline for integration testing bucc
work was already started here: https://github.com/starkandwayne/bucc/blob/develop/test/pipeline.yml

fixed in https://github.com/starkandwayne/bucc/pull/39

Fixed in https://github.com/starkandwayne/bucc/releases/tag/v0.1.4


Fixed window update latency issue.

As originally fixed in 6fcbfa2, then reverted in b6e4cc3, this should not be fixed until UIFlexItems are released from beta by Roblox, because this change breaks the interoperability between Beta and Non-Beta versions of roblox which exist currently.

I've also changed the window title to use UIFlexItems, so I'll link it here for when it's out of beta. #title-flex

Seeing as Flex has been released to clients, I think we can start using them regularly. I'll push everything through with this then.


Required files for running on browser

Hi
I am a member of CDNJS and in charge of adding this library to our CDN.
Could you please tell me which files do we need to let the library run on browser well?
Is url-search-params.js enough?
Thanks! :smile:

The min version is the one with less chars:
https://github.com/WebReflection/url-search-params/blob/master/build/url-search-params.js
The max version is the explicit one:
https://github.com/WebReflection/url-search-params/blob/master/build/url-search-params.max.js

P.S. amd version and commonjs version there too:
https://github.com/WebReflection/url-search-params/tree/master/build
TL;DR the build folder is what you are "linking" for

@WebReflection Thanks again!


Switch extension numbers to registered value

Fixes #220

@rmichela could you revert this? see #240

Can you help me understand why this is causing the problem you are seeing?


Problem with Infowindow

Hello,
I try to link infowindow with a marker and display it but i failed to define it's position and to display it on mouseover.
        ....
        $infoWindow = $this->addInfoWindow($activite, $page, new Coordinate($lat, $lng));
        $marker->setInfoWindow($infoWindow);

        $mouseouthandle = 'function(){'.$infoWindow->getVariable().'.close()}';
        $mouseoutevent = new Event($marker->getVariable(), MouseEvent::MOUSEOUT , $mouseouthandle);

        $this->map->getEventManager()->addDomEvent($mouseoutevent);

        $clickhandle = 'function(){url = Routing.generate("show_activite", { id_activite:' . $activite->getId() . '});'
                . 'window.location.href=url;}';

        $clickevent = new Event($marker->getVariable(), 'click', $clickhandle);

        $this->map->getEventManager()->addDomEvent($clickevent);
        return $marker;
    }

    private function addInfoWindow($element, $page, $coordinate)
    {

        $content = $this->setInfoWindowContent($element, $page);
        $infoWindow = new InfoWindow($content, InfoWindowType::DEFAULT_, $coordinate);
        $infoWindow->setPixelOffset(new Size(1.1, 2.1));
        $infoWindow->setOpen(false);
        $infoWindow->setAutoOpen(true);
        $infoWindow->setOpenEvent(MouseEvent::MOUSEOVER);
        $infoWindow->setAutoClose(true);
        $infoWindow->setOptions(array(
            'disableAutoPan' => true,
            'zIndex' => 10,
            'borderRadius' => 10,
        ));

        return $infoWindow;
    }

if i change setOpen to true, i can display it and mouseout event works, but no position.
I also tried to display it on event without success :
        $mouseoverhandle = 'function(){'.$infoWindow->getVariable().'.open()}';
        $mouseoverevent = new Event($marker->getVariable(), MouseEvent::MOUSEOVER, $mouseoverhandle);

        $this->map->getEventManager()->addDomEvent($mouseoverevent);

I use symfony 2.8.12 , egeloen/google-map dev-master 5d87649 and egeloen/google-map-bundle dev-master b664856
Any idea ?
Thanks for your support,
Olivier

After reading your code, I think you misunderstood the way to position an info window. When you want to put an info window on a map you have two possibilities:

Put the info window on the map directly with a position on the info window.
Put the info window on a marker with a position on the marker.

So, here, you should place your marker on a specific position and link your info window to it. Additionally, enable auto open/close as well as custom mouse event (hover).

ping @olivier-rey :)

Hello Eric,
Thanks for your feedback, and sorry for the late reply :)
I agree on your comment on my code, I tried many things, and let by mistake the coordinate as argument to create a new infowindow.
Whatever even without this, the functions setAutoOpen, setAutoClose, and setOpenEvent doesn't seems to work...
Eventually i did it manually with
        $mouseoverhandle = 'function(){'
                .$infoWindow->getVariable().'.open('.$this->map->getVariable().','.$marker->getVariable().');'
                . '}';
        $mouseoverevent = new Event($marker->getVariable(), MouseEvent::MOUSEOVER, $mouseoverhandle);
        $this->map->getEventManager()->addDomEvent($mouseoverevent);

Thanks,

@olivier-rey Are you using the bundle? If yes, you should have probably hit https://github.com/egeloen/IvoryGoogleMapBundle/pull/184 which have been fixed.

@egeloen Yes, problem solved, thanks for all :)

:+1: Thanks for the feedback! :)


why i can't train my model?

when i try to train my model, i get this error. what should i do?

You can find my answer for a similar question here


Update the CLI tools to support switching of labels with a flag (for SREs spinning up new clusters).

From #44, manifests will generate with status: not-ready by default, but there should be an option in the CLI to generate them with status: production for new cluster set-up.
From: Quick Rollbacks

Unless you're deploying a new cluster, you can't do a manual deployment.


CB-8623 Removed obsolete jasmineReporter patching code

https://issues.apache.org/jira/browse/CB-8623

LGTM


Test on more versions of HHVM

I've forwarded ported this temporarily to check the tests work on the newest code too, and everything looks good. See https://travis-ci.org/bugsnag/bugsnag-php/builds/149428493.


Added contextual logistic bandit environment.

Added code for the contextual logistic bandit environment.
Will add tests and such after I make sure this all works with the colab environment.

Please add some basic tests.


Separate matches from rounds

About upgrading:
In overlay logic, activeRound.round should be changed to activeRound.match: Link
roundStore no longer stores match data, use matchStore instead: Diff


Incorrect treatment of disabled value when creating/updating a user

1. Which version of kreait/firebase-php are you using?
4.6.0
2. Which version of PHP are you using?
7.2.4
3. What's the issue?
When creating or updating a user (createUser || updateUser) if I add the 'disabled' parameter (whatever value) it disables the user. Once disabled there's no way to activate it (tried no parameter, parameter to false, to 0..)
4. Code that lead to the issue
require_once('vendor/autoload.php');

use Kreait\Firebase\Factory;
use Kreait\Firebase\ServiceAccount;

$ServiceAccount = ServiceAccount::fromJson(
    '{
        "type": "---",
        "project_id": "---",
        "private_key_id": "---",
        "private_key": "---",
        "client_email": "---",
        "client_id": "---",
        "auth_uri": "---",
        "token_uri": "---",
        "auth_provider_x509_cert_url": "---",
        "client_x509_cert_url": "---"
    }'
);
$Firebase = (new Factory)
    ->withServiceAccount($ServiceAccount)
    ->create();
$Auth = $Firebase->getAuth();

$userProperties = [
    'displayName' => 'Name',
    'disabled' => true,
    'customAttributes' => array(
        '1' => 1.1,
        '2' => 2.1
    )
];
$User = $Auth->createUser($userProperties);

$userProperties = [
    'displayName' => 'Name2',
    'disabled' => false,
    'customAttributes' => array(
        '1' => 1.2,
        '2' => 2.2
    )
];
$Auth->updateUser($User->uid, $userProperties);

// Result = Disabled user

Hey @udAL, and thank you for finding and reporting this issue!
I just released a new release (4.7.1) that includes a fix and a test to ensure that it stays that way (https://github.com/kreait/firebase-php/commit/e7d073057c4318825392d696412058dcae8c6146#diff-b16b10233efe1e9e75b6b378959416b7).

Man, that was fast...
Thanks!


Allow Auth url to be configured at runtime

I thought more about this. I don't think it's a good idea to implement this in the near future for a few reasons:

Mostly, it creates product confusion. We don't support self-hosted portals. Hiding this behind an easter egg doesn't solve the problem -- we're open source. I also think we need to make the gateway, relay, and headless clients portal urls' build-time configurable.
It creates complexity/uncertainty around which portal environment a particular app build is supposed to work against.
We can rebuild app bundles and binaries at any time. Client devs are already testing local builds against staging (and soon prod).
It adds complexity to our pentests, app store reviewals, and AppLink verification on Android

Instead, I feel that the This makes it straightforward to write tests for too: staging app builds are tested against staging in PRs. Production app builds are tested against prod on main.


Ecto.Changeset  - Support array based validators

Validating arrays to check if each item is included in a set, or that an array is non-empty would be very useful. This may be specific to postgresql at the moment, but still super useful. Maybe related #623
Apologies if the code isn't idiomatic, been watching elixir for a long time and just jumping in :)
  defp validate_inclusion_each(changeset, field, data, opts \\ []) do
    validate_change changeset, field, {:inclusion_each, data}, fn _, values ->
      Enum.flat_map values, fn(x) ->
        if x in data, do: [], else: [{field, "'#{x}' is invalid"}]
      end
    end
  end

  defp validate_present(changeset, field, opts \\ []) do
    validate_change changeset, field, fn _, values ->
      case List.first(values) do
        nil -> [{field, "is empty"}]
        _ -> []
      end
    end
  end

Can you give examples? I understand why you may want to check if an array
is empty but I can't see why you would check if the array contain all the
given entries. Wouldn't you rather check if it has any of the entries?
--
José Valim
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

Checking for any of the entries would also be useful. However:
Rather than array containing all the given entries; I would like to enforce that the entries given are a subset of those allowed. Basically, white-listing which values are acceptable to be in the array.
In the below example, I would not like "humans" to be an acceptable farm animal.
@supported_animals [:cat, :dog, :parrot, :sheep]
....
 |> validate_inclusion_each(:farm_animals, @supported_animal_strings)

Create POST Request
{
  "animal_farm" : {
     "farm_animals": ["cat", "dog", "human"]
  }
}

Ah, so you want to validate it is a subset of the given list. I don't like validate_inclusion_each but validate_subset is not super clear. Thoughts? :)

Perhaps validate_array_subset or validate_array_subsumed? I'm happy with
the set notation as I feel it describes exactly what's happening, and if
one's not familiar, docs could easily explain.
Other options may be validate_array_inclusion, or validate_inclusion_all,
or validate_array_whitelist.
Final thought, perhaps have the existing validate_inclusion cover this case
as it is the scenario where n=1, with a validate_inclusion_any function for
other behaviour?
On Jun 22, 2015 12:27, "José Valim"<EMAIL_ADDRESS>wrote:

Ah, so you want to validate it is a subset of the given list. I don't like
validate_inclusion_each but validate_subset is not super clear. Thoughts?
:)
—
Reply to this email directly or view it on GitHub
https://github.com/elixir-lang/ecto/issues/674#issuecomment-114228612.

@zmoshansky we could use validate inclusion. If the value in the model is a list, we could traverse the list checking all entries belong to the list supplied to the validator.
It has the downside that someone wouldn't be able to write:
validate_inclusion(:list, [["a", "b"], ["b", "c"]])

But I can't imagine any scenario someone would like to write that... @ericmj thoughts?

@josevalim While I can imagine there may we cases like that, I would expect them to be an exception rather than the norm. Regardless, I personally wouldn't expect a framework to handle them by default, and one can always write a custom validator.
At first, I thought we may wish to handle that scenario via validate_inclusion(:list, List.flatten(value), data).But, on second thought, I believe it may lead to unwelcome surprises.
For example, the user may wish to submit a nested list where the structure is important, and flattening the list could be unexpected.
I would expect the following example to fail validation.
@whitelist [["a", "b"], ["b", "c"]]
validate_inclusion(:list, [["a", "b"], ["b", "c"], ["a", "c"]], @whitelist)

While this one would pass.
@whitelist [["a", "b"], ["b", "c"]]
validate_inclusion(:list, [["a", "b"], ["b", "c"]], @whitelist)

Ok, so there we have it, we can either be validate_subset or validate_inclusion. The subset one is more explicit about everything, that is probably preferred. :) If you want to send a PR, it would be welcome!

@josevalim how to check if an Postgresql array contains strings of a specific format, e.g. ipv4 MAC addresses ~r/([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}/
  schema "computers" do
     ...
    field :macs, {:array, :string}
  end

You can write your own validations that use changeset functions to read the
field value from the changeset and then call add_error when something is
wrong.
On Wednesday, July 27, 2016, Tilo<EMAIL_ADDRESS>wrote:

@josevalim https://github.com/josevalim how to check if an Postgresql
array contains strings of a specific format, e.g. ipv4 MAC addresses
~r/([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}/
schema "computers" do
...
field :macs, {:array, :string}
end
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/elixir-ecto/ecto/issues/674#issuecomment-235506070,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAlbkdL9atFrNlKVqAEvQpHVtGrlbH9ks5qZwZDgaJpZM4FJJrG
.

--
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D


feat(document-search): allow to create DocumentSearch instances from config

Feature description
The goal of this feature is to create a way to create new instances of DocumentSearch class given a configuration that may be strored as .json / .yaml.
Configuration ideally would be split to 2 parts:

ingestion config - any change in that would require to re-run ingestion process and create new artifacts (vector store) before running evaluation
retrieval config - that may change at any time without requirement of re-running any ingestion

Motivation
Often a developer using DocumentSearch module will need to try multiple configurations, run sweep evaluation to figure out best values for a specific set of documents.
Additional context
Extra context for understaning how different DocumentSearch configurations may be runned:
https://hydra.cc/docs/tutorials/basic/running_your_app/multi-run/

It was closed by #62


Nested Sort-ables

I'm after some help, is it possible to have a nested sort-able drag and drop?
I have one list of groups, which is sort-able, each group contains a list of fields which is sort-able. You shouldn't be able to move a group into a field list, or a field into the group list.

{{ group.name }}

                    {{ field.name }} - {{ field.type }}

I tried to use drop zones with the sort-able tags but I get errors "Can't bind to 'dropZones' since it isn't a known property of 'div'."
Is it possible to get such a setup working?
Please tell us about your environment:

Angular version: 2.0.0-rc.5
Browser: Chrome Version 52.0.2743.116 m (64-bit)

Did you find how to solve it?

I haven't, sorry :(

Any news on this?

#20 - would like this too

Check this example out.
In this example (#13) if you observe carefully, You have to set [dragEnable] as false whenever you want the   inner sortable container's drag and drop to work.

Hi all ,
dnd-sortable-container using my data display.
Please show the  image
https://user-images.githubusercontent.com/25761532/36145142-726cbd42-10d6-11e8-81ba-942cde840c9b.png
once i will drag question 9 options 2 "Leadership"  in another div.the options is updated.how to restrict the condition in dnd-sortable
for example
https://user-images.githubusercontent.com/25761532/36145454-6bbf38de-10d7-11e8-9dc9-32916c5981d1.png
My Code is:

{{idx+1}}. {{question.question}}

{{option}}

ok, but this will not provide a real "inner + outer resorting" user experience...

It can be solved using dragEnabled + dropZones + (mousedown)="dragDetails = false; $event.stopPropagation();"
nested list sortables seems working using this kind of schema... but something more native we'll be great

any updates on this ? still can't get this working :/


Wexpect trial

Thank you for contributing to Pipenv!
The issue
Trying to get some improved windows support and figure out why those 3 tests are failing in the CI.
The fix
How does this pull request fix your problem? Did you consider any alternatives? Why is this the best solution, in your opinion?
Not sure if it does.
The checklist

[ ] Associated issue
[ ] A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

We have to think on conditionally vendoring this module on Windows only packages. Otherwise, everyone has this vendored regardless of the OS.

Nothing really indicates to me that this is necessary.


cockroachdb: fails to create metadata table

FerretDB version
1.8.0
Backend
CockroachDB 23.1.8
Environment

OS: the standard Docker image Linux ferretdb 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux
Deployment: Docker using ghcr.io/ferretdb/ferretdb:latest
Deployment details: 4.19.0

What did you do?
test> db.test.insertOne({name: "Ada Lovelace", age: 205})
MongoServerError: [transactions.go:149 pgdb.(*Pool).InTransactionRetry] non-retriable error: [transactions.go:64 pgdb.(*Pool).InTransaction] [transactions.go:108 pgdb.(*Pool).InTransactionKeep] [error.go:372 commonerrors.CheckError] [insert.go:48 pgdb.InsertDocument] [collections.go:172 pgdb.CreateCollectionIfNotExists] [collections.go:129 pgdb.CreateCollection] [database_metadata.go:134 pgdb.(*metadataStorage).store] [indexes.go:247 pgdb.createPgIndexIfNotExists] ERROR: index element (_jsonb->'_id') of type jsonb is not indexable in a non-inverted index (SQLSTATE 42P16)

What did you expect to see?
metadata table should be created.
What did you see instead?
2023-08-25T14:31:10.677Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"time": "2.153458ms", "commandTag": "ROLLBACK", "pid": 2917020, "sql": "rollback", "args": []}
2023-08-25T14:31:10.677Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"args": [], "time": "212.791µs", "commandTag": "BEGIN", "pid": 2917020, "sql": "begin"}
2023-08-25T14:31:10.699Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"commandTag": "SELECT 1", "pid": 2917020, "sql": "SELECT EXISTS ( SELECT 1 FROM information_schema.columns WHERE table_schema = $1 AND table_name = $2 )", "args": ["test","_ferretdb_database_metadata"], "time": "22.165083ms"}
2023-08-25T14:31:10.702Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"pid": 2917020, "sql": "CREATE SCHEMA IF NOT EXISTS \"test\"", "args": [], "time": "2.460333ms", "commandTag": "CREATE SCHEMA"}
2023-08-25T14:31:10.705Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"pid": 2917020, "sql": "CREATE TABLE IF NOT EXISTS \"test\".\"_ferretdb_database_metadata\" (_jsonb jsonb)", "args": [], "time": "3.046834ms", "commandTag": "CREATE TABLE"}
2023-08-25T14:31:10.706Z        ERROR   pgdb    tracelog/tracelog.go:335        Query   {"sql": "CREATE UNIQUE INDEX IF NOT EXISTS \"_ferretdb_database_metadata_id_idx\" ON \"test\".\"_ferretdb_database_metadata\" (((_jsonb->'_id')) ASC)", "args": [], "err": "ERROR: index element (_jsonb->'_id') of type jsonb is not indexable in a non-inverted index (SQLSTATE 42P16)", "time": "933.834µs", "pid": 2917020}
github.com/jackc/pgx/v5/tracelog.(*TraceLog).log
        /cache/gomodcache/github.com/jackc/pgx/v5@v5.4.2/tracelog/tracelog.go:335
github.com/jackc/pgx/v5/tracelog.(*TraceLog).TraceQueryEnd
        /cache/gomodcache/github.com/jackc/pgx/v5@v5.4.2/tracelog/tracelog.go:160
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*multiQueryTracer).TraceQueryEnd
        /src/internal/handlers/pg/pgdb/trace.go:74
github.com/jackc/pgx/v5.(*Conn).Exec
        /cache/gomodcache/github.com/jackc/pgx/v5@v5.4.2/conn.go:417
github.com/jackc/pgx/v5.(*dbTx).Exec
        /cache/gomodcache/github.com/jackc/pgx/v5@v5.4.2/tx.go:222
github.com/jackc/pgx/v5/pgxpool.(*Tx).Exec
        /cache/gomodcache/github.com/jackc/pgx/v5@v5.4.2/pgxpool/tx.go:69
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.createPgIndexIfNotExists
        /src/internal/handlers/pg/pgdb/indexes.go:233
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*metadataStorage).store
        /src/internal/handlers/pg/pgdb/database_metadata.go:133
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.CreateCollection
        /src/internal/handlers/pg/pgdb/collections.go:127
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.CreateCollectionIfNotExists
        /src/internal/handlers/pg/pgdb/collections.go:164
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.InsertDocument
        /src/internal/handlers/pg/pgdb/insert.go:47
github.com/FerretDB/FerretDB/internal/handlers/pg.insertDocument
        /src/internal/handlers/pg/msg_insert.go:133
github.com/FerretDB/FerretDB/internal/handlers/pg.insertDocumentSeparately.func1
        /src/internal/handlers/pg/msg_insert.go:162
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*Pool).InTransaction.func1
        /src/internal/handlers/pg/pgdb/transactions.go:61
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*Pool).InTransactionKeep
        /src/internal/handlers/pg/pgdb/transactions.go:107
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*Pool).InTransaction
        /src/internal/handlers/pg/pgdb/transactions.go:59
github.com/FerretDB/FerretDB/internal/handlers/pg/pgdb.(*Pool).InTransactionRetry
        /src/internal/handlers/pg/pgdb/transactions.go:128
github.com/FerretDB/FerretDB/internal/handlers/pg.insertDocumentSeparately
        /src/internal/handlers/pg/msg_insert.go:161
github.com/FerretDB/FerretDB/internal/handlers/pg.insertMany
        /src/internal/handlers/pg/msg_insert.go:102
github.com/FerretDB/FerretDB/internal/handlers/pg.(*Handler).MsgInsert
        /src/internal/handlers/pg/msg_insert.go:55
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).handleOpMsg
        /src/internal/clientconn/conn.go:563
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).route
        /src/internal/clientconn/conn.go:426
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
        /src/internal/clientconn/conn.go:310
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
        /src/internal/clientconn/listener.go:321
2023-08-25T14:31:10.708Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"args": [], "time": "1.891667ms", "commandTag": "ROLLBACK", "pid": 2917020, "sql": "rollback"}
2023-08-25T14:31:57.288Z        INFO    listener        clientconn/listener.go:324      Connection stopped      {"conn": "<IP_ADDRESS>:34364 -> <IP_ADDRESS>:27017"}
2023-08-25T14:31:57.290Z        INFO    listener        clientconn/listener.go:324      Connection stopped      {"conn": "<IP_ADDRESS>:34366 -> <IP_ADDRESS>:27017"}
2023-08-25T14:31:57.291Z        INFO    listener        clientconn/listener.go:324      Connection stopped      {"conn": "<IP_ADDRESS>:34390 -> <IP_ADDRESS>:27017"}
2023-08-25T14:31:57.292Z        INFO    listener        clientconn/listener.go:324      Connection stopped      {"conn": "<IP_ADDRESS>:34376 -> <IP_ADDRESS>:27017"}

CREATE UNIQUE INDEX IF NOT EXISTS _ferretdb_database_metadata_id_idx ON test._ferretdb_database_metadata ((( _jsonb->'_id')) ASC);

ERROR: index element (_jsonb->'_id') of type jsonb is not indexable

CREATE UNIQUE INDEX IF NOT EXISTS _ferretdb_database_metadata_id_idx ON test._ferretdb_database_metadata USING GIN ((( _jsonb->'_id')) ASC);

ERROR: inverted indexes can't be unique

The real fix would be in #226, but for #3228 we could change that index to be a GIN non-unique index for the CockroachDB backend.

I tested again with 1.9.0 and the issue seems to persist. I was trying to workaround using the following
CREATE TABLE IF NOT EXISTS test._ferretdb_database_metadata (
    _id STRING PRIMARY KEY AS (_jsonb->>'_id') STORED,
    _jsonb jsonb
);
ALTER TABLE test._ferretdb_database_metadata ALTER COLUMN _id DROP STORED;

Seems, FerretDB is trying to create the index irrelevant of the UNIQUE constraint existence
CREATE TABLE IF NOT EXISTS test._ferretdb_database_metadata (
    _id STRING PRIMARY KEY AS (_jsonb->>'_id') STORED,
    _jsonb jsonb
);
ALTER TABLE test._ferretdb_database_metadata ALTER COLUMN _id DROP STORED;

CREATE UNIQUE INDEX _ferretdb_database_metadata_id_idx ON test._ferretdb_database_metadata (_id);

MongoServerError: [transactions.go:149 pgdb.(*Pool).InTransactionRetry] non-retriable error: [transactions.go:64 pgdb.(*Pool).InTransaction] [transactions.go:108 pgdb.(*Pool).InTransactionKeep] [msg_insert.go:156 pg.insertDocument] [insert.go:48 pgdb.InsertDocument] [collections.go:172 pgdb.CreateCollectionIfNotExists] [collections.go:129 pgdb.CreateCollection] [database_metadata.go:134 pgdb.(*metadataStorage).store] [indexes.go:247 pgdb.createPgIndexIfNotExists] ERROR: index element (_jsonb->'_id') of type jsonb is not indexable in a non-inverted index (SQLSTATE 42P16)

is there a way to add a check that a unique index already exists?
https://github.com/FerretDB/FerretDB/blob/main/internal/handlers/pg/pgdb/indexes.go#L230-L247
I know you're relying on PG to check the index existence but can we add a Cockroach condition?

My team is also reporting that in the next release, slated for the end of the year, the following statement should work
CREATE UNIQUE INDEX IF NOT EXISTS _ferretdb_database_metadata_id_idx ON test._ferretdb_database_metadata ((( _jsonb->'_id')) ASC);

so perhaps this is a no-op issue and we just wait?

confirmed, in 23.2, FerretDB works as advertised
test> db.test.insertOne({name: "Ada Lovelace", age: 205})
{
  acknowledged: true,
  insertedId: ObjectId("64ed15ccac5241367eadac84")
}
test>

2023-08-28T21:46:52.157Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"args": ["7b222473223a7b2270223a7b225f6964223a7b2274223a22737472696e67227d2c227461626c65223a7b2274223a22737472696e67227d2c22696e6465786573 (truncated 386 bytes)","227465737422"], "time": "1.39775ms", "commandTag": "UPDATE 1", "pid": 3810834, "sql": "UPDATE \"test\".\"_ferretdb_database_metadata\" SET _jsonb = $1 WHERE _jsonb->'_id' = $2"}
2023-08-28T21:46:52.159Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"sql": "CREATE UNIQUE INDEX IF NOT EXISTS \"test__id__74791483_idx\" ON \"test\".\"test_afd071e5\" (((_jsonb->'_id')) ASC)", "args": [], "time": "1.02275ms", "commandTag": "CREATE INDEX", "pid": 3810834}
2023-08-28T21:46:52.172Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"pid": 3810834, "sql": "SELECT EXISTS ( SELECT 1 FROM information_schema.columns WHERE table_schema = $1 AND table_name = $2 )", "args": ["test","_ferretdb_database_metadata"], "time": "13.8365ms", "commandTag": "SELECT 1"}
2023-08-28T21:46:52.174Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"sql": "SELECT _jsonb  FROM \"test\".\"_ferretdb_database_metadata\" WHERE _jsonb->$1 @> $2", "args": ["_id","\"test\""], "time": "1.128958ms", "commandTag": "SELECT 1", "pid": 3810834}
2023-08-28T21:46:52.177Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"args": ["7b222473223a7b2270223a7b225f6964223a7b2274223a226f626a6563744964227d2c226e616d65223a7b2274223a22737472696e67227d2c22616765223a7b (truncated 104 bytes)"], "time": "2.841958ms", "commandTag": "INSERT 0 1", "pid": 3810834, "sql": "INSERT INTO \"test\".\"test_afd071e5\" (_jsonb) VALUES ($1)"}
2023-08-28T21:46:52.265Z        INFO    pgdb    tracelog/tracelog.go:335        Query   {"sql": "commit", "args": [], "time": "87.837084ms", "commandTag": "COMMIT", "pid": 3810834}

root@lb:26000/ferretdb> select * from test.test_afd071e5;
                                                                                _jsonb
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  {"$s": {"$k": ["_id", "name", "age"], "p": {"_id": {"t": "objectId"}, "age": {"t": "int"}, "name": {"t": "string"}}}, "_id": "64ed15ccac5241367eadac84", "age": 205, "name": "Ada Lovelace"}
(1 row)

so the question is, do we want to leave this integration as broken until the new release is out?

I made a quick hack to disable the creation of unique indexes: #3272. Links to Docker images will be there in about an hour: https://github.com/FerretDB/FerretDB/actions/runs/6012212211?pr=3272
Looking into https://www.cockroachlabs.com/docs/stable/jsonb, I think there might be more problems with the current version. But please check that quick hack – it should give us more info to think about.

It didn't work but for a different reason altogether.
test> db.test.insertOne({name: "Ada Lovelace", age: 205})
MongoServerError: [msg_insert.go:37 pg.(*Handler).MsgInsert] [pg.go:140 pg.(*Handler).DBPool] [pool.go:109 pgdb.NewPool] [pool.go:176 pgdb.(*Pool).checkConnection] failed to connect to `host=lb user=root database=ferretdb`: server error (ERROR: invalid value for parameter "search_path": "" (SQLSTATE 22P02))
test>

I tried to add SELECT pg_catalog.set_config('search_path', 'public', false); in a schema migration prior to ferretdb starting but it didn't have an effect on the outcome. Neither did passing the search_path in the FerretDB url. I believe I have to run FerretDB in non-debug build to overcome it but I'm not sure if it's hard-coded in your custom build of the image? I'm happy to continue down this path but is it worth having a one-off build for Cockroach, I already confirmed it works in the next release with the UNIQUE constraint? Also, should I open an issue for a search_path in debug builds? I know that will trip users up. https://docs.ferretdb.io/configuration/flags/

The next build will appear soon here: https://github.com/FerretDB/FerretDB/actions/runs/6015908634/job/16318769010?pr=3272. It disables setting search_path to an empty string that is useful during FerretDB development with PostgreSQL: that way we ensure that we always add the schema.

I'm not sure if it's hard-coded in your custom build of the image

Yeah, that's a "feature" of debug builds: https://github.com/FerretDB/FerretDB/blob/2e847f06d28102964ad99a6a485b674b150d50b4/internal/handlers/pg/pgdb/pool.go#L142-L146

should I open an issue for a search_path in debug builds

Not yet. We will probably remove that code soon.

but is it worth having a one-off build for Cockroach, I already confirmed it works in the next release with the UNIQUE constraint

Basically, we are trying to understand how much time it would take us to have a proper fix for the current version of CockroachDB.

we're back to step 1 with the following error:
MongoServerError: [transactions.go:149 pgdb.(*Pool).InTransactionRetry] non-retriable error: [transactions.go:64 pgdb.(*Pool).InTransaction] [transactions.go:108 pgdb.(*Pool).InTransactionKeep] [msg_insert.go:156 pg.insertDocument] [insert.go:48 pgdb.InsertDocument] [collections.go:172 pgdb.CreateCollectionIfNotExists] [collections.go:129 pgdb.CreateCollection] [database_metadata.go:134 pgdb.(*metadataStorage).store] [indexes.go:247 pgdb.createPgIndexIfNotExists] ERROR: index element (_jsonb->'_id') of type jsonb is not indexable in a non-inverted index (SQLSTATE 42P16)

It should work now with the current version of FerretDB and CockroachDB v23.2.

It is out of beta


Update spotify.nuspec

Fixes packageSourceUrl

@AdmiringWorm @majkinetor where do we stand on the failing PR build?  The change made in this PR has no bearing on that.  Should it be another PR to fix that problem?


GPU not being utilized while using LIBTORCH Alphazero

I successfully built openspiel with BUILD_WITH_LIBTORCH=ON. I have cuda 11.2 installed on my system. But when I start training it does not seem to utilize gpu.

Hi @SwiftGodDev, thanks for reaching out. What command are your running? There is an argument for alpha_zero_torch_example.cc that lets you set the devices you want to use: https://github.com/deepmind/open_spiel/blob/1381619f24317fec2cdf3724fb19505e4bbfeb1d/open_spiel/examples/alpha_zero_torch_example.cc#L58-L61 It defaults to using the CPU, but let me know if you are already specifying GPU (CUDA) devices and we can take a closer look.

Hi @christianjans, after reading your comment I ran this command ./alpha_zero_torch_example --devices=/cuda:0. But it gave this error.
Logging directory: /notebooks/data/chess/
Overwriting existing model: /notebooks/data/chess//vpnet.pb
Playing game: chess
terminate called after throwing an instance of 'c10::Error'
what():  Cannot initialize CUDA without ATen_cuda library. PyTorch splits its backend into two shared libraries: a CPU library and a CUDA library; this error has occurred because you are trying to use some CUDA functionality, but the CUDA library has not been loaded by the dynamic linker for some reason.  The CUDA library MUST be loaded, EVEN IF you don't directly use any symbols from the CUDA library! One common culprit is a lack of -Wl,--no-as-needed in your link arguments; many dynamic linkers will delete dynamic library dependencies if you don't depend on any of their symbols.  You can check if this has occurred by using ldd on your binary to see if there is a dependency on *_cuda.so library. (initCUDA at ../aten/src/ATen/detail/CUDAHooksInterface.h:63)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6a (0x7f81f1550aaa in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libc10.so)
frame #1:  + 0xa939e7 (0x7f81e30879e7 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #2: void std::__once_call_impl<std::_Bind_simple<at::Context::lazyInitCUDA()::{lambda()#1} ()> >() + 0x39 (0x7f81e303dde9 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #3:  + 0x1247f (0x7f81e25e347f in /usr/lib/x86_64-linux-gnu/libpthread.so.0)
frame #4:  + 0xa4a647 (0x7f81e303e647 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #5:  + 0x1247f (0x7f81e25e347f in /usr/lib/x86_64-linux-gnu/libpthread.so.0)
frame #6:  + 0xe9fbff (0x7f81e3493bff in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #7:  + 0xea19c7 (0x7f81e34959c7 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #8: at::native::to(at::Tensor const&, c10::TensorOptions const&, bool, bool, c10::optionalc10::MemoryFormat) + 0x7e9 (0x7f81e34969c9 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #9:  + 0x12236d6 (0x7f81e38176d6 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #10:  + 0x2ced027 (0x7f81e52e1027 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #11:  + 0x113f61c (0x7f81e373361c in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #12: void torch::nn::Module::to_impl<c10::Device&, bool&>(c10::Device&, bool&) + 0x2ab (0x7f81e5972c1b in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #13: void torch::nn::Module::to_impl<c10::Device&, bool&>(c10::Device&, bool&) + 0xa2 (0x7f81e5972a12 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #14: void torch::nn::Module::to_impl<c10::Device&, bool&>(c10::Device&, bool&) + 0xa2 (0x7f81e5972a12 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #15: void torch::nn::Module::to_impl<c10::Device&, bool&>(c10::Device&, bool&) + 0xa2 (0x7f81e5972a12 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #16: torch::nn::Module::to(c10::Device, bool) + 0x18 (0x7f81e596da08 in /notebooks/open_spiel/open_spiel/libtorch/libtorch/lib/libtorch_cpu.so)
frame #17: ./alpha_zero_torch_example() [0x98f242]
frame #18: ./alpha_zero_torch_example() [0x9266ac]
frame #19: ./alpha_zero_torch_example() [0x43c407]
frame #20: __libc_start_main + 0xf3 (0x7f81e20b90b3 in /usr/lib/x86_64-linux-gnu/libc.so.6)
frame #21: ./alpha_zero_torch_example() [0x43bd1e]
Aborted (core dumped)

I tried changing cuda versions(10.2, 11.0, 11.1) but had no luck.

Thanks for the information @SwiftGodDev. Sorry, I forgot to mention that one other thing to ensure is that you are installing the correct Libtorch version. In open_spiel/scripts/install.sh, ensure that you have the correct Libtorch download commented-out for the version of CUDA you are using: https://github.com/deepmind/open_spiel/blob/1381619f24317fec2cdf3724fb19505e4bbfeb1d/open_spiel/scripts/install.sh#L133-L151 The default download is for CPU only, but the other downloads support CUDA. Let me know how this goes or if you already tried this.

@christianjans I am currently also trying to configure my system to use a GPU.
I'm initially trying with CUDA 11.2 and cudnn >8
Have you seen this before?
Running ./open_spiel/scripts/build_and_run_tests.sh from /home/jonas/Documents/open_spiel
Reusing virtualenv from ./venv.
Skipping installation of requirements.txt.
Building and testing in /home/jonas/Documents/open_spiel/build using 'python' (version 3.8.5).

Call Stack (most recent call first):
libtorch/libtorch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
libtorch/libtorch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
CMakeLists.txt:230 (find_package)
seems like its not checking for the cudnn_version.h file which has the CUDNN_MAJOR 8 definition.
I am going to try adjusting the download URL for CUDA 11.2, and if that does not work, I'll try scaling back to 10.2.

I am getting the same error as well. I have cudnn>8.

Hi @christianjans, @SwiftGodDev, I've made some progress here.
cudNN version:

<IP_ADDRESS>

nvcc --version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_14_21:12:58_PST_2021
Cuda compilation tools, release 11.2, V11.2.152
Build cuda_11.2.r11.2/compiler.29618528_0

nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.67       Driver Version: 460.67       CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+

The issue is that libtorch/libtorch/share/cmake/Caffe2/public/cuda.cmake is not set up for versions of cudNN >= 8. They made some changes to where the version appears.
I replaced the line file(READ ${CUDNN_INCLUDE_PATH}/cudnn.h CUDNN_HEADER_CONTENTS) with file(READ ${CUDNN_INCLUDE_PATH}/cudnn_version.h CUDNN_HEADER_CONTENTS), this allows cmake to correctly read the cudNN version.
Then I created an empty CMakeLists.txt in libtorch to satisfy cmake, in order to try and build again.
This leads to some potential other issues, when running build_and_run_tests.sh with BUILD_WITH_LIBTORCH="ON", I get:

-- Caffe2: CUDA detected: 10.1
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 10.1
-- Found cuDNN: v8.1.1  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s):  5.2
-- Added CUDA NVCC flags for: -gencode;arch=compute_52,code=sm_52
Python include dirs: /usr/include/python3.8
-- Configuring done
CMake Warning at algorithms/alpha_zero_torch/CMakeLists.txt:20 (add_executable):
Cannot generate a safe runtime search path for target torch_vpnet_test
because files in some directories may conflict with libraries in implicit
directories:
runtime library [libnvToolsExt.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/cuda/lib64
runtime library [libcufft.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/cuda/lib64
runtime library [libcurand.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/cuda/lib64

Some of these libraries may not be found correctly.

However the build finishes with only warnings, and all tests pass, which is nice.
Running alpha_zero_torch_example with --devices="/cpu:0, cuda:0" crashes with:

./alpha_zero_torch_example --devices="/cpu:0, cuda:0"
Logging directory: /tmp/az
Overwriting existing model: /tmp/az/vpnet.pb
Playing game: amazons
terminate called after throwing an instance of 'c10::Error'
what():  Expected one of cpu, cuda, mkldnn, opengl, opencl, ideep, hip, msnpu device type at start of device string:  cuda (parse_type at ../c10/core/Device.cpp:37)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6a (0x7f62ffb11aaa in /home/jonas/Documents/open_spiel/open_spiel/libtorch/libtorch/lib/libc10.so)
frame #1:  + 0x150fa (0x7f62ffaf80fa in /home/jonas/Documents/open_spiel/open_spiel/libtorch/libtorch/lib/libc10.so)
frame #2: c10::Device::Device(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x14a (0x7f62ffaf83ba in /home/jonas/Documents/open_spiel/open_spiel/libtorch/libtorch/lib/libc10.so)
frame #3: ./alpha_zero_torch_example() [0x943313]
frame #4: ./alpha_zero_torch_example() [0x994791]
frame #5: ./alpha_zero_torch_example() [0x992f28]
frame #6: ./alpha_zero_torch_example() [0x98ef13]
frame #7: ./alpha_zero_torch_example() [0x92674c]
frame #8: ./alpha_zero_torch_example() [0x43fa77]
frame #9: __libc_start_main + 0xf3 (0x7f62aed9b0b3 in /lib/x86_64-linux-gnu/libc.so.6)
frame #10: ./alpha_zero_torch_example() [0x43f38e]
Aborted (core dumped)

However, running alpha_zero_torch_example with --devices="cuda:0" runs nicely, with full GPU usage.
@christianjans - do you know why its not liking the comma separated list?

Thank you @selfsim, your method worked.

@christianjans Can you please add an option for loading a checkpoint?

Great work! Glad this was resolved. And yes, @SwiftGodDev, I will be working on including functionality to restart Libtorch AZ training from checkpoints. Additionally, there is already a branch that allows one to test their trained Libtorch AZ model against a random or MCTS player, see #319 for more information.

Thank You @christianjans for the update. I will close this issue now as the problem has been resolved.


Set Custom time

Hi there,
I was searching for custom time set option in this plugin but i didn't find any option. I need to show the default time '03:00' but in plugin i was just getting default time according  to time and zone but i need to show '03:00' always. Here is a site link you can see if you scroll down in court management block there is a Rates section with Rates title in that section i am using time picker in From and To input filed so i need to set there a custom time '03:00'.
Thank you,

Hello,
do you find an issue about your problem ? because i have the same ...
Thanks


[feat]allow user to specify collection & embedding table names

allow user to specify collection & embedding table names, so user can create multiple vector store pairs for different usage.
also some small fix:

remove type annotaion for EmbeddingStore.embedding
give default values for connection_string_from_db_params
fix bug in _results_to_docs_and_scores and other similar methods

example code:
# running environment:
# python = 3.10.12
# pgvector = 0.2.5
# sqlalchemy = 2.0.31

from langchain_postgres import PGVector
from langchain_openai import OpenAIEmbeddings

embedding = OpenAIEmbeddings(base_url="http://xxx/v1",
                     api_key="sk-", model="xx")
con = PGVector.connection_string_from_db_params("langchain")
vs = PGVector.from_texts(['hello world'], embedding , collection_name="test", connection=con,
                         collection_table_name="collection", embedding_table_name="embedding")
docs = vs.similarity_search("hello there")
print(docs)

Thank you for this PR! Unrelated-ish, I guess(?) but what's the difference between a collection and a table? I tried looking it up but everything I found pointed me towards mongodb and their concept of a collection

Thank you for this PR! Unrelated-ish, I guess(?) but what's the difference between a collection and a table? I tried looking it up but everything I found pointed me towards mongodb and their concept of a collection

In langchain-postgres all vectors are stored in one table named langchain_pg_embedding, there is a column named collection_id to distinguish different vector stores.

Sorry to add work for you, but can you describe why we might need separate collections when we have separate tables? What's the use-case there then?

ctions when we have separate tables? What's the use-case there then? In a traditional DB we would just have separate tables, no?

Currently we have separate collections for every vector store in one table, it's convenient to do search across collections (although it does not support this yet).
Sometimes we want to group other collections in another table for different purpose, this is what this PR does.

@IanQS This would be of interest to us as well as we would like to have different tables when testing stuff in DEV, without introducing a completely new PostgreSQL DB instance or impacting others working against the same DEV database.