Add loguru integration

Actually, this is the solution in comments under #653 adapted to codebase and tested as well.
https://github.com/getsentry/sentry-python/issues/653#issuecomment-788854865
I also changed logging integration to use methods instead of functions in handlers, as in that way we can easily overwrite parts that are different in loguru integration. It shouldn't be a problem, as those methods are private and used only in that file.
Please let me know if I missed something, or you have more ideas how to test this.
Fixes #653.

@antonpirker - want to take a look at this?

I am a bit swamped right now, so this could take some time.

I do not really understand the error. This doesn't look like my problem.

Sometimes our tests are a bit flaky. I have updated your branch with the current master, so the tests will run again.

 Nice work!
I create a small test project for testing:
from loguru import logger as loguru_logger

import sentry_sdk
import sentry_sdk.integrations.loguru
sentry_sdk.init(
    dsn="...",
    integrations=[
        sentry_sdk.integrations.loguru.LoguruIntegration(),
    ],
    traces_sample_rate=1.0,
    debug=True,
)

def main():
    loguru_logger.debug("Guru: I am ignored")
    loguru_logger.info("Guru: I am a breadcrumb")
    loguru_logger.error("Guru: I am an event", extra=dict(bar=43))
    loguru_logger.exception("Guru: An exception happened")

if __name__ == "__main__":
    main()

So the error log entry creates an "information like" event in Sentry and the exception log entry creates an exception in Sentry. Very nice!

The error message contains all the formatted Loguru message with all the information. This is not the best developer experience. Could you please change this, to only contain the message from the call to "loguru_logger.exception()"?
One other thing I noticed is, that loguru_logger.exception() does not attach an exception object, so this code is never reached: https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/logging.py#L209-L213
Is this just how Loguru works, or am I doing something wrong?

The error message contains all the formatted Loguru message with all the information. This is not the best developer experience. Could you please change this, to only contain the message from the call to "loguru_logger.exception()"?

Unfortunately, looks like no. Loguru parses the message before it is passed to our handler, so we get only a formatted message. We can somehow cut unnecessary parts (e.g. regex or build the unnecessary parts of message by ourselves to cut it) or we can change the format of messages to contain only plain messages (loguru.add(..., format="{message}")). The second way will make it impossible to include loguru's data into messages.

Is this just how Loguru works, or am I doing something wrong?

Both, you don't catch any exception, so loguru doesn't provide it. This code works, and also doesn't send formatted messages by loguru in the report name.
try:
    1 / 0
except ZeroDivisionError:
    loguru_logger.exception("Guru: An exception happened")

If there is no exception, loguru prints None to the console (is it a bug?)
>>> from loguru import logger
>>> logger.exception("Guru: An exception happened")
2023-04-26 21:29:02.780 | ERROR    | __main__:<module>:1 - Guru: An exception happened
NoneType: None

I also do not understand what I missed in tox.ini so loguru is not installed in CI. Could you look at it please?

or we can change the format of messages to contain only plain messages (loguru.add(..., format="{message}")).

We should not do this. We should never change the behavior of the users code, just add functionality on top of it.
As the users can set whatever formatting that she likes the regex approach seems not possible.
Can we "build the unnecessary parts of message" with the formatting the users has set so it always works, no matter what the configuration of the user looks like?

Or one other option: can we hook into something that is run before our handler, where we have access to the raw message?

loguru works different from logging module. In logging, you can set the format of message globally, while in loguru - every handler can have a customized message (handler added with logger.add). We can't get the user's message, because the user can configure multiple loggers, that will output to multiple terminals/files. E.g. the user wants to have logs in files too, so they will just do
loguru.add("logs.txt", format="some custom format")  # and maybe some rotation, doesn't matter

So if we will monkeypatch loguru's global handler - we will get duplicates because
logger.info("hi!")
# calls all handlers:
# 0 - default (stderr logger)
# 1 - what we added upper (log into file)
# 2 - sentry's breadcrumb handler   # only if INFO >= logging_level > ERROR
# 3 - sentry's event handler        # only if ERROR >= logging_level

All of them can have custom format, so we can't catch what the user actually sees in the terminal. BUT we can provide configuration options that we will send into loguru.

Also, as I understand, all info that provides loguru in the console, Sentry provides too in the UI.
>>> import sentry_sdk
... import sentry_sdk.integrations.loguru
... sentry_sdk.init(
...     dsn="...",
...     integrations=[
...         sentry_sdk.integrations.loguru.LoguruIntegration(),
...     ],
...     traces_sample_rate=1.0,
...     debug=True,
... )
 [sentry] DEBUG: Setting up integrations (with default = True)
 ...
>>> from loguru import logger
>>> import sys
>>> logger.add(sys.stdout, format="{time} {level} {message}")
>>> logger.info("hi")
2023-04-28T09:02:25.169723+0200 INFO hi
2023-04-28 09:02:25.169 | INFO     | __main__:<module>:1 - hi
>>> logger.error("test")
2023-04-28 09:02:36.507 | ERROR    | __main__:<module>:1 - test
 [sentry] DEBUG: Sending envelope [envelope with 1 items (error)] project:... host:....ingest.sentry.io
2023-04-28T09:02:36.507423+0200 ERROR test
 [sentry] DEBUG: [Tracing] Adding `sentry-trace` header ...-...- to outgoing request to https://....ingest.sentry.io/api/.../envelope/.

can we hook into something that is run before our handler, where we have access to the raw message?

I did this via appending this code to the end of our loguru integration module
import loguru._simple_sinks

class PatchedStandardSink(loguru._simple_sinks.StandardSink):
    def write(self, message):
        parsed_record = None
        actual_message = message.record["message"]

        def handler_hande(record):
            nonlocal parsed_record
            parsed_record = record

        original_handler_handle = self._handler.handle
        self._handler.handle = handler_hande
        original_write(self, message)

        parsed_record.message = actual_message
        parsed_record.msg = actual_message

        original_handler_handle(parsed_record)

original_write = loguru._simple_sinks.StandardSink.write
loguru._simple_sinks.StandardSink.write = PatchedStandardSink.write

But this gives absolutely the same result as just setting format="{message}".

Hey @PerchunPak !
Again: Great work, thanks again for this contribution!
We now need also some documentation for this. Could you please create a PR in our docs repo. You can just copy the Redis docs and change it to fit Loguru: https://github.com/getsentry/sentry-docs/blob/master/src/platforms/python/common/configuration/integrations/redis.mdx#L19
Thanks!
And if you want to have e small thank you gift please send me your shipping address and t-shirt size to<EMAIL_ADDRESS>

Thank you for the merge!

We now need also some documentation for this. Could you please create a PR in our docs repo.

It is already done here.

Hey @PerchunPak !
Your contribution has been released: https://github.com/getsentry/sentry-python/releases/tag/1.23.0
Congrats!
If you want a little thank you for your contribution please send me your shipping address (and tshirt size) to<EMAIL_ADDRESS>


Add Feature: update transform as orphan

I've told many things  about  "updateTransform" , at
https://github.com/pixijs/pixi.js/issues/3370
https://github.com/pixijs/pixi.js/issues/3389
https://github.com/pixijs/pixi.js/issues/3388
My english is too weak to explain it  in further detail.
There are just few things to add ：
Why named the function as updateTransformAsOrphan ？
Maybe It's not the best name , I named it just by  convention of web development.
In web development, We call a no-parent DOM node orphan node(in China).
Why don't check parent in updateTransform , but add a new function ?
I want do it. But I'm afraid that if I do it , you wouldn't accept it for stability of current version.
When we need this feature  ？
Many times , we can't ensure any display object & transform object has a parent.
When we need update  orphan object manually ， if no the function like this , there will be an error.
~
I think we could solve the problem about no-parent transform first.
Solving the same problem about no-parent display object  would be the next step.

I think we need another branch on big transform refactoring and include that thing there. If we add one more method, we'll have total 6 methods that do the same thing with local transform :(

What if we fork pixi and add collabs like you to it? We can support different branches that way and provide a way to test each experiment in pixi-examples.

In my opinion  if don't call   updateLocalTransform in other  update transform, we could remove it.
I've no idea when users would use it.
If   6 methods too many , we could add checking to updateTransform
    updateTransform(parentTransform)
    {
        const lt = this.localTransform;

        lt.a = this._cx * this.scale._x;
        lt.b = this._sx * this.scale._x;
        lt.c = this._cy * this.scale._y;
        lt.d = this._sy * this.scale._y;

        lt.tx = this.position.x - ((this.pivot.x * lt.a) + (this.pivot.y * lt.c));
        lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d));

        // concat the parent matrix with the objects transform.
        const wt = this.worldTransform;

        if (parentTransform)
        {
            const pt = parentTransform.worldTransform;

            wt.a = (lt.a * pt.a) + (lt.b * pt.c);
            wt.b = (lt.a * pt.b) + (lt.b * pt.d);
            wt.c = (lt.c * pt.a) + (lt.d * pt.c);
            wt.d = (lt.c * pt.b) + (lt.d * pt.d);
            wt.tx = (lt.tx * pt.a) + (lt.ty * pt.c) + pt.tx;
            wt.ty = (lt.tx * pt.b) + (lt.ty * pt.d) + pt.ty;
        }
        else
        {
            wt.a = lt.a;
            wt.b = lt.b;
            wt.c = lt.c;
            wt.d = lt.d;
            wt.tx = lt.tx;
            wt.ty = lt.ty;
        }

        this._worldID ++;
    }

I think update an orphan node is a common request and a core feature.
Testing  it in a new branch or fork is OK , but we should add it to the master branch finally.

OK , with my pleasure.

@finscn
By the way, one of ideas is to introduce (Spine transform)[https://github.com/pixijs/pixi-spine/blob/master/src/core/Bone.ts] .

@ivanpopelyshev ,  I think PIXI need a pure matrix module,  it could be used in many place besides  calculating transform.
e.g. , in my extension PerspectiveRenderer.
I will try it later.

@ivanpopelyshev , I found  there are too many differences  between origin PIXI.js and your fork version.
It's too hard to understand by me.  Tears...

@finscn you dont have to use my "master" , just fetch my repo, and commit your branch there. "master" is 3d stuff, dont touch it, while dev1-4 i use for small PRs to pixi.

About matrix, yes, "a,b,c,d,tx,ty" is much better than Float32Array, also because it uses DOUBLE precision. That way we can handle coords with good precision JS, and then upload normal stuff to GPU.

Hi @finscn , Apprechiate the time you took to send us this. Ultimately I not feel this is not required as its an bit of an edge case for your specific needs.
Cheers!


Improve error messages in API client with prefixed IDs

Since we've decided not to have support for prefixed IDs in the API client, we should improve the error message to explain what users should do instead. The phrasing is TBD, and could be similar to what we show for the equivalent situation in the frontend (see issue #1009).
cc: @junxini @dgmccart @kev-zunshiwang

use same verbiage for the error message as what's being shown in the API reference doc site @dgmccart to help provide


Linter fix

Linting Errors Fix
Several linting errors are reported when running the backend locally. This PR addresses those errors by adding type definitions of : any

[ ] Assign type of : any to functions flagged by the linter

I only made the fixes necessary to address the linting errors
https://www.loom.com/share/d9f694621868415a9f58e4f7c8be8531
Changes to package.json and package.lock.json have been reverted since Loom recording

The changes to package-lock.json and package.json should be explained or removed. These files are very critical to maintain correctly. If you have tested the changes to these files to be working and advantageous please make another PR for them.

I see you did mention packages.json. it's just wild that it caused that many changes in the lock file. I will test this on windows, @Bus42 can you verify its working on linux? and I think @rmjuarez12 can verify mac? I forget are you on mac?

I can verify that it works in Ubuntu. I did explain the change to package.json in the Loom, but I will update the PR text with the explanation as well.

I realized that the changes to package.json were due to errors when running npm run deploy which I have been informed is no longer used and reverted the changes to both files.

I'm not going to be able to test this on windows until tomorrow.

I've added explicit types to all instances with the exception of

/api/middleware/oktaRequire.ts
/api/player/model.ts
/api/words/utils.ts

These are proving a bit tricky


open-vm-tools: /etc/os-release is too large

Issue description
The vmwareGuest service fails to start, giving the following error messages in /var/log/vmware-vmsvc.log:
[Sep 11 14:50:09.578] [ warning] [vmsvc] HostinfoReadDistroFile: input buffer too small
[Sep 11 14:50:09.578] [ warning] [vmsvc] HostinfoOSData: Error: no distro file found
[Sep 11 14:50:09.578] [ warning] [guestinfo] Failed to get OS info.

Steps to reproduce

Install a fresh copy of NixOS 18.03 in a VM under VMware Fusion 10.1.3 on macOS 10.12.x.
Configure relevant parts in /etc/nixos/configuration.nix, e.g.:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  # boot.loader.grub.efiSupport = true;
  # boot.loader.grub.efiInstallAsRemovable = true;
  # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  # Define on which hard drive you want to install Grub.
  boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only

  # networking.hostName = "nixos"; # Define your hostname.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # Select internationalisation properties.
  # i18n = {
  #   consoleFont = "Lat2-Terminus16";
  #   consoleKeyMap = "us";
  #   defaultLocale = "en_US.UTF-8";
  # };

  # Set your time zone.
  # time.timeZone = "Europe/Amsterdam";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
    mkpasswd
    vim
    rxvt_unicode
    firefox
  ];

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.bash.enableCompletion = true;
  # programs.mtr.enable = true;
  # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # Enable CUPS to print documents.
  # services.printing.enable = true;

  # Enable sound.
  # sound.enable = true;
  # hardware.pulseaudio.enable = true;

  # Enable the X11 windowing system.
  # services.xserver.enable = true;
  # services.xserver.layout = "us";
  # services.xserver.xkbOptions = "eurosign:e";

  # Enable touchpad support.
  # services.xserver.libinput.enable = true;

  # Enable the KDE Desktop Environment.
  # services.xserver.displayManager.sddm.enable = true;
  # services.xserver.desktopManager.plasma5.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.extraUsers.rawtaz = {
    isNormalUser = true;
    uid = 1000;
    extraGroups = ["wheel"];
  };

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "18.03"; # Did you read the comment?

  services.vmwareGuest.enable = true;
  services.vmwareGuest.headless = true;
  services.xserver.enable = true;
  services.xserver.windowManager.i3.enable = true;
  services.xserver.displayManager.lightdm.enable = true;
}

Technical details
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.67, NixOS, 18.03.133192.45f52f765cd (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0.4`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`

Further comments and workaround
Based on the code in https://github.com/vmware/open-vm-tools/blob/3a0205478e242bd672356d4eab6272d3b901fe6e/open-vm-tools/lib/misc/hostinfoPosix.c#L932 it seems that the contents of the file /etc/os-release, which is scanned by open-vm-tools, is simply too large:
NAME=NixOS
ID=nixos
VERSION="18.03.133192.45f52f765cd (Impala)"
VERSION_CODENAME=impala
VERSION_ID="18.03.133192.45f52f765cd"
PRETTY_NAME="NixOS 18.03.133192.45f52f765cd (Impala)"
HOME_URL="https://nixos.org/"
SUPPORT_URL="https://nixos.org/nixos/support.html"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"

I tested that by creating a file /etc/release (which is also scanned by open-vm-tools), with only part of the contents:
NAME=NixOS
ID=nixos
VERSION="18.03.133192.45f52f765cd (Impala)"
VERSION_CODENAME=impala
VERSION_ID="18.03.133192.45f52f765cd"
PRETTY_NAME="NixOS 18.03.133192.45f52f765cd (Impala)"

After a few seconds, when the vmwareGuest service tries to start again, there's only one of the previously three error messages in /var/log/vmware-vmsvc.log:
[Sep 11 14:50:09.578] [ warning] [vmsvc] HostinfoReadDistroFile: input buffer too small

The vmwareGuest service started, the above error message is for the still remaining and too large /etc/os-release file (to verify, let the contents of /etc/release be identical to that of /etc/os-release and notice that the other error messages comes back in the log file).

@joamaki Ping, looks like you're the maintainer :)

FWIW, I also verified that it doesn't make a difference if the /etc/os-release file is a regular file or a symlink, same symptoms apply.

My /var/log/vmware-vmsvc.log file is littered with the same errors as yours, but the vmware service is still running. I'll note I don't have any shared folders.

systemctl status vmware.service
vmware.service - VMWare Guest Service
Active: active (running) since Thu 2018-09-06 12:37:51 EDT; 1 weeks 0 days ago

I guess I can do that, raising the question "shouldn't it be allowed to be bigger?".
Regardless of what it looks like, it is evidently too big for the vmware-vmsvc code to handle as it is now :/
I'm thinking of patching the vmware service in the Nix derivation, but it would of course be better to have it done upstream or that Nix generated a smaller file.

I also ran the lsb release tool on NixOS in the VM and didn't get any output. Is that the expected result? I'm guessing not... If the lsb release tool worked on NixOS that might also solve the problem.
@rawtaz Can you let me know if running lsb_release has any output for you?

@aanderse Can you elaborate on how the lsb_release tool could solve the problem? AFAICT it just produces output. I assume you mean that if we take this output and put it in an /etc/lsb-release file, the problem is solved? But the file in question would still be restricted to the same size limitations as the other files that are scanned, or is there a difference in limitation between this one and other files?
FWIW, same here, not much info from lsb_release:
$ lsb_release -a
LSB Version:	n/a
Distributor ID:	n/a
Description:	NAME=NixOS
Release:	n/a
Codename:	n/a

@rawtaz I didn't review the openvm-tools closely enough to say but after a quick glance it appears that the source file you linked can use the output of lsb_release to identify the distro.
https://github.com/vmware/open-vm-tools/blob/3a0205478e242bd672356d4eab6272d3b901fe6e/open-vm-tools/lib/misc/hostinfoPosix.c#L1132
I wondered if adding a quick substitution in the source code to ${pkgs.lsb-release}/bin/lsb_release for /usr/bin/lsb_release might be enough to identify the distro.

Reported upstream, let's hope they increase the buffer, so we don't have to require additional binaries just to make this service work.


Not work on local

Hi!
I use localhost on OpenServer
Pagekit Version | 1.0.13
Web Server | Apache
User Agent | Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
PHP 7.04
MySql 5.5.48
Settings - Use Mysqldump
i have "finished" status, but no any zip or etc files can`t be find on local store.
(some have in tmp dir:
files.zip - not empty, but not full contetn (litl files ...)
database.sql - 0 bytes size)
thanks you in advance!

Hi and thank you for your report.
First of all: Please enable debug mode.
If you check out all network activity from the browser after you started the backup, you should see a lot happening there.
Please run your backup and watch out for results, that have not status 200.

Once you found the problem, please check the response and post it here.
I think the error will be shown on archiveDatabase.

Closed as there are no further information provided. Please reopen, if necessary.


Responsiveness of the quotes

Description
In the mobile view of Books page, the boxes for quotes are not responsive, some words are facing the overflow problem and for some the picture, they are not coming into the frame properly.

Please assign this issue to me under GSSoC'23
Screenshots
No response
Checklist

[X] I have checked the existing issues
[X] I have read the [Contributing Guidelines]
[X] I have read the discussion tab thoroughly and got the project idea
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

@muskandn I suppose it's already assigned. Please confirm


Only consider ocps networks for network-values template

The common template for the network-values in ci_gen_kustomize_values
iterates over all the hosts in the cifmw_networking_env_definition and
stores in a map the relationship between a network and the interface.
For this to work, the ocp nodes must be the last ones, since if there
are other nodes after them in the cifmw_networking_env_definition,
for example nodes named osp-*, and they use a different network
interface, the resulting nncp will fail when applied.

/trigger github-experimental

/trigger github-experimental

+1 from me.
Since the network-values is overridden in most (if not all) of the VAs and DTs I think it would be good to make this change accross the board.

+1 from me.
Since the network-values is overridden in most (if not all) of the VAs and DTs I think it would be good to make this change accross the board.

thanks @hjensas I've added a new commit copying the change to the rest of VAs and DTs templates, ptal

/hold waiting for testing in the uni jobs

/hold cancel we were able to test the uni jobs and it works well

/hold-cancel

/hold cancel

/approve


import roboflow

New bug: cannot import roboflow. From the error message seems the bug is at the get_conditional_configuration_variable method

os.path.expanduser() instead of os.getenv


Documenting habitat test scenes and pointnav episodes

Motivation and Context
Documents how habitat test scenes and pointnav episodes can be downloaded.
How Has This Been Tested
Tested locally
Types of changes

[x] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have completed my CLA (see CONTRIBUTING)
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

This is great, but shouldn’t the information about PointNav episodes (also?) go on Habitat-lab?

This is great, but shouldn’t the information about PointNav episodes (also?) go on Habitat-lab?

Agreed. I'll send a habitat-lab PR shortly.


distance meta examples

Some very easy meta examples... I have also deleted canaberra.py because canaberra.sg already exists.

Thanks!


Search Feature implementation

Search feature implementation goals/ideas

search by title, difficulty, time, category
allow input of multiple values with some kind of separator to help narrow a search
this feature may remove the Favorites page since you could just search for favorites and show the same result

Closing due to switching to datatable for recipe display


Expose ImGui tab creation to CppMods

I took a quick stab at #110. Some things to note:

I put DebuggingGUI::m_tabs behind a mutex to be safe, though this means tabs won't be able to add other tabs in the middle of a frame. Perhaps queuing new tabs up to add at the end of a frame would be better?
I moved mod setup to after console creation so the GUI would be available in the mod constructor. Assuming this doesn't break something else, this seems better than utilizing on_program_start as it is only run at UE4SS startup and doesn't run again for mod restarts.
I've included a hack that allows the mod .dll file to be swapped and reloaded, allowing hot reloading on my system using WINE. I thought very little about how sound it is and wouldn't actually include it, but it's nice for testing purposes.

I've got a test mod here: https://github.com/trumank/ue4ss-scratch/blob/20035c1dddd8b7f76686e408da34a8c2068dcab8/MyAwesomeMod/dllmain.cpp

https://user-images.githubusercontent.com/1144160/236652167-f49f7c2f-cf21-4043-803c-cf72ed9507b0.mp4
Oh, and some hot reload action. :D

Can you separate the hot-reload hack into its own pull request ?
The reason why C++ mods are loaded as early as they are is because I want to give people as much opportunity as possible to do whatever they want to do and having C++ mods load as early as possible means they could potentially do things before UE inits like establish a proper lifetime cycle. Any delays make this more difficult as you decrease the time available for a mod to init before UE inits. Not sure how much time the output configuration takes but it's probably a low amount so your change is likely fine.

Some notes on the example mod:

The code that sets the context and allocator functions should probably be a macro supplied by UE4SSProgram.hpp.
You're using make_unique and then assigning the result to a shared_ptr. I'm guessing this was a simple mistake but I thought it was worth mentioning anyway.

Can you separate the hot-reload hack into its own pull request ?

Removed, I'll submit another PR shortly.

The reason why C++ mods are loaded as early as they are is because I want to give people as much opportunity as possible to do whatever they want to do and having C++ mods load as early as possible means they could potentially do things before UE inits like establish a proper lifetime cycle. Any delays make this more difficult as you decrease the time available for a mod to init before UE inits. Not sure how much time the output configuration takes but it's probably a low amount so your change is likely fine.

Ah this makes sense. I'm not aware of how long the GUI takes to init, but if it's a problem, new tabs could be queued by UE4SSProgram so they don't have to wait. This brings up something I forgot to mention last night: Does the GUI ever not exist, or does it just hide when disabled? So far I haven't considered what happens if it's disabled in the config.

You're using make_unique and then assigning the result to a shared_ptr. I'm guessing this was a simple mistake but I thought it was worth mentioning anyway.

It was my understanding that uniqe_ptr will cheaply and automatically get converted to another pointer type when necessary, so haven't been bothering to use anything else when creating a pointer. Is this not the case? Either way I guess it doesn't hurt to be explicit.

The reason why C++ mods are loaded as early as they are is because I want to give people as much opportunity as possible to do whatever they want to do and having C++ mods load as early as possible means they could potentially do things before UE inits like establish a proper lifetime cycle. Any delays make this more difficult as you decrease the time available for a mod to init before UE inits. Not sure how much time the output configuration takes but it's probably a low amount so your change is likely fine.

Ah this makes sense. I'm not aware of how long the GUI takes to init, but if it's a problem, new tabs could be queued by UE4SSProgram so they don't have to wait. This brings up something I forgot to mention last night: Does the GUI ever not exist, or does it just hide when disabled? So far I haven't considered what happens if it's disabled in the config.

The GUI isn't initialized at all if GuiConsoleEnabled is set to 0 in UE4SS-settings.ini.
If that setting is set to 1, and GuiConsoleVisible is set to 0, the GUI is not initialized but the logging system is enabled for it, the UObjectArray listeners are set up and the hotkey for opening the GUI is created and when that hotkey is hit the GUI will be initialized.

You're using make_unique and then assigning the result to a shared_ptr. I'm guessing this was a simple mistake but I thought it was worth mentioning anyway.

It was my understanding that uniqe_ptr will cheaply and automatically get converted to another pointer type when necessary, so haven't been bothering to use anything else when creating a pointer. Is this not the case? Either way I guess it doesn't hurt to be explicit.

While it's technically fine to use unique_ptr in this case, it's also misleading because it looks like the variable is a unique_ptr simply because you're creating a unique_ptr.


seq2seq: Cannot parse tensor from proto: dtype: DT_FLOAT

My platform is ubuntu 14.04 with tensorflow version of 0.10, CPU version.
I am using functions in seq2seq.py to build a model. The code works fine when I use the embedding_rnn_seq2seq function, but when I use embedding_attention_seq2seq, it has error like this:
AttributeError: 'LSTMStateTuple' object has no attribute 'get_shape'
To fix this, I turned the state_is_tuple to false, but now it has another problem:
W tensorflow/core/framework/op_kernel.cc:926] Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

E tensorflow/core/common_runtime/executor.cc:334] Executor failed to create kernel. Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_29 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
W tensorflow/core/framework/op_kernel.cc:926] Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

E tensorflow/core/common_runtime/executor.cc:334] Executor failed to create kernel. Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_28 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
W tensorflow/core/framework/op_kernel.cc:926] Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

E tensorflow/core/common_runtime/executor.cc:334] Executor failed to create kernel. Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_28 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
E tensorflow/core/client/tensor_c_api.cc:485] Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_28 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 730, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 712, in _run_fn
    status, run_metadata)
  File "/usr/lib/python3.4/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/errors.py", line 450, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_28 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 29, in <module>
    chatbot.main()
  File "/mnt/d/DeepQA/chatbot/chatbot.py", line 208, in main
    self.sess.run(tf.initialize_all_variables())
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 382, in run
    run_metadata_ptr)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 655, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 723, in _do_run
    target_list, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 743, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
  dim {
    size: 52772
  }
  dim {
    size: 52767
  }
}
float_val: 0

         [[Node: zeros_28 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 52772 } dim { size: 52767 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
Caused by op 'zeros_28', defined at:
  File "main.py", line 29, in <module>
    chatbot.main()
  File "/mnt/d/DeepQA/chatbot/chatbot.py", line 169, in main
    self.model = Model(self.args, self.textData)
  File "/mnt/d/DeepQA/chatbot/model.py", line 58, in __init__
    self.buildNetwork()
  File "/mnt/d/DeepQA/chatbot/model.py", line 118, in buildNetwork
    self.optOp = opt.minimize(self.lossFct)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 198, in minimize
    name=name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 300, in apply_gradients
    self._create_slots(var_list)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/adam.py", line 118, in _create_slots
    self._zeros_slot(v, "m", self._name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/optimizer.py", line 494, in _zeros_slot
    named_slots[var] = slot_creator.create_zeros_slot(var, op_name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/training/slot_creator.py", line 106, in create_zeros_slot
    val = array_ops.zeros(primary.get_shape().as_list(), dtype=dtype)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/array_ops.py", line 1131, in zeros
    output = constant(0, shape=shape, dtype=dtype, name=name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/constant_op.py", line 167, in constant
    attrs={"value": tensor_value, "dtype": dtype_value}, name=name).outputs[0]
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 2310, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 1232, in __init__
    self._traceback = _extract_stack()

Code is as follows:
# Creation of the rnn cell
encoDecoCell = tf.nn.rnn_cell.BasicLSTMCell(self.args.hiddenSize, state_is_tuple=False)  # Or GRUCell, LSTMCell(args.hiddenSize)
#encoDecoCell = tf.nn.rnn_cell.DropoutWrapper(encoDecoCell, input_keep_prob=1.0, output_keep_prob=1.0)  # TODO: Custom values (WARNING: No dropout when testing !!!)
encoDecoCell = tf.nn.rnn_cell.MultiRNNCell([encoDecoCell] * self.args.numLayers, state_is_tuple=False)

# Network input (placeholders)

self.encoderInputs  = [tf.placeholder(tf.int32,   [None, ]) for _ in range(self.args.maxLengthEnco)]  # Batch size * sequence length * input dim

self.decoderInputs  = [tf.placeholder(tf.int32,   [None, ], name='inputs') for _ in range(self.args.maxLengthDeco)]  # Same sentence length for input and output (Right ?)
self.decoderTargets = [tf.placeholder(tf.int32,   [None, ], name='targets') for _ in range(self.args.maxLengthDeco)]
self.decoderWeights = [tf.placeholder(tf.float32, [None, ], name='weights') for _ in range(self.args.maxLengthDeco)]

# Define the network
# Here we use an embedding model, it takes integer as input and convert them into word vector for
# better word representation
decoderOutputs, states = tf.nn.seq2seq.embedding_attention_seq2seq(
    self.encoderInputs,  # List<[batch=?, inputDim=1]>, list of size args.maxLength
    self.decoderInputs,  # For training, we force the correct output (feed_previous=False)
    encoDecoCell,
    self.textData.getVocabularySize(),
    self.textData.getVocabularySize(),  # Both encoder and decoder have the same number of class
    embedding_size=self.args.embeddingSize,  # Dimension of each word
    output_projection=None,  # Eventually
    feed_previous=bool(self.args.test)  # When we test (self.args.test), we use previous output as next input (feed_previous)
)

@zhaopku Please add the following information - at least the OS / version info.  FYI this is the default template when you click the green "New issue" button on the webpage for this issue.  Thanks!
### What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?

### Environment info
Operating System:

Installed version of CUDA and cuDNN:
(please attach the output of `ls -l /path/to/cuda/lib/libcud*`):

If installed from binary pip package, provide:

1. A link to the pip package you installed:
2. The output from `python -c "import tensorflow; print(tensorflow.__version__)"`.

If installed from source, provide

1. The commit hash (`git rev-parse HEAD`)
2. The output of `bazel version`

### If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

### What other attempted solutions have you tried?

### Logs or other output that would be helpful
(If logs are large, please upload as attachment or provide link).

Operating System: ubuntu 14.04
CPU version, no cuda installed
I installed that from pip3
tensorflow version: 0.10, link: https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl
reproductive sample is just as I mentioned before:
encoDecoCell = tf.nn.rnn_cell.BasicLSTMCell(hiddenSize, state_is_tuple=False)  # Or GRUCell, LSTMCell(hiddenSize)
#encoDecoCell = tf.nn.rnn_cell.DropoutWrapper(encoDecoCell, input_keep_prob=1.0, output_keep_prob=1.0)  # TODO: Custom values (WARNING: No dropout when testing !!!)
encoDecoCell = tf.nn.rnn_cell.MultiRNNCell([encoDecoCell] * numLayers, state_is_tuple=False)

encoderInputs  = [tf.placeholder(tf.int32,   [None, ]) for _ in range(maxLengthEnco)]  # Batch size * sequence length * input dim

decoderInputs  = [tf.placeholder(tf.int32,   [None, ], name='inputs') for _ in range(maxLengthDeco)]  # Same sentence length for input and output (Right ?)
decoderTargets = [tf.placeholder(tf.int32,   [None, ], name='targets') for _ in range(maxLengthDeco)]
decoderWeights = [tf.placeholder(tf.float32, [None, ], name='weights') for _ in range(maxLengthDeco)]

decoderOutputs, states = tf.nn.seq2seq.embedding_attention_seq2seq(
    self.encoderInputs,
    self.decoderInputs,
    encoDecoCell,
    self.textData.getVocabularySize(),
    self.textData.getVocabularySize(),
    embedding_size=self.args.embeddingSize,
    output_projection=None,
    feed_previous=bool(test)
)

@ebrevdo might have some ideas.

I think @lukaszkaiser knows more about what's going on in the seq2seq code.

@lukaszkaiser Actually the original code is like this:
    with tf.device(getDevice()):
        model = Model(args, textData)

    writer = tf.train.SummaryWriter(_getSummaryName())
    saver = tf.train.Saver(max_to_keep=200)  # Arbitrary limit ?

    sess = tf.Session()  # TODO: Replace all sess by sess (not necessary a good idea) ?

    embedding_key_0 = 'embedding_rnn_seq2seq/RNN/EmbeddingWrapper/embedding:0'
    embedding_key_1 = 'embedding_rnn_seq2seq/embedding_rnn_decoder/embedding:0'

    var_list = []
    embedding_list = []
    cnt = 0
    for v in tf.all_variables():
        print(v.name)
        if v.name != embedding_key_0 and v.name != embedding_key_1:
            cnt += 1
            var_list.append(v)
        else:
            cnt += 1
            embedding_list.append(v)
    print(cnt)
    print('Initialize variables...')

    sess.run(tf.initialize_all_variables())

    print('embedding_0 shape')
    print(embedding_list[0].get_shape())
    print('embedding_1 shape')
    print(embedding_list[1].get_shape())

    print('initializing embeddings from pre-trained word embeddings')
    embed = loadEmbeddings()
    embed = np.asarray(embed).reshape([vocab_size, 300])

    assign_op_0 = tf.assign(embedding_list[0], embed)
    assign_op_1 = tf.assign(embedding_list[1], embed)

    sess.run(assign_op_0)
    sess.run(assign_op_1)

The code in my first post is part of the Model function in the second line. I rewrite the embeddings with pretrained word embeddings.

It looks like you're calling get_shape() on a tuple -- it's not supposed to have a shape, as it's a tuple. You can get all its elements and their shapes by iterating. I'm closing it as it looks fine, but please -- let me know if there is another problem or if get_shape() is called from some library function (it shouldn't).

@lukaszkaiser I am facing the same problem. I have same specification as the previous one. My code is
Final_dataset.csv contains 456 X 147457
`train = pd.read_csv('Final_dataset.csv')
 x = tf.placeholder(tf.float32, shape=[None, 128*128*3])
 y_ = tf.placeholder(tf.float32, shape=[None, 128*256*3])
 W = tf.Variable(tf.zeros([128*128*3,128*256*3]))
 b = tf.Variable(tf.zeros([128*256*3]))`

Whenever I run below command
sess.run(tf.global_variables_initializer())
I am getting this error
`W tensorflow/core/framework/op_kernel.cc:965] Invalid argument: Cannot parse tensor from proto:    dtype: DT_FLOAT
  tensor_shape {
      dim {
         size: 49152
      }
      dim {
         size: 98304
      }
  }
  float_val: 0

  E tensorflow/core/common_runtime/executor.cc:390] Executor failed to create kernel. Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
  tensor_shape {
     dim {
        size: 49152
     }
    dim {
        size: 98304
    }
 }
float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
   Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
     File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
    File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
   File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
 tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOAT
 tensor_shape {
   dim {
      size: 49152
    }
    dim {
        size: 98304
    }
 }
  float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Caused by op u'zeros_2', defined at:
File "<stdin>", line 1, in <module>
File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1437, in zeros
output = constant(zero, shape=shape, dtype=dtype, name=name)
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 169, in constant
attrs={"value": tensor_value, "dtype": dtype_value}, name=name).outputs[0]
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
 dim {
    size: 49152
 }
 dim {
   size: 98304
 }
 }
 float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

`

Sorry, this looks like an unrelated problem with data reading and parsing.

@lukaszkaiser but if you clearly see the error then it is the same error

Right - but we solved the underlying cause of that previous problem, which was related to seq2seq and state_is_tuple -- that's what this bug is about. The 5 lines of code you've shown that generate your problem are definitely not related to seq2seq. Maybe you just have some wrong sizes somewhere.


Error: Angular could not be found on the page http://localhost:9999

Shutting down selenium standalone server.
/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1542
throw error;
^
Error: Angular could not be found on the page http://localhost:9999/# : retries looking for angular exceeded
at assertAngularOnPage (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/lib/protractor.js:516:13)
at /media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1438:20)
at notify (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)
at fulfill (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:402:7)
at Object.webdriver.promise.asap (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:672:5)
at webdriver.promise.ControlFlow.runInNewFrame_ (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1449:25)
at notify (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:328:12)
at notifyAll (/media/Work/Projects/angularjs-seed-repo/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:297:7)

Hi! I have the same issue. Did you fixed it?

I also have the same issue. Did anyone got it fixed please ?

Hello. That page did not contain Angular. Does your page contains angular?

Thanks I got it.
above error got fixed by adding browser.ignoreSynchronization = true;

yes)
On Wed, Feb 22, 2017 at 5:14 PM, bvsunil6686<EMAIL_ADDRESS>wrote:

Thanks I got it.
above error got fixed by adding browser.ignoreSynchronization = true;
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/protractor/issues/384#issuecomment-281697768,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHw8bJTLVacXZQw3M3ni5_fy1M5f8w-yks5rfFDtgaJpZM4BW1rB
.


Add link to "Join our Group on GitHub" issue in organization

Link is here: https://github.com/opensourcedesign/organization/issues/29

@simonv3 Where do we need to add this link?

How about right underneath "read more about our goals".
@Shruti9520 do you think there's a good place for it that I might be missing?

@simonv3 That would be great.
Can I fix it?

@Shruti9520 Please do!

@simonv3 The two paragraphs above it is also not aligned properly. Can I fix them too?

@Shruti9520 no need to ask for my permission if you see something broken :)

Or for anything really.

@simonv3 PR#75

@simonv3 Here is the screenshot--( aligned paragraph and added link)

@simonv3 Here is the screenshot--(updated footer)

@Shruti9520 looks great! Can you capitalize GitHub so that it's in line with their brand? The H is a capital.

@simonv3 Sure :)

@simonv3  PR#76

Awesome. Merged!

Seems fixed. Closing.


Fix type imports.

TS2691: An import path cannot end with a '.d.ts' extension.
Fixes: #7048

Sorry, but removing extensions makes it broken for me in TS v5

Now I tested in TypeScript v5 too. And removing the d.ts works in v5 and below. It's also not listed as breaking change. I doubt it, otherwise 99.99% of packages with types won't work. Sorry, I just want to understand... Can you provide an example please?

When setting moduleResolution to nodenext and disabling skipLibCheck


[NEW FEATURE] rounded snr

From Jarvis 2016 (DES SV shapes) "For NGMIX... we find significantly smaller selection biases when we use(S/N )r to select galaxies for shear measurement, as compared to using (S/N )w ."
This is because "if the PSF is approximately round, as is the case for our data, then more elliptical galaxies will have a lower estimated (S/N )w than round galaxies (holding flux constant). Thus if galaxies are selected according to their measured (S/N )w , the resulting galaxy catalogue will have a selection bias towards round shapes, which will bias the overall mean shear.
One null test we can do is plot  vs snr
How to calculate snr_r

calculate round r50 Question: should we use T_r to get r50? Judging from this quote we do: "That is, we take the model of the galaxy profile and apply a shear such that its ellipticity becomes zero. We do the same for the PSF, convolve these two profiles together, and then integrate over the pixels. "
use the round r50 and [draw a new galaxy](in erin sheldon's ngmix code ngmix/fitting/galsim_results.py) with chosen model (gaussian, esponential, etc).  see calc_s2n_r(self, pars) (in k space).  Question: what do we do about the weights? from the code, it looks like we keep them the same.  do we alter the psf?

also, DES uses this S/N estimator:
sum(I)/sqrt( sum( 1/w ) ) = Isum/sqrt(Vsum)
    Isum: float
        The value sum(I).
    Vsum: float
        The value sum(1/w)
    Npix: int
        The number of non-zero-weight pixels.

ah- i'm being very silly.  ngmix is a dependency, so we should just use the very ngmix functions I am citing to calculate this

interestingly, the snr being produced by the output catalog is actually snr_r for both versions of ngmix.  so we should also be outputting the regular snr


Rework running Fence Agent command

Replace MockExecuter with mock fence_ipmilan script
Rework Fence Agent runner
Fix some typos

TODO

[x] replace fence_ipmilan mock with software mock of exec.Command only
[x] add fence agent failure case to updateConditions
[x] use updateConditions in executor
[x] split change in smaller chunks

/test

/test 4.15-openshift-e2e

Working on a different approach for testing, so you might want to wait before reviewing this PR

/test 4.14-openshift-e2e

Working on a different approach for testing, so you might want to wait before reviewing this PR

Might want to add a [WIP] suffix on the PR until ready for review

/test 4.14-openshift-e2e

/test 4.14-openshift-e2e

/retest

/test 4.14-openshift-e2e

/retest

/retest

/retest

/lgtm

/hold
waiting for @mshitrit feedback on his change request

/retest

/retest

/lgtm

I'm unholding this PR since only contain Nits and it has an E2E fix which is relevant for other PRs.
As @clobrano mentioned in case needed it can be addressed in followup PR.
/unhold


MERC-1560 Updating rating to links instead of select list options.

Do not merge
Currently we are showing ratings facets as select list but it works more like radio buttons. So this will help move it away from select list options & use it as single select links.
Before

After

ping @mcampa @bc-ranji @bc-julianleong

test are failing. you need to use a class for styling instead

@mcampa test have been fixed. Can you give this one a quick pass ?

👍 LGTM

💚


Implement url/view/template for menu

Implement url/view/template for menu in the foods app.
name the url menu (this means the template must also be named to menu)
The menu look similar to category list but it will show all food a category contains below the category name.
The context to be sent to the template:  {"categories": QUERYSET_OF_ALL_CATEGORIES}

completed in #83


Continue fix + test for "Cannot read property 'startsWith' of undefined"

Fixes #79 & fixes #69
This builds on top of #80 - using the fix from that commit (with credit to the original author) + adding a test, as requested by @christophehurpeau.
We've gotten a report on symfony/weback-encore#445 of this exact issue. We would love to have it fixed - the error is really hard to debug.
Cheers!

Hi,
I am facing the same error. Would be grateful for a timely release! Thanks in advance

A workaround in the meantime?

Hi!
I have been stuck with this error for 2 hours. I have realized that I was including a .png with a require and that require was not pointing to anything... I fixed the require making it point to the right path and the error dissappeared.
Hope this helps someone :)

FYI I've forked and published this package as https://www.npmjs.com/package/@soda/friendly-errors-webpack-plugin

@timneutkens, is there an estimated date for the release containing this fix? Thank you in advance.

We no longer use friendly-errors-webpack-plugin in Next.js so I'm not comfortable shipping new versions that could potentially break. I've added @christophehurpeau on the npm package as admin as he's been maintaining this project for a long time.


📝 Update console output with Click 8 messages

PR https://github.com/tiangolo/typer/pull/760 removed Click 7 support, and accordingly removed the Click 7 console messages from the unit tests (e.g. see here). This PR updates all the log messages in the documentation to the Click 8 variants as well.

Amazing, thank you! :rocket: :memo:


Make service_account_info on the GcpCredentials block a SecretStr type

Currently, the value is not a secret string and can be viewed in plain text from the UI:

if that's intended, please close the issue

I think we're planning for a SecretDict type, but in the meantime, we can make it a SecretStr type.
https://github.com/PrefectHQ/prefect/issues/6735

interesting, so that would be essentially a custom data type that is a combination of an arbitrary number of str-SecretStr KV pairs? I wonder if nobody asked about it in the Pydantic repo before, perhaps worth contributing to pydantic?

SecretStr as a fix for now would be great! 👍


Rdh compute rectangles for svg

This pull request is Finalized
Related issue(s) and/or pull request(s)
See #340
Test cases, sample files
Additional information
In some cases, the book may have an image which is surrounded by a svg tag like this: <svg:svg ....><svg:image ....></svg:image></svg:svg>  In this case, the containing svg must be used to find the client rectangles.  Some epub books have a cover page which is structured like this; with no other content. Without this change, it appears to readium that there is no visible content on the page, because it can't find the first visible cfi.

Looks good to me. Could you please update the readium-cfi-js repository (as per the latest commit in the develop branch), so that the conflict is resolved? Thanks!

Let's create / find an EPUB sample to reproduce the associated issue, and let's merge this PR.

@rkwright

I'm ok with merging this, not sure about the submodule ref update though.

The cfi_navigation_logic.js is in conflict, so we might need to cherry-pick the code change manually (it is quite straight-forward). If so, let's remember to cross-reference this PR and credit @kimtuck for the fix.


Added changes for Minorgridlines properties

Updated axis.py to provide access to the properties of the minor gridlines.

Added Changes for MinorGridLines to the charts

This change will provide access to the properties of the minor gridlines.


Add a Pulse module, so we can just open Pulse

Any opinion on this? I like the conciseness. Can it cause any issue?

Looks good to me!


idea: Better CLI -h grouping

Problem Statement
I can see why Gab was confused here: #1329
@vansangpfiev
Can we use the groupings @dan-homebrew /I orginally suggested? 🙏
Current

Not super accurate bc chat should technically also be under "inference"
System doesn't really mean anything

Common Commands:
  pull                        Download a model by URL (or HuggingFace ID) See built-in models: https://huggingface.co/cortexso
  run                         Shortcut to start a model and chat
  chat                        Send a chat completion request

Inference:
  embeddings                  Creates an embedding vector representing the input text

Models:
  models                      Subcommands for managing models

Engines:
  engines                     Subcommands for managing engines

System:
  start                       Start the API server
  stop                        Stop the API server
  ps                          Show running models and their status
  update                      Update cortex version

Feature Idea
Common Commands:
  pull                        Download a model by URL (or HuggingFace ID). See built-in models: https://huggingface.co/cortexso
  run                         Shortcut to start the server, load in a model and open an interactive chat shell.
  update                   Update cortex version

Subcommands:
  chat                           Send a chat completion request
  embeddings             Create a vector embedding
  models                      Subcommands for managing models
  engines                     Subcommands for managing engines

Server:
  start                       Start the API server
  stop                        Stop the API server
  ps                           Show running models and their status

I followed this ticket https://github.com/janhq/cortex.cpp/issues/1231.
But sure, will change as above suggestion.

Completed in v1.0.0 release


allow to change default bbb_webrtc_sfu_multikurento value without copy&paste

Ansible doesn't allow something like
x=100 #defaults/main.yml

x=x+1 #groupvars/bbb-conf.yml

or rather
bbb_webrtc_sfu_multikurento: [default value]
bbb_webrtc_sfu_multikurento: "{{ bbb_webrtc_sfu_multikurento | combine({'conference-media-specs':{'OPUS':{'maxaveragebitrate': '64000'}}})  }}"

because it references a variable that is being defined at that time. This results in an error recursive loop detected in template string.
To make something like this work, I put the variable default value to an underscore-variable first and define the regular variable from that. I.e.
_x=100 #defaults/main.yml
x=_x   #defaults/main.yml

x=_x+1 #groupvars/bbb-conf.yml

Now I can use
bbb_webrtc_sfu_multikurento: "{{ _bbb_webrtc_sfu_multikurento | combine({'conference-media-specs':{'OPUS':{'maxaveragebitrate': '64000'}}})  }}"

in my group_vars to modify the original defaults without copy&paste...

I don't know where exactly I'd put a description of this - but I'll try to add something in README.md

I don't know where exactly I'd put a description of this - but I'll try to add something in README.md EDIT: I see that bbb_webrtc_sfu_multikurento isn't documented at all yet... Should it be? Is it something people need to be made aware of? Or is it something for those of us that pretend to know what they are doing grin ?

True!

I've added a paragraph in README and renamed the "internal" variable from _... to ..._default to signify that one is allowed to work with that variable after discussion with @defnull .


Added the add icon to the multiselect search dropdown

coveo-styleguide update will be needed before merging this (https://github.com/coveo/vapor/pull/456)

Codecov Report

Merging #509 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #509   +/-   ##
=======================================
  Coverage   99.75%   99.75%
=======================================
  Files         213      213
  Lines        5210     5210
  Branches     1220     1220
=======================================
  Hits         5197     5197
  Misses         13       13

Impacted Files
Coverage Δ

...rch/MultiSelectDropdownSearch/MultiSelectInput.tsx
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


CRM

Customer

Create Customer

Customer Group

Create Customer Group

Project
Create a Project

Campaigns

Create Campaigns

Under customers the customers do not get deleted when you hit the delete button. The delete button disappeared instead. However, if you create a customer group and delete a customer from a group, they indeed get deleted from that group.


Add option to specify a Pod's PriorityClass

I had to manually hardcode a priorityClassName in the code, as our cluster otherwise preempts the Pod during the rsync process.
It would be great if you could add an option to set that, or maybe even better: allow to specify a YAML template with all the bells and whistles that a Pod needs (labels, annotations, etc.) to be deployed successfully.

Supplying a pod template makes sense to not require a dozen features, but is there a good way to do that from the CLI?
passing in json/yaml is what I can think of, and that kind of sucks

I guess providing a YAML template trumps any other arguments one could wish for when creating a Pod, so i'd very much prefer that - also because i noticed a couple of labels and annotations that would be required to make a Pod a good citizen in our clusters. ;-)
Maybe this is of help? https://medium.com/@harshjniitr/reading-and-writing-k8s-resource-as-yaml-in-golang-81dc8c7ea800

That does make sense!


hotfix/proper-service-initialization-2

Pull request type
Please check the type of change your PR introduces:

[X] Refactoring (no functional changes, no api changes)

What is the new behavior?
Improved logging of the tcp service creation.

GH actions did not work properly


Allow connecting the database in docker image from the other host

We cannot connect to pipelinedb/pipelinedb:0.9.7 from the other host.
$ docker run -i -d -p 5432:5432 pipelinedb/pipelinedb:0.9.7
$ psql -h <IP_ADDRESS> -p 5432 -U pipeline
psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

After this PR is merged, listen_addresses will be set "all", like this.
listen_addresses = '*'
#listen_addresses = 'localhost'         # what IP address(es) to listen on;

Thanks @innossh!


STORM-1756: Explicitly null KafkaServer reference in KafkaTestBroker …

…to prevent out of memory on large test classes.
I'm not clear on whether JUnit keeps the reference for the lifetime of the module test, or whether they're released after all tests in a class have run. Either way, a test class with a KafkaTestBroker field and many tests would likely still run out of memory.

Hi, @srdo
Since I didn't see any OOMEs, I'm curious that it is based on assumption or you could provide scenario to reproduce.

@HeartSaVioR I saw OOME on one of my branches, because each KafkaServerStartable allocates a 130MB byte array for the log cleaner thread. A heap dump showed that there were 8 of these in memory at the time of the exception. I was going off of http://junit.org/junit4/faq.html#atests_18 to explain it, but I can't reproduce it now. I'll close this.

If this turns out to be a problem later, disabling the log cleaner thread during tests is probably a better fix. The tests don't make logs long enough to be compacted anyway.

Please reopen this issue if you saw intermittent test failure. What I asked is that it's a theory or it occurred some issues.

I did see OOME due to KafkaServer resources. 8x 130MB byte arrays caused the VM to run out of memory. As I said, I can't reproduce it. It's probably not an issue on master when storm-kafka gets downgraded to <IP_ADDRESS> (here https://github.com/apache/storm/pull/1386), since one of the changes in Kafka <IP_ADDRESS> was to enable the log cleaner thread by default (and thus allocate some very large byte arrays when starting a server).

+1. It doesn't hurt though we downgrade kafka version for storm-kafka to 0.8.x.


fix: dark mode background and text contrast on conference page.

Fixes #242
Fixes fix to #234

Reinstate dark mode.
Fix text contrast on links above conference table.

@all-contributors please add @keithnewman for code and bug

@all-contributors please add @StatsRhian for pull request reviewing

@all-contributors please add @StatsRhian review


chore: prep 1.17.0 release

/deploy #persist

You can access the deployment of this PR at https://renku-ci-nb-1559.dev.renku.ch


Finally got a (very basic) test working!

Also edited the README, cleaned up the folder structure of library, and removed the CxxTest source code from our repository.

can you merge master back into this branch first.

Should be good now--ignore the docs directory commit I accidentally included here, that was sloppy of me, but I'm too tired to fix it right now.

I finally had a chance to look at the preliminary simulation data @HungryJoe sent me re: this PR. The test doesn't yield the correct results, but it's a starting place.
I think I've narrowed down where the issue is happening. In BasicSim, it looks like you only calculate the propagator once and use the same one each timestep. What's weird is that I don't even get the same propagator as Sam did, even for the first timestep.
Sam's Propagator:
(0.915226,-0.40294)  (0.975807,-0.285858) (0.875312,-0.572584)
(0.943799,-0.276481) (0.984494,-0.175415) (0.936262,-0.444864)
(0.800086,-0.523375) (0.871354,-0.414024) (0.763055,-0.646334)

My Propagator:
[ 9.99970447e-01+0.00414714j, -1.88106063e-04+0.00284917j, -4.87948518e-04+0.00578929j],
[ 1.45406546e-04+0.00285007j,  9.99984469e-01+0.00176321j, -3.87012454e-04+0.00443384j],
[ 4.10634137e-04+0.00579607j,  3.31436251e-04+0.00443731j,  9.99948525e-01+0.00702746j]


CUDA error (flash-attention/hopper/flash_fwd_launch_template.h:111): invalid argument

FA3 giving this error when passing just q, k, v to flash_attn_func

I cannot find MHA example for FA3. for FA3, packed qkv function is perhaps missing. Also, how to use dropout in flash_attn_func in site-packages/flashattn_hopper-3.0.0b1-py3.10-linux-x86_64.egg/flash_attn_interface.py ?


Fixed #28289 -- Fixed raw sql annotations with QuerySet methods on inherited model fields.

Ticket : #28289

Thanks @felixxm, I've changed it as your comments.


replace test-e2e makefile logic

@dmage @legionus fyi, i'm going to update our ci job to invoke this instead so we don't have to touch the release repo when we want to change our e2e invocation logic.

replacing with https://github.com/openshift/cluster-image-registry-operator/pull/62


Re-Re-Land "Refactor StrokeAlign to allow double values." (#109805)" (#109955)"

This tries to revert https://github.com/flutter/flutter/pull/109955 which is also followed by b/243217872.
This might fix the mysterious issue that is happening. Hopefully, someone can trigger Google Testing on this PR.
I'm trying two things if (width == 0.0) break; in a commit, if (width == 0.0) drawRRect (the previous code) in another. First we test the drawRRect, if it works, we try without drawRRect and see if it keeps passing. If nothing works, I'll close this PR and wait for the smart people to debug the issue.
(this is kind of a draft, but I didn't find the button and I need the internal test)

Super-seeded by another PR.


handle disposed nodes in visual tree.

What does the pull request do?
Potential fix for UI freeze in 0.9 preview release.
Somehow we get disposed visual nodes remaining in the visual tree.
This fix means that the disposed nodes will be skipped, and not cloned on the next pass, so it self corrects/
What is the current behavior?
This causes exceptions and renderer freezes remaining in constant loop.
What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

[ ] Added unit tests (if possible)?
[ ] Added XML documentation to any related classes?
[ ] Consider submitting a PR to https://github.com/AvaloniaUI/Avaloniaui.net with user documentation

Breaking changes

Fixed issues
Fixes #3115

Closing this as #3118 should have the correct fix.


QML: Add declarative API for awaiting a task

This is a proposal for a bit nicer API for awaiting. In exchange for being a bit heavier, it allows declarative usage.

Oooo, that is super-clever! I love it!
Do you think there's a use-case for an optional default "awaiting" value?
e.g.:
Label {
    text: api.name().await("Loading name...").value
}

Where the value of the value property would be "Loading ..." until the async task actually finishes and provides an actual value?

Do you think there's a use-case for an optional default "awaiting" value?

That looks like a very good idea!


Update funimation.py

I think not having FUNimationID in the format code would be better for automation purposes, scripts and such.

How is this better for automation purposes?
With this patch it's impossible to distinguish between ENG/JPN formats:
[info] Available formats for 31128:
format code  extension  resolution note
http-480p-0  mp4        480p       1500k
http-480p-1  mp4        480p       1500k  (best)

With master:
[info] Available formats for 31128:
format code           extension  resolution note
HSNJPN0001-http-480p  mp4        480p       1500k
HSNENG0001-http-480p  mp4        480p       1500k  (best)

I haven't thought of that.
With every episode having a different format name, it was hard to create an automated command to download and watch 720p (for example) without asking for formats first. I wrote a little script on my end to solve this.
By the way, that language codes aren't always correct, don't depend on them to select the right language.


[Payment sheet] Google Pay not showing when setupIntentClientSecret provided

Describe the bug
When initializing the payment sheet on Android with a setupIntentClientSecret instead of a paymentIntentClientSecret, Google Pay does not appear on the Payment Sheet. When a paymentIntentClientSecret is provided, Google Pay does appear on the Payment Sheet. I have confirmed that I am correctly providing a Setup Intent and Payment Intent to their respective fields.
To Reproduce
  const onSubscribePressAndroid = async () => {
    const res = await functions().httpsCallable('getStripeSecret')({});
    if (res.data.errorCode) {
      console.log(res.data.errorCode);
      return;
    }

    const secret = res.data.setupIntentSecret;

    let {error} = await initPaymentSheet({
      setupIntentClientSecret: secret, //providing a Payment Intent to paymentIntentSecret makes Google Pay appear on the payment sheet
      googlePay: true,
      merchantCountryCode: 'US',
      merchantDisplayName: 'Quo Finance',
      testEnv: true,
    });

    if (error) {
      console.log({error});
      return;
    }

    await sleep(1000);

    try {
      ({error} = await presentPaymentSheet({
        clientSecret: secret,
      }));
    } catch (e) {
      console.log({e});
      updateLoading(false);
      return;
    }

    if (error) {
      console.log({error});
      return;
    }
  };

Expected behavior
I would expect Google Pay to appear on the Payment Sheet regardless of whether or not a Setup Intent or Payment Intent is provided.
Screenshots
With Payment Intent provided:

With Setup Intent provided:

Desktop (please complete the following information):

OS: macOS Big Sur
Version 11.2.3

Smartphone (please complete the following information):

Device: Galaxy S10
OS: Android

I'm able to reproduce this. Will check with the team.

This is currently not supported in stripe-android. We will need for a new release of the stripe-android SDK to ship this functionality.

@thorsten-stripe Is it supported now? @trex-quo Currently I've made two separated buttons.
@Mfrizzy FYI

This was fixed in stripe-android a while ago, and we've since integrated that version into stripe-react-native, so I'm going to close this issue


Orientation attribute not working

I am trying to set up orientation attribute but it is ignored and placement is always default. Tried data-date-orientation="bottom auto" and data-orientation="bottom auto" and none of these is working.

Not working for me neither, when i put orientation top auto it put in the inverse form

Not working for me either.

This still seems to be broken in the demo.

Same as @kshipp, the orientation it's backwards.

Its been a while, there has been no update on this issue. anyway thanks  @kshipp ,it was a tricky thing to be identified.

You're welcome.  Sometimes the easy things are the hardest to find.

Even though I read the docs and it states:

“orientation” refers to the location of the picker popup’s “anchor”; you can also think of it as the location of the trigger element (input, component, etc) relative to the picker.

I think that orientation of the displayed calendar instead of the anchor would be more natural

seems to be fixed with f08ad04, closing.


⚠ LEGO (abakus backend) has degraded performance

In e626bea, LEGO (abakus backend) (https://lego.abakus.no/health) experienced degraded performance:

HTTP code: 200
Response time: 7211 ms

Resolved: LEGO (abakus backend) performance has improved in d34e173 after 7 minutes.


Fixed Typo and Removed Vue Component Methods' Fat Arrow Syntax

Vue component methods are intended to be bound to the instance of the component when called, using the fat arrow function syntax causes this to be undefined after the ES6 is compiled back down to plain old JS.
Also fixed a typo: emement to element.

@Elhebert are you able to review this? You're probably the best candidate for this.

@rnicholus I'll check this out. Sorry for the delay, been very busy, and seems like Github doesn't want to notify me in due time 😆
@dp88 Thanks for that, I'll merge this !


Default values not validated

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I am not sure if this is a bug, a feature request or even a security vulnerability. I made a tiny syntax mistake in specifying a default value in a schema and Pydantic silently placed a tuple in a field designated in the schema as int! This seems to be an architectural issue as it indicates that default values generally are not validated. It seems to me that they should be.
Example Code
from pydantic import BaseModel
from pydantic.version import version_info

class Command(BaseModel):
    chan: int = 0,
    val: int = 0

validated = Command(val = 3)

print(validated.chan, type(validated.chan), validated.val, type(validated.val))
print(version_info())

Python, Pydantic & OS Version
(0,) <class 'tuple'> 3 <class 'int'>
             pydantic version: 2.7.1
        pydantic-core version: 2.18.2
          pydantic-core build: profile=release pgo=false
                 install path: /home/pi/blinka/lib/python3.11/site-packages/pydantic
               python version: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
                     platform: Linux-6.6.20+rpt-rpi-v8-aarch64-with-glibc2.36
             related packages: fastapi-0.110.2 typing_extensions-4.11.0
                       commit: unknown

You are looking for https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict.validate_default

Sharing one more reference from the doc: https://docs.pydantic.dev/2.7/concepts/fields/#validate-default-values

Thanks guys, but this ought to work?
from pydantic import BaseModel, ConfigDict, with_config
from pydantic.version import version_info

@with_config(ConfigDict(validate_default=True))
class Command(BaseModel):
    chan: int = 0,
    val: int = 0

validated = Command(val = 3)

print(validated.chan, type(validated.chan), validated.val, type(validated.val))
print(version_info())

No change from before, no warning that I've done anything wrong.
from pydantic import BaseModel, ConfigDict
from pydantic.version import version_info

class Command(BaseModel):
    model_config = ConfigDict(validate_default=True)
    chan: int = 0,
    val: int = 0

validated = Command(val = 3)

print(validated.chan, type(validated.chan), validated.val, type(validated.val))
print(version_info())

This works.
from pydantic import BaseModel, ConfigDict
from pydantic.version import version_info

class MyBaseModel(BaseModel):
    model_config = ConfigDict(validate_default=True)

class Command(MyBaseModel):
    chan: int = 0,
    val: int = 0

validated = Command(val = 3)

print(validated.chan, type(validated.chan), validated.val, type(validated.val))
print(version_info())

This also works and seems cleaner, particularly if there is more than one schema to modify.
But I have to say I'm not impressed. This behavior ought to be the default, with the ability to switch it off, and the documentation should be a lot clearer. Also the validation error message is not very clear. It does not mention that it is validation of a default that has failed, or the name of the specific defaulting field.

No change from before, no warning that I've done anything wrong.

with_config was added explicitly for dataclasses and TypedDict (see the docstring and the related usage docs. However, I agree we should either:

Support using the decorator on Pydantic models (not sure this is easily doable)
raise a runtime error if the decorator is used on a Pydantic model

I'll open an issue to work on this.

This behavior ought to be the default, with the ability to switch it off

I don't know if there was a specific reason to have them not validated by default, but this can't be changed now for backwards compatibility reasons.

the documentation should be a lot clearer.

What part of the documentation do you find unclear? It does state the current behavior.

Also the validation error message is not very clear. It does not mention that it is validation of a default that has failed, or the name of the specific defaulting field.

Seems like a reasonable FR.

I don't know if there was a specific reason to have them not validated by default, but this can't be changed now for backwards compatibility reasons.

What part of the documentation do you find unclear?

Look at "A Simple Example" in the Github readme: this has defaults in the decorator and the 'name' field is actually defaulted in the validation. There is no indication that this is not validated, or how to fix it. This problem percolates right through the ecosystem in many starter tutorials, YouTube videos and documentation for other libraries and frameworks which use Pydantic. I came to it through FastAPI and only was aware because I made a typo in my code. Otherwise I had no reason to 'go down this rabbit hole'.
I suggest the following: Ship and promote a NewBaseModel which takes a 'safety first' approach to all validation, setting the defaults on this basis regardless of compatibility, but continue to ship the current BaseModel so existing code is not broken. This could be done using the inheritance method I've used above, but this is not ideal since assigning model_config could unexpectedly disable validation again. Ideally this should be implemented 'under the hood' so the defaults with no model_config are changed.

Seems like a reasonable FR.

I'll raise it! (Improving the validation error message)
Thanks for your answers on the other aspects of this matter which seems like a good way forward.

It honestly takes 5 minutes of reading in the Concepts docs page (which people usually read first when discovering Pydantic) to come across the section about opt-in validation of default values. Maybe a quick note can be added here, but I don't see what more can be done.
I'll also note that a type checker would have immediately caught the typo:

This may be why validate_default does not default to True, as most of the time (unless maybe when using default_factory) the error is easily reported by a type checker.

I suggest the following: Ship and promote a NewBaseModel which takes a 'safety first' approach to all validation

You can open a new issue for this to catch attention from maintainers, but there's a high chance it will be rejected, as it is overly specific

You can open a new issue for this to catch attention from maintainers, but there's a high chance it will be rejected, as it is overly specific

Yea, typical coder Catch-22 response! Initial response: "Can't fix that, it would break existing code". I suggest a way of doing it that does not break existing code. "Won't do that it is overly specific." 'Overly specific' = 'not invented here'!

Well yeah introducing a NewBaseModel just to tweak a configuration value is not a viable solution when you can use a two lines workaround as you proposed [^1].
Looking at the previous duplicate issues, it seems to be disabled by default because of performance reasons. I'm wondering if with the v2 performance improvements this would still be an issue.

While I agree the default behavior of not validating default values is debatable, I don't think introducing a NewBaseModel is the good way to go: what if someone requests the default value of another setting (say extra, currently defaulting to "ignore") to change; should we create another base model as well?
Maybe this could be considered as a breaking change in V3 and the default value should simply change to True, but considering:

type checkers can easily catch the issue
there's a simple workaround by defining a custom base model with your configuration values

I unfortunately don't think this will be accepted by maintainers
[^1]:  Regarding your concern about overwriting model_config (This could be done using the inheritance method I've used above, but this is not ideal since assigning model_config could unexpectedly disable validation again.): Pydantic supports merging configurations together.

Regarding your concern about overwriting model_config (This could be done using the inheritance method I've used above, but this is not ideal since assigning model_config could unexpectedly disable validation again.): Pydantic supports merging configurations together. ↩

OK, I'd not realized this would result in both configuration dictionaries being applied (presumably in base-first order), nor that any old dict would do, it did not actually have to be a ConfigDict! Seems like a very obscurantist way of doing this though, I'd have had a config method which took VarArgs, then it would be clear the settings were 'applied' not just stored for direct use as implied by making them a property.
BUT this completely undermines any objection to Pydantic taking this approach! If it is only two lines for me, it is only two lines for them too! What I was trying to achieve is to make the simple beginners example work out of the box as a new user would reasonably expect without making it any more complex or breaking existing code.  I am a big believer in the approach of minimizing documentation by designing more intuitive software that behaves the way you expect out of the box. If I have to read all the documentation for all the dependencies of every library I use it completely undermines the case for using libraries at all, it would be quicker just to write the bits I need myself!

I'd have had a config method which took VarArgs, then it would be clear the settings were 'applied' not just stored for direct use as implied by making them a property.

What is the API you have in mind? I'm not sure I understand a config method which took VarArgs, but I'm interested to know :)

Seems like a very obscurantist way of doing this though

Pydantic is doing a lot internally to handle config, and it does not only rely on a simple dict (it uses a class, ConfigWrapper). Imo having a simple ConfigDict TypedDict as a public interface is great, you don't have to worry about internal details, but I do agree it can be confusing, mainly because:

the config dict is currently following the structure config_key -> config_value, but what if we ever get a nested config attribute?

class Base(BaseModel):
    model_config = {"nested_config": {"attr1": 1}}

class Sub(Base):
    model_config = {"nested_config": {"attr2": 2}}

# How is it merged? Is Sub.model_config ==
# - {"nested_config": {"attr1": 1}}
# - {"nested_config": {"attr2": 2}}
# - {"nested_config": {"attr1": 1, "attr2: 2}}?

There's currently no API to inspect the "merged" configuration of a model, i.e.:

class Base(BaseModel):
    model_config = {"validate_default": True}

class Sub(Base):
    model_config = {"extra": "forbid"}

Sub.model_config["validate_default"]
#> True? False? KeyError?

The merging behavior doesn't seem to be documented yet?

If it is only two lines for me, it is only two lines for them too!

It's not really about how much work it requires to implement it in Pydantic, my main concern is the third paragraph from my previous comment
@sydney-runkle, what is your opinion on this? How much of a breaking change would it be validate defaults by default? (assuming the performance issues are now resolved).

What is the API you have in mind? I'm not sure I understand a config method which took VarArgs, but I'm interested to know :)

Yea, I didn't really think that through! If it was a method, where'd it get called? I guess maybe this is the best way, though as you say, it does need to be better documented, and a diagnostic function to interrogate the effective setting would also be useful.

It's not really about how much work it requires to implement it in Pydantic, my main concern is the third paragraph from my previous comment

I see the danger of proliferation, but I was thinking about it as a one-off policy change: It would be made clear that the new base might implement additional checks in future so you'd better not try to exploit any loopholes. But if you need stability or maximum performance continue to use BaseModel and we promise that anything new will be off by default.

@sydney-runkle, what is your opinion on this? How much of a breaking change would it be validate defaults by default? (assuming the https://github.com/pydantic/pydantic/issues/669#issuecomment-512040566 are now resolved).

Yeah, I think this would be a significant breaking change, definitely something we couldn't consider until at least V3. We thought through this feature pretty carefully for V2, see https://docs.pydantic.dev/latest/migration/#changes-to-validators.
Thanks @Viicos for that new PR for the with_config fix, looking now!


Beautifying a file doesn't update atom's tab setting

For example if you beautify a PHP file that was originally detected to use tabs and beautified it to PSR-2, Atom would still show as using tabs. Even once the file is saved, it's still using tabs. If you re-open the file, it will correctly detect it as using spaces.
The atom-beautify package should somehow tell atom that the file should now be formatted in 4 spaces, but it's not....
PS - I'm using the tab control package to show what Atom has detected the indentation should be for the document.

Atom-Beautify intends to beautify/format the code based on the styles configured, such as via .jsbeautifyrc file, etc. This is useful for projects with multiple files that should all have clean code that looks the same. It does not detect any style settings from the current file and instead enforces the configuration set for the entire project.

I think you possibly misinterpret the problem. Try to install the tab control package and then beautify an existing project from tabs to spaces, or vice versa - it will still show as using tabs/spaces until you close / open the file again.

The problem is that Tab Control does not update the status indicator to tabs/spaces after Atom-Beautify correctly beautifiers the code to tabs/spaces?

@Glavin001 that's correct. Maybe it's a problem with the tab control package itself? Is beautify updating atom's tab setting when it beautify s the document?

That is a Tab Control issue. 😉


Error: Invalid response mode

loopy:gitter-solid michiel$ SOLID_IDP=https://solid.community SOLID_USERNAME=solid-auth-cli-test-user SOLID_PASSWORD=123 node gitter-solid.js init solid/test-suite
Target roomm name: solid/test-suite
Logging into gitter ...
You are logged into gitter as: michielbdejong
rooms 78
Target room found: solid/test-suite
targetRoomName 1 solid/test-suite
targetRoomName 2 "solid/test-suite"
@@@@@@ undefined
Single room selected: solid/test-suite
Rooms to do: 1
Log into solid
(node:2086) UnhandledPromiseRejectionWarning: Error: Invalid response mode
    at validateResponseMode (/Users/michiel/gh/solid/gitter-solid/node_modules/@trust/oidc-rp/lib/AuthenticationResponse.js:183:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async SolidClient.createSession (/Users/michiel/gh/solid/gitter-solid/node_modules/@solid/cli/src/SolidClient.js:53:21)
    at async SolidClient.login (/Users/michiel/gh/solid/gitter-solid/node_modules/@solid/cli/src/SolidClient.js:31:17)
    at async Object.login (/Users/michiel/gh/solid/gitter-solid/node_modules/solid-auth-cli/src/index.js:69:19)
    at async loadConfig (/Users/michiel/gh/solid/gitter-solid/gitter-solid.js:619:17)
    at async go (/Users/michiel/gh/solid/gitter-solid/gitter-solid.js:787:18)
(node:2086) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2086) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This is most likely an issue with solid-auth-cli, investigating.

I'll see if i can fix this using solid-auth-fetcher


CIC deployment: guest systems don't have VLAN configuration if needed

There is no VLAN configuration on the NICDEF statements in the CIC guests' directory entries.  If the VSwitch is defined as VLAN Aware, the CIC guests will have no connectivity.

The reason this happens is that the VSW1 VSwitch is defined with no default VLAN.  The guests that Bruce manages at RESTORESYS time have appropriate VLAN keywords added to their NICDEFs, but the VLAN is not exported anywhere to be (easily) picked up by automation in the ELAN.  Even a Q VSWITCH VSW1 doesn't show it, without doing either DETAILS or USER x (where x will be either TCPIP or LXOCPB01) to see an existing setting.

Bruce will be passing VLAN in the ZVMIP.CONF.


update install of ipython

In setup.py (here), we should update to ipython[notebook].

I don't think we should add the notebook as a requirement because scikit-bio doesn't depend on it and it's a fairly heavyweight dependency.


Add templates autocompletion

So... zsh autocompletion generator doesn't work due to https://github.com/spf13/cobra/issues/107


Medical Data Storage Solutions

I would like to have a full detailed architecture about the above.
I want to build a solution for my local hospital

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7f5f1109-6e79-d75f-44a6-c573e214e351
Version Independent ID: a63bdc30-afca-f42a-591b-2c4c2abfc025
Content: Medical Data Storage Solutions - Azure Solution Ideas
Content Source: docs/solution-ideas/articles/security-compliance-blueprint-hippa-hitrust-health-data-ai.md
Service: architecture-center
GitHub Login: @adamboeglin
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#177470

@keithkambanje There is already an internal work item created for this. So for now I will proceed with closure of this and If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


[BEAM-4602][BEAM-4598] Datetime type comparison

Support datetime type in comparison expression
Test datetime type comparison at the DSL level
R: @kennknowles @XuMingmin
cc: @akedin @apilloud @amaliujia

Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.

On Mon, Jun 25, 2018, 11:53 XuMingmin<EMAIL_ADDRESS>wrote:

@XuMingmin approved this pull request.
LGTM
@vectorijk https://github.com/vectorijk can you fix the conflict then I
can merge it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/beam/pull/5749#pullrequestreview-131738856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQu6XkuOUmLSM3FEyuSGQhq-E9oVP8zks5uATGUgaJpZM4U1VeX
.

There are three commits but I think it should probably just be one.

rebased it.


Performance enhancement related to single WebP and animated WebP decoding...

+[UIImage shouldDecodeImage] add check whether current CGImageRef is created with CGImageCreate bitmap in WebP to ignore decoded again, this may reduce memory peak for single WebP
add @autoreleasepool for animated WebP decoding do-while loop to reduce memory peak
change CGColorSpaceCreateDeviceRGB inner SD to shared colorSpace to enhance performance

New Pull Request Checklist

[x] I have read and understood the CONTRIBUTING guide

[x] I have read the Documentation

[x] I have searched for a similar pull request in the project and found none

[x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

[x] I have added the required tests to prove the fix/feature I am adding

[x] I have updated the documentation (if necessary): There is an SDCGColorSpaceGetDeviceRGB global function to get the shared colorSpace but it's used for public API

[x] I have run the tests and they pass

[x] I have run the lint and it passes (pod lib lint): This time I check and it passed

This merge request fixes / reffers to the following issues: #1885 #1889
Pull Request Description
This Pull request is an performance enhancement. Including 3 small changes:

For single WebP images, previous when called with [SDImageCache diskImageForKey]shouldDecompressImages ON(default), it will try decoded image before set to UIImageView. For WebP images, it's not created with ImageIO but with CGImageCreate with the raw bitmap data, which means it already been decoded. But+[UIImage shouldDecodeImage]` return YES for this situation and will decoded again. It cause extra CPU and memory usage.
For animated WebP images, during libwebp decoding, there is an do-while loop to create each frame image. This may cause an memory peak and  place an autoreleasepool here is better.
There are two other method directly call CGColorSpaceCreateDeviceRGB to create device color space. This may happen multiple times and the value is not changed for specify device. So it can be optimize with shared instance. Moreover, we can use this to determine whether the CGImageRef is created with bitmap inside SD so we do not need decoded again.

After runnning some WebP test, I found some cases the CGContextDrawImage image is smaller that the row bitmap image, please do not merge this PR until I find a better solution ❤

Need  #1985 to merge firrst and need a XCTest to ensure WebP progressive load. I will do it later. 😪

👍