scrape abstraction for input batch size requirements

limit n size for input batch for stateful = True
i.e. loop abstraction to split 10 hours of data into 1 hour each, or 15min x4 per hour for training and validation; related to train_test_split issue

closely related to #22

related to #50;
needs work due to fixed batch input size due to RNN Stateful = True
Relevant:
https://stackoverflow.com/questions/43702481/why-does-keras-lstm-batch-size-used-for-prediction-have-to-be-the-same-as-fittin
Tensorflow can predict with different batch and step size than keras; Keras cannot
Alternate: create two models in keras:

First model used for training
Second model used for predictions, but share weights from both models


cc: Update doc for Endpoints and Deploy API via APIM

$subject
Fixes https://github.com/wso2/docs-apim/issues/3602

Closing to resolve conflict

Closing to resolve conflict


Remove tailwindcss import in ng-milkdown componet

Thanks for your work.
In ng-milkdown component
  template: `
      <div #editorRef [hidden]="loading" class="milkdown-editor" [class]="classList"></div>
      @if (loading) {
          <ng-container *stringTemplateOutlet="spinner">loading...</ng-container>
      }
  `,
  styles: [
    `
      @import "tailwindcss/base";
      @import "tailwindcss/components";
      @import "tailwindcss/utilities";

      :host {
        display: contents;
      }
    `
  ]

We should import tainlwindcss in app if needed, rather than import in base component, and it can occur 404 error for loading css.
Thanks again for your contribution!


Integrate hash-alloc with the rest of the compiler

Generally, this is done by replacing Box with Brick, and Vec with Row.

Yes, I agree that it should be documented first. I can tackle the first two bullet points. As for the segfault, I still cannot reproduce it on my machine, can you?

Should we run a docker container for linux to see if it happens?

Closed in favour of #61.


Remove un-needed max_attempts arg

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

If we want to keep max retries to 3, we can just default max_attempts to 3 in redshift_get_cluster_credentials - it is currently set to 10.

I don't know if there is a big benefit in keeping it at 3. Maybe we can do a default value of 5?


Move "org.asciidoctor.ast" package to "asciidoctorj-api" project

convert classes to interfaces in api project

Author
ContentPart
DocumentHeader
RevisionInfo
StructuredDocument

Create implementation in core project

Amended commit with the discussed modifications pushed...

Setters removed...

I am not an expert in API design in Java, but here my ideas about it:
During my experimentations I have noticed that it would help me to have a relaxed definition of the generics parameter in List at API level. This is why I have proposed:
public interface Row {
    List<? extends Cell> getCells();
}

If you try to code a different implementation than the Ruby one (I use the prefix My in this example):
MyRow implements org.asciidoctor.ast.Row wants to return a list of MyCell. This implementation needs to control the implementation type of the getCells() list. Using List<Cell> in the implementation is wrong (for example it cannot accept org.asciidoctor.ast.impl.CellImpl or any other implementation that is out of control).
The implementation in MyRow is also something like:
public List<MyCell> getCells() {
    return this.cells;
}

Maybe my idea was naive, but I have noticed that at API level this means that I need the wildcard form in order to be able to compile everything.

For this pull request, I will revert the wildcard modification as you suggested in your review.
Let move forward on the point that have a consensus. (The need for wildcard everywhere is only requested if my experiment is a success and maybe the vision I have for an alternative plain Java implementation of the Asciidoctor AST is wrong anyway).

The thing is that this shouldn't compile:
Row row = createTableRow();
Cell cell = createTableCell(column, "Some content");
List<? extends Cell> cells = row.getCells();
cells.add(cell)

The last statement shouldn't compile because cells could also be a List<SomeStrangeCell> if SomeStrangeCell implements Cell.
All the compiler knows about cell is that it implements the interface Cell, but not if it also extends SomeStrangeCell.
I see what you are aiming for and I agree that using plain lists also has its problems because if the user implements the AST interfaces himself without using our factory methods we fail as well.

Thank you for your feedback.
I had understood your point, but now we have it explicitelly written in this PR. I think it is valuable to write down the arguments (pro and contra), in order to be able to start this discussion again in the future (if necessary).
I have pushed a new version with the discussed changes.

Thanks! 🎉

Merged as fe439317b198664ac4595ca14cd14ddbd32603ba

Should I file an issue, or would you rather do it?

It would be great if you could file an issue for it.
I would happily create a PR for it if nobody else wants to jumps in.

#694


[runner] centralize OS detection in the runner

OS detection is currently implemented in a dedicated DLL https://github.com/microsoft/PowerToys/tree/master/src/common/os-detection
and invoked by the runner and by the Settings v2.
Following the approach of https://github.com/microsoft/PowerToys/pull/3467:

remove the DLL
move the code to the common lib
pass the OS detection result to the Settings app as command line argument (if not passed, the default value should be true)
use it in PT Run to not enable the module when running on a not supported OS https://github.com/microsoft/PowerToys/blob/8995f0af55bc17d958f94ee1d98793083bab894e/src/modules/launcher/Microsoft.Launcher/dllmain.cpp#L133

@enricogior  Just to add to that, it is used in Image Resizer to disable/enable to the settings hyperlink. I don't think it is used in Settings v2, it is only used by the runner. For more context on the exact changes made, this is a reference to the PR - https://github.com/microsoft/PowerToys/pull/2868.

@enricogior Just to add to that, it is used in Image Resizer to disable/enable the settings hyperlink. I don't think it is used in Settings v2, it is only used by the runner. For more context on the exact changes made, this is a reference to the PR - #2868.

@enricogior Any feedback on this? I just want to know if I should commit to this Issue.

@enricogior Just to add to that, it is used in Image Resizer to disable/enable the settings hyperlink. I don't think it is used in Settings v2, it is only used by the runner. For more context on the exact changes made, this is a reference to the PR - #2868.

@enrico, any feedback on this? I just wanted to know if I can commit to this issue. Thanks.

@laviusmotileng-ms
yes, sure.

We just released 0.20 and this should be resolved there.  Please try it out.


Feature request: Allow specifying width and height in % of screen

I would like to have wob with height 5px and width 90% of the screen. If I make it X pixels wide, it will not be sized correctly on my second screen which has lower resolution. How hard would it be to implement this?

I'm thinking about something like xrandr's output management:
wob --output DP-1 --width 200 --height 100 --output HDMI-1 --width 10 --height 200

This shouldn't be that hard to implement and solve your issue.

@francma Your feature idea seems nice, but I would like to have this one too, but it might be too hard to implement, I think.
Background: I'm using a ThinkPad X1 Tablet Gen3 with Sway, and to implement a "Tablet Mode", like Windows does, I configured Sway to rescale the primary display's output between 1.8 (acceptable for working with keyboard) and 2 (better for touch). Without specifying the size in % (which is then reevaluated on rescaling by wob), wob's size will only be perfect for one of both modes.

I've done some research on wayland protocols and I think implementing this is impossible.
Wob can operate in 3 different modes:

focused (show bar on focused output)
whitelist (show bar on whitelisted outputs)
all (show bar on all outputs)

The problem is that in focused mode we don't choose the output, the compositor does. This means that we have no idea what the output is to set the correct dimensions. And I haven't found any way around this.
/**
 * @ingroup iface_zwlr_layer_shell_v1
 *
 * Create a layer surface for an existing surface. This assigns the role of
 * layer_surface, or raises a protocol error if another role is already
 * assigned.
 *
 * Creating a layer surface from a wl_surface which has a buffer attached
 * or committed is a client error, and any attempts by a client to attach
 * or manipulate a buffer prior to the first layer_surface.configure call
 * must also be treated as errors.
 *
 * You may pass NULL for output to allow the compositor to decide which
 * output to use. Generally this will be the one that the user most
 * recently interacted with.
 *
 * Clients can specify a namespace that defines the purpose of the layer
 * surface.
 */
static inline struct zwlr_layer_surface_v1 *
zwlr_layer_shell_v1_get_layer_surface(struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1, struct wl_surface *surface, struct wl_output *output, uint32_t layer, const char *namespace);

You can try this (a little hackish) implementation https://github.com/francma/wob/pull/133
[output.ips]
match = DELL U2722DE
width = 200
height = 30

The implementation was possible thanks to surface_enter event which we get after the surface is created & commited. The "hackish" part is in that wob starts with surface of size 1x1 px and then resizes based on output it ends up on.
void layer_surface_enter(void *data, struct wl_surface *wl_surface, struct wl_output *entered_output)

I don't think I will implement sizes based on % because it would behave weird with (fractional) scaling.


[Task][Docs] Widget Development API Guide

Create a clear and comprehensive guide to developing an Appsmith widget

Removing this from doc team's bucket as this is not related to the product documentation.  cc @somangshu

@jsartisan coincidently, we can use this issue for the stuff we were talking about.


htlcswitch+config+server: adding RejectHTLC flag

In this PR, we add a flag to the command line config --rejecthtlc and a
field in the HTLC Switch config RejectHTLC bool.
The user should be able to start lnd with the --rejecthtlc flag which will
mean that lnd will reject any onward HTLCs. The switch will still allow receiving
HTLCs meant for the node and can still send HTLCs.
fixes #1298 and #2109

Needs rebase

@halseth thanks,
There's a bit for me to do in with refactoring the itest both in fixing the failing test and some general formatting.


refactor: rspack_fs use utf8path and filemetadata

Summary

update ReadableFileSystem trait to use Utf8Path and Utf8PathBuf
define FileMetadata to replace Metadata to make Async and Sync trait return same struct

Checklist

[ ] Tests updated (or not required).
[ ] Documentation updated (or not required).

@jerrykingxyz  can you help explain why change Path to Utf8Path in Filesystem trait here?


New version: LinuxSuRen.HTTPdownloader version 0.0.58

Result: Installation Failed

Manifest
Add/Remove Programs

Name
HTTP downloader

Version
0.0.58

Publisher
LinuxSuRen

ProductCode

Auto-updated by vedantmgoyal2009/winget-pkgs-automation in workflow run 1327
Microsoft Reviewers: Open in CodeFlow

@wingetbot run

@wingetbot run


Increase PHP memory limit

When I generate 100.000 rows of data (maximum allowed by generatedata), I got memory related errors. So I increase the memory_limit in php.ini

Thanks! @donnykurnia


ChannelReader doesn't complete when the connection is closed

I'm using the Git 1.0.0 tag, run build.cmd and then run the samples\SignalRSamples application.
In a Browser, I choose the streaming examples, Connect and then choose From Observable.
When the observable completes, the channel properly completes and the observable's subscription is disposed. However, when I Disconnect before the observable completes, the channel in turn doesn't ever complete and the subscription remains active. Unbounded channels then effectively become a memory leak.
The latter is what I'm seeing in my application, where the observables don't ever complete by design and browsers just connect and disconnect to a Hub.

You mean the channel leaks on the server when the client disconnects? You need to check the ConnectionAborted token on the Context to detect that and clean things up. We should update the sample to illustrate that though.
Channels don't have a way for cancellation/completion to flow from the reader to the writer, so we use a Cancellation Token for that instead.

For the observable case, you'd want to unsubscribe from the observable and complete the channel when the cancellation token is triggered. We should update the AsChannelReader sample to do that too.

Ah yes this sample is missing that critical piece. Good catch.

I added the ct as @anurse mentioned and then do this:
ct.Register(() => channel.Writer.Complete());
seems to work but im not shure its correct, there is also an overload of subscribe that takes a ct but then it doesnt return a disposable anymore...

I added the ct as @anurse mentioned and then do this:
ct.Register(() => channel.Writer.Complete());

This is what I would do. If you want to signal "cancellation" rather than just completion you can pass OperationCancelledException in the exception parameter to Complete. I don't know that SignalR does anything with that today though.


Crash on send cancel to xwayland surface

crashes on sending cancel events to xwayland surfaces

crash log
--------------------------------------------
   Hyprland Crash Report
--------------------------------------------
Sorry, didn't mean to...

Hyprland received signal 11 (Segmentation fault)

Version: e4bcd2e2da3136fb55886c4f02dd4a01099e687b
Tag:

Hyprland seems to be running with plugins. This crash might not be Hyprland's fault.
Plugins:
	hyprgrass (horriblename) 0.2

System info:
	System name: Linux
	Node name: fedora.fritz.box
	Release: 6.3.6-2.surface.fc38.x86_64
	Version: #1 SMP PREEMPT_DYNAMIC Fri Jun  9 17:33:07 UTC 2023

GPU:
	00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) (prog-if 00 [VGA controller])

os-release:
	NAME="Fedora Linux"
	VERSION="38 (Workstation Edition)"
	ID=fedora
	VERSION_ID=38
	VERSION_CODENAME=""
	PLATFORM_ID="platform:f38"
	PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
	ANSI_COLOR="0;38;2;60;110;180"
	LOGO=fedora-logo-icon
	CPE_NAME="cpe:/o:fedoraproject:fedora:38"
	DEFAULT_HOSTNAME="fedora"
	HOME_URL="https://fedoraproject.org/"
	DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
	SUPPORT_URL="https://ask.fedoraproject.org/"
	BUG_REPORT_URL="https://bugzilla.redhat.com/"
	REDHAT_BUGZILLA_PRODUCT="Fedora"
	REDHAT_BUGZILLA_PRODUCT_VERSION=38
	REDHAT_SUPPORT_PRODUCT="Fedora"
	REDHAT_SUPPORT_PRODUCT_VERSION=38
	SUPPORT_END=2024-05-14
	VARIANT="Workstation Edition"
	VARIANT_ID=workstation

Backtrace:
	#0 | /home/py/.nix-profile/bin/Hyprland(_Z12getBacktracev+0x48) [0x560048]
		_Z12getBacktracev
		??:?
	#1 | /home/py/.nix-profile/bin/Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x59f) [0x51d25f]
		_ZN13CrashReporter18createAndSaveCrashEi
		??:?
	#2 | /home/py/.nix-profile/bin/Hyprland(_Z25handleUnrecoverableSignali+0x3f) [0x496bcf]
		_Z25handleUnrecoverableSignali
		??:?
	#3 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x38d30) [0x7f673ed72d30]
		??
		??:0
	#4 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_resource_get_client+0) [0x7f673fa6c680]
		??
		??:0
	#5 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(wlr_seat_touch_send_cancel+0xf) [0x7f673f9bda6f]
		??
		??:0
	#6 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(wlr_seat_touch_notify_cancel+0x1f) [0x7f673f9bd32f]
		??
		??:0
	#7 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN9CGestures25sendCancelEventsToWindowsEv+0x36) [0x7f673c0d9376]
		??
		??:0
	#8 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN21MultiFingerDownAction12update_stateERKN2wf5touch15gesture_state_tERKNS1_15gesture_event_tE+0x72) [0x7f673c0ea4a2]
		??
		??:0
	#9 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN2wf5touch9gesture_t12update_stateERKNS0_15gesture_event_tE+0x12b) [0x7f673c0ed14b]
		??
		??:0
	#10 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN15IGestureManager14updateGesturesERKN2wf5touch15gesture_event_tE+0x3f) [0x7f673c0ea8ff]
		??
		??:0
	#11 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN15IGestureManager11onTouchDownERKN2wf5touch15gesture_event_tE+0x20) [0x7f673c0ea9a0]
		??
		??:0
	#12 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_ZN9CGestures11onTouchDownEP20wlr_touch_down_event+0x1d8) [0x7f673c0da2b8]
		??
		??:0
	#13 | /nix/store/5qphs6zjnjm5ngqjzfvv5sv5nahrb4ga-hyprgrass-0.3.0/lib/libhyprgrass.so(_Z13hkOnTouchDownPvP20wlr_touch_down_event+0x1b) [0x7f673c0d48fb]
		??
		??:0
	#14 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7f673fa6da1c]
		??
		??:0
	#15 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_signal_emit_mutable+0x7c) [0x7f673fa6da1c]
		??
		??:0
	#16 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(+0x609b9) [0x7f673f9a49b9]
		??
		??:0
	#17 | /nix/store/54wi6c222qw6hcq25qc2vzamxk6ks4nx-wlroots-hyprland-2023-10-04_3406c1b/lib/libwlroots.so.12(+0x5df1b) [0x7f673f9a1f1b]
		??
		??:0
	#18 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_event_loop_dispatch+0xa2) [0x7f673fa6f8f2]
		??
		??:0
	#19 | /nix/store/h49c512ci9m7bja7zhaz6y1ib38b9cs9-wayland-1.22.0/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7f673fa6d455]
		??
		??:0
	#20 | /home/py/.nix-profile/bin/Hyprland(main+0xb29) [0x484149]
		main
		??:?
	#21 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(+0x23ace) [0x7f673ed5dace]
		??
		??:0
	#22 | /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libc.so.6(__libc_start_main+0x89) [0x7f673ed5db89]
		??
		??:0
	#23 | /home/py/.nix-profile/bin/Hyprland(_start+0x25) [0x496a35]
		_start
		??:?

Log tail:
[LOG] Cleanup: destroyed a layersurface
[LOG] LayerSurface 3d97040 unmapped
[LOG] Framebuffer created, status 36053
[LOG] Callback 3d5d050 -> 3d5d048, CWLSurface removed.
[LOG] CWLSurface 3d5d020 called destroy()
[LOG] Set keyboard focus to surface 3d438a0, with [Window 3d88c50: title: "foot"]
[LOG] LayerSurface 3d97040 destroyed
[LOG] Callback 3d5d208 -> 3d5d200, layerSurface removed.
[LOG] Callback 3d5d0d0 -> 3d5d0c8, layerSurface removed.
[LOG] Callback 3d5d138 -> 3d5d130, layerSurface removed.
[LOG] Callback 3d5d1a0 -> 3d5d198, layerSurface removed.
[LOG] Callback 3d5d270 -> 3d5d268, layerSurface removed.
[LOG] LayerSurface 2b0f6f0 arranged: x: 0 y: 0 w: 46 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 2b97130 arranged: x: 0 y: 0 w: 1270 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] LayerSurface 2b97138 arranged: x: 0 y: 0 w: 1270 h: 847 with margins: t: 0 l: 0 r: 0 b: 0
[LOG] Monitor eDP-1 layers arranged: reserved: [46.00000, 0.00000] [0.00000, 0.00000]
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3d8a590 (res 0x3d8b130)
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3d82260 (res 0x3d82610)
[wlr] [types/wlr_compositor.c:689] New wlr_surface 0x3ddc410 (res 0x3ddc7c0)
[LOG] Cleanup: destroyed a layersurface
[wlr] [types/wlr_server_decoration.c:104] new server_decoration 0x3d65410 (res 0x3125730)
[wlr] [types/xdg_shell/wlr_xdg_surface.c:390] new xdg_surface 0x3d8c990 (res 0x30ada30)
[LOG] New XDG Surface created. (class: org.gnome.Logs)
[LOG] Registered signal for owner 3d8cb20: 3ddc6f0 -> 3d8cb88 (owner: XDG Window)
[LOG] Registered signal for owner 3d8cb20: 3d8ca38 -> 3d8cc58 (owner: XDG Window)
[wlr] [types/wlr_xdg_activation_v1.c:112] Rejecting token commit request: serial 0 was never given to client
[wlr] [types/wlr_xdg_activation_v1.c:306] Rejecting activate request: unknown token
[LOG] Registered signal for owner 3d8cb20: 2aa64e0 -> 3d8d138 (owner: Toplevel)
[LOG] Registered signal for owner 3d8cb20: 2aa64f0 -> 3d8d1a0 (owner: Toplevel)
[LOG] Registered signal for owner 3d8cb20: 2aa6500 -> 3d8d0d0 (owner: Toplevel)
[LOG] Registered signal for owner 3d8d340: 3ddc720 -> 3d8d348 (owner: CWLSurface)
[LOG] CWLSurface 3d8d340 called init()
[LOG] Registered signal for owner 3d8cb20: 3ddc700 -> 3d8cbf0 (owner: CWindow)
[LOG] Searching for matching rules for org.gnome.Logs (title: Logs)
[LOG] OPENINGON: [Node 3d968c0: workspace: 1, pos: [46.00, 0.00], size: [1224.00, 847.00], window: 3d88c50], Monitor: 0
[LOG] Set keyboard focus to surface 3ddc410, with [Window 3d8cb20: title: "Logs"]
[LOG] Window got assigned a surfaceTreeNode 0
[LOG] Registered signal for owner 3d8cb20: 3ddc6e0 -> 3d8cb20 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807668 -> 3d8ccc0 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 3d8ca58 -> 3d8cdf8 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 28075f8 -> 3d8cf30 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807618 -> 3d8cec8 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807628 -> 3d8ce60 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807638 -> 3d8cf98 (owner: XDG Window Late)
[LOG] Registered signal for owner 3d8cb20: 2807608 -> 3d8cd90 (owner: XDG Window Late)
[LOG] Registered signal for owner 2b215c0: 3ddc710 -> 2b21638 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 2b215c0: 3ddc6e0 -> 2b216a0 (owner: SurfaceTreeNode)
[LOG] Registered signal for owner 2b215c0: 3ddc720 -> 2b21708 (owner: SurfaceTreeNode)
[LOG] Creating a surfaceTree Root! [Window 3d8cb20: title: "Logs"]
[LOG] Map request dispatched, monitor eDP-1, window pos: [666.00000, 8.00000], window size: [596.00000, 831.00000]

lol so only koreader is affected, other xwayland apps don't crash me

doesn't happen anymore and too old to figure out what happened


Add horizontal scrolling option

It would perform the same as the vertical with the pages continuously scrolling to the side.
Not high priority, but could be a nice feature for users.

Hmm, I was assuming UICollectionView had a horizontal scrolling setting, but I guess I was thinking of UIPageViewController.
http://stackoverflow.com/a/19435898/484780

Yes UICollectionView works horizontally.

@kjantzer Any updates on this?

@hebertialmeida - No, had move on to some other projects.

Since Safari 7.0 and the UIWebview are able to paginate content into columns without the use of any custom javascript or CSS . I made horizontal scrolling work, but still need to integrate with other components of the framework (such as the Sidepanel, etc).

@danfsd Interesting because I will start working on this, where is your implementation, maybe I can create a branch for that so we can work together to finish that, I did Som implementation for side panel..

@hebertialmeida it's on my forked version, on the branch horizontal-scroll.
Horizontal Scroll branch
It still needs some work to be done:

When swiping back between FolioReaderPage, we need to change the horizontal offset of the scrollview to the last page.
Strange behavior when running on landscape mode
Fix FolioReaderSidepanel anchors to move horizontally instead of vertical

Cool! I have created a branch, so you can make a PR and we can work together on this. https://github.com/FolioReader/FolioReaderKit/tree/horizontal-scroll

TODO:

[x] A config that allow init on specific orientation and enable or not orientation switch.
[ ] If allowed user should be able to switch the orientation inside the reader, probably from Fonts menu.
[ ] Redesign Table of Contents and icons on left menu.

Bugs:

[ ] Fix device rotation to keep same page;
[ ] When horizontal if playing audio it do not change page automatically.

Guys I want you opinion on issue #88


Can't vmap(jacrev(slogdet))

Hi All,
I've been trying to get per-sample gradients of a simple feed-forward network that contains a torch.slogdet as its final layer. When I go to apply vmap to jacrev the number of arguments of the function changes and I have no idea why. I followed the example of here with vmap and jacrev yet it seems to fail for some reason.
The minimal reproduction example is here
import torch
from functorch import make_functional, vmap, grad, jacrev
import torch.nn as nn

class model(nn.Module):

  def __init__(self, num_input, num_hidden):
    super(model, self).__init__()

    self.num_input = num_input
    self.num_hidden = num_hidden

    self.layer1 = nn.Linear(2, num_hidden)
    self.layer2 = nn.Linear(num_hidden, num_input)

  def forward(self, x):
    g = x.mean(dim=0, keepdim=True).repeat(self.num_input, 1)
    f = torch.cat((x,g), dim=1)

    y1 = self.layer1(f)
    y2 = self.layer2(y1)

    sgn, logabs = torch.slogdet(y2)
    return sgn, logabs

net = model(2, 32)

func_model, params = make_functional(net)

def loss(params, x):
  sgn, logabs = func_model(params, x)
  return logabs

x = torch.randn(4096, 2, 1)

per_sample_grads = vmap(jacrev(loss), (None, 0))(params, x)

The Traceback is below,
Traceback (most recent call last):
  File "jacrev_fail_example.py", line 36, in <module>
    per_sample_grads = vmap(jacrev(loss), (None, 0))(params, x)
  File "~/.local/lib/python3.8/site-packages/functorch/_src/vmap.py", line 319, in wrapped
    batched_outputs = func(*batched_inputs, **kwargs)
  File "~/.local/lib/python3.8/site-packages/functorch/_src/eager_transforms.py", line 358, in wrapper_fn
    output, vjp_fn = vjp(f_wrapper, *primals)
  File "~/.local/lib/python3.8/site-packages/functorch/_src/eager_transforms.py", line 229, in vjp
    primals_out = f(*diff_primals)
  File "~/.local/lib/python3.8/site-packages/functorch/_src/eager_transforms.py", line 407, in f_wrapper
    replaced_args = _replace_args(args, wrapper_args, argnums)
  File "~/.local/lib/python3.8/site-packages/functorch/_src/eager_transforms.py", line 380, in _replace_args
    raise RuntimeError(f'new_args should be of size 1, was of size {len(new_args)}')
RuntimeError: new_args should be of size 1, was of size 4

This is the same issue as #292 I think. I'm planning to put up a fix for that later today

Okay, I put up a fix for the specific error you saw. There's another issue though, which is that the implementation of slogdet backward calls tensor.item() and we are unable to vmap over it:
import torch
from functorch import make_functional, vmap, grad, jacrev
import torch.nn as nn

class model(nn.Module):

  def __init__(self, num_input, num_hidden):
    super(model, self).__init__()

    self.num_input = num_input
    self.num_hidden = num_hidden

    self.layer1 = nn.Linear(2, num_hidden)
    self.layer2 = nn.Linear(num_hidden, num_input)

  def forward(self, x):
    g = x.mean(dim=0, keepdim=True).repeat(self.num_input, 1)
    f = torch.cat((x,g), dim=1)

    y1 = self.layer1(f)
    y2 = self.layer2(y1)

    sgn, logabs = torch.slogdet(y2)
    return sgn, logabs

net = model(2, 32)

func_model, params = make_functional(net)

def loss(params, x):
  sgn, logabs = func_model(params, x)
  return logabs

x = torch.randn(4096, 2, 1)

per_sample_grads = vmap(jacrev(loss), (None, 0))(params, x)
# RuntimeError: vmap: It looks like you're calling .item() on a Tensor. We don't support vmap over calling .item()
# on a Tensor, please try to rewrite what you're doing with other operations.

Yes, after posting I did notice that it looked pretty similar to #292
I only used torch.slogdet within this example as a simplified version of my actual network which has a custom.autograd.Function version of torch.slogdet. As I manually defined the backward there, it shouldn't call .item()?
Should I try the following fix with my custom torch.slogdet? Or would there be another issue with using custom functions?

autograd.Function is silently incorrect when used with functorch (https://github.com/pytorch/functorch/issues/207). So even if you manually define the backward, functorch just ignores it right now :(
That issue is very tricky to fix, but it's pretty high priority on our radar

Hi @zou3519,
I think I have a solution for removing .item from slogdet_backward. The only problem is it requires a batching rule for at::equal. The backward I've just written is below,
Tensor slogdet_backward(const Tensor& grad_logabsdet,
                        const Tensor& self,
                        const Tensor& signdet, const Tensor& logabsdet) {
  auto singular_case_backward = [&](const Tensor& grad_logabsdet, const Tensor& self) -> Tensor {
    Tensor u, sigma, vh;
    std::tie(u, sigma, vh) = at::linalg_svd(self, false);
    Tensor v = vh.mH();
    // sigma has all non-negative entries (also with at least one zero entry)
    // so logabsdet = \sum log(abs(sigma))
    // but det = 0, so backward logabsdet = \sum log(sigma)
    auto gsigma = grad_logabsdet.unsqueeze(-1).div(sigma);
    return svd_backward({}, gsigma, {}, u, sigma, vh);
  };

  auto nonsingular_case_backward = [&](const Tensor& grad_logabsdet, const Tensor& self) -> Tensor {
    // TODO: replace self.inverse with linalg_inverse
    return unsqueeze_multiple(grad_logabsdet, {-1, -2}, self.dim()) * self.inverse().mH();
  };

  if (self.dim() == 2) {
    at::Tensor sing = at::zeros(1, LEGACY_CONTIGUOUS_MEMORY_FORMAT);
    //bool is_singular = self.is_complex() ? signdet.abs().item<double>() == 0 : signdet.item<double>() == 0; //removed
    bool is_singular = self.is_complex() ? at::equal(signdet.abs(), sing) : at::equal(signdet, sing); //added
    if (is_singular) {
      return singular_case_backward(grad_logabsdet, self);
    } else {
      return nonsingular_case_backward(grad_logabsdet, self);
    }
   } else {
    auto nonzero_signdet_indices = at::native::toListOfOptionalTensors(self.is_complex() ? at::where(signdet.abs()) : at::where(signdet));
    c10::optional<Tensor> first_nonzero_signdet_index = nonzero_signdet_indices[0];

    if (first_nonzero_signdet_index->size(0) == logabsdet.numel()) {  // all log determinants are finite (non-singular)
     return nonsingular_case_backward(grad_logabsdet, self);
    }

    auto zero_signdet_indices = at::native::toListOfOptionalTensors(at::where(signdet == 0));
    c10::optional<Tensor> first_zero_signdet_index = zero_signdet_indices[0];

    if (first_zero_signdet_index->size(0) == logabsdet.numel()) {  // all log determinants are -inf (singular)
      return singular_case_backward(grad_logabsdet, self);
    }

    Tensor grad_slogdet = at::empty_like(self, LEGACY_CONTIGUOUS_MEMORY_FORMAT);

    // invertible case
    grad_slogdet.index_put_(/*indices=*/nonzero_signdet_indices,
                          //NOLINTNEXTLINE(bugprone-argument-comment)
                          /*value=*/nonsingular_case_backward(grad_logabsdet.index(nonzero_signdet_indices),
                           self.index(nonzero_signdet_indices)));

    // non-invertible case, uses SVD
    grad_slogdet.index_put_(/*indices=*/zero_signdet_indices,
                           // NOLINTNEXTLINE(bugprone-argument-comment)
                           /*value=*/singular_case_backward(grad_logabsdet.index(zero_signdet_indices),
                                                            self.index(zero_signdet_indices)));

    return grad_slogdet;
  }
}

It works for calculating jacrev of torch.linalg.slogdet, however, it runs into the aforementioned BatchingRule error when using vmap. Here's an example:
import torch
from functorch import vmap, jacrev

def logabs(x):
  return torch.linalg.slogdet(x)[1]

x = torch.randn(100,4,4)
jacobian = jacrev(logabs)(x) #return Tensor of shape [100,100,4,4]

torch.manual_seed(0)

x = torch.randn(4,4)
jacobian = jacrev(logabs)(x) #returns Tensor of shape [4,4]
"""
tensor([[-0.6138, -0.1843,  0.1957, -0.3358],
        [ 0.2193, -0.0545, -0.0507, -0.3950],
        [ 0.4635, -0.5424,  0.5355, -0.0715],
        [-0.2209,  0.1132,  0.7572, -0.1647]])
"""

@AlphaBetaGamma96 -- are you still looking to use functorch on a custom autograd.Function? I have a prototype up and running and am looking for test cases :), I remember you had a custom determinant function

Hi @zou3519, I indeed am! Shall I upgrade to the latest nightly?

Thanks for the quick reply! The prototype is on a branch, we haven't shipped it to nightlies yet. Would it be possible to see the autograd.Function you were interested in using vmap with (and some sample inputs?)

Hi @zou3519,
Sorry for this being quite late, but I had to rewrite it. I've attached an example below, which is run with the current versions of torch = 1.13.0.dev20221003 and CUDA = 11.6.
In short, it's a custom torch.linalg.det which can handle singular matrices via using a SVD-decomposition within its gradient. I do remember with an older version of PyTorch, torch.linalg.det would fail with singular matrices but it seems to be fine with them now. So, perhaps the use-case of this example has been made redundant with recent updates, however, it's still a nice example.
My main goal would be to vmap over a more complicated function (example on my github here) to compute the Laplacian of the determinant with respect to its input. Although that's a little more complicated!
I can add a custom torch.linalg.det function with a custom numerically stable DoubleBackward if you want to test nested torch.autograd.Function too, just let me know!
import torch
from torch import Tensor
_ = torch.manual_seed(0)

import functorch
from functorch import vmap, jacrev

#helper functions here

#check of https://www.tensorflow.org/api_docs/python/tf/math/cumsum
def exclusive_cumsum(x: torch.Tensor, dim: int):
  res = x.cumsum(dim=dim).roll(1) #roll(1) and res[...,0]=0. make it exclusive btw
  res[...,0]=0.
  return res

#not the same as exclusive_cumsum().flip()
#see here: https://www.tensorflow.org/api_docs/python/tf/math/cumsum
def reverse_exclusive_cumsum(x: torch.Tensor, dim: int):
  res = x.flip(dim).cumsum(dim=dim)
  res[...,-1]=0.
  res=res.roll(1).flip(-1)
  return res

def get_log_sigma(sigma: torch.Tensor):
  return torch.log(sigma)

#modified from https://github.com/deepmind/ferminet/blob/tf/ferminet/networks.py#L143-L192
def get_log_gamma(log_sigma: torch.Tensor):
  lower = exclusive_cumsum(log_sigma, dim=-1)
  upper = reverse_exclusive_cumsum(log_sigma, dim=-1)
  log_gamma = lower + upper

  return log_gamma

class CustomDeterminant(torch.autograd.Function):

  @staticmethod
  def forward(ctx, matrix):
    U, S, VT = torch.linalg.svd(matrix)
    detU = torch.linalg.det(U)
    detVT = torch.linalg.det(VT)

    ctx.save_for_backward(U, S, VT, detU, detVT)

    det =  detU * detVT * torch.linalg.det(torch.diag_embed(S))

    return det

  @staticmethod
  def backward(ctx, DetBar):
    U, S, VT, detU, detVT = ctx.saved_tensors

    ln_S = get_log_sigma(S)
    gamma = torch.diag_embed( torch.exp(get_log_gamma(ln_S)) )

    Abar = DetBar * detU * detVT * U @ gamma @ VT

    return Abar

def pytorch_det(matrix: Tensor) -> Tensor:
  return torch.linalg.det(matrix)

def custom_det(matrix: Tensor) -> Tensor:
  return CustomDeterminant.apply(matrix)

#====================================================================================#

N = 4
matrix = torch.randn(N, N, dtype=torch.float64, requires_grad=True)

backward_check = torch.autograd.gradcheck(func=custom_det, inputs=(matrix), raise_exception=False)

print("grad check: ",backward_check)

naive_jac = torch.autograd.functional.jacobian(func=pytorch_det, inputs=(matrix))
custom_jac = torch.autograd.functional.jacobian(func=custom_det, inputs=(matrix))

print("\nCheck custom function vs naive function")
print("For larger matrices the difference will become more apparent\n")

for i in range(N):
  print("Jacobian check: ", i, torch.allclose(naive_jac[i], custom_jac[i]))
  print(naive_jac[i], custom_jac[i], "\n")

#====================================================================================#

which outputs,
grad check:  True

Check custom function vs naive function
For larger matrices the difference will become more apparent

Jacobian check:  0 True
tensor([ 1.4697,  1.2719, -6.0033,  0.9463], dtype=torch.float64) tensor([ 1.4697,  1.2719, -6.0033,  0.9463], dtype=torch.float64)

Jacobian check:  1 True
tensor([-3.6909, -3.2754,  8.0690, -1.1910], dtype=torch.float64) tensor([-3.6909, -3.2754,  8.0690, -1.1910], dtype=torch.float64)

Jacobian check:  2 True
tensor([-2.3848, -1.7151,  6.2400,  0.4697], dtype=torch.float64) tensor([-2.3848, -1.7151,  6.2400,  0.4697], dtype=torch.float64)

Jacobian check:  3 True
tensor([ 0.4287, -1.9187,  1.1866,  1.5338], dtype=torch.float64) tensor([ 0.4287, -1.9187,  1.1866,  1.5338], dtype=torch.float64)

No need to apologize and thank you for the example! Time to test it out and see how it goes

Hi @zou3519, any update on this?

Hey @AlphaBetaGamma96,
Sorry for the delayed reply, I was out on vacation last week. I haven't gotten around to testing your example, but here's a quick update:
There are two types of autograd.Function we want to add support for for functorch:

Users should be able to define a "vmap" rule on an autograd.Function. This is useful if the autograd.Function does not use PyTorch operations and instead calls some C++/CUDA code.
Users should be able to take an autograd.Function that uses only PyTorch operations and use it with functorch transforms without defining a vmap rule.

Your use case is (2).
Implementing (1) is on the way to implementing (2). I'm currently working through shipping 1 to PyTorch (some work is being done over at https://github.com/pytorch/pytorch/pull/88785) and (2) is coming soon after. The goal is to complete this work before the end of the year.

@AlphaBetaGamma96 -- I've been testing your example and everything looks good so far. Here's a quick summary if you're interested in trying it out more:

the feature has been released in PyTorch nightly binaries. It is currently gated behind a feature flag (see script)
In order to use autograd.Function with functorch, we need to refactor the forward function into a forward and a separate setup_context staticmethod.
Here's my refactor of your example to do just that: https://gist.github.com/zou3519/bd2a79b61a384b862608fe7393c0da1c

Would be curious to hear your feedback before we officially release it in the next release. Documentation will be coming soon, but happy to answer questions

Hi @zou3519, apologies for the late response. The refactor of the example looks great! Can I ask a few questions?

Is the feature flag represented as the class attribute generate_vmap_rule=True?

For my more complicated example (to represent a 2nd derivative), is it easy to nest this for a manually defined 2nd derivative? I.e., just defined another torch.autograd.Function object in the backward method of the first function, like previous implementations but just add in the setup_context method?

For computing higher-order gradients (for example 3rd order), I would need to define a triple-backward manually, right?  Otherwise, the returned gradient would assume that the 3rd-order derivative is zero?

With the setup_context method, I see that the ctx.save_for_backward is within that method rather than the forward method like standard torch.autograd.Function objects. Is this the new default syntax?

Does the forward method need a ctx argument like the setup_context and backward methods or does it not as its a static method? (And the saving of tensors is now handled by the setup_context method instead of the forward method?

Can I have a link to the pytorch slack? I remember you sent it a while back, but I can't find it! Thanks!

We have docs now, that should answer the questions :) https://pytorch.org/docs/master/notes/extending.func.html
Let me reply to them one-by-one:

Is the feature flag represented as the class attribute generate_vmap_rule=True?

No need to worry about the feature flag anymore. That class attributes toggles if you want to define a custom vmap staticmethod or if you want to ask PyTorch to generate one for you.

For my more complicated example (to represent a 2nd derivative), is it easy to nest this for a manually defined 2nd derivative? I.e., just defined another torch.autograd.Function object in the backward method of the first function, like previous implementations but just add in the setup_context method?

Yes, exactly.

For computing higher-order gradients (for example 3rd order), I would need to define a triple-backward manually, right? Otherwise, the returned gradient would assume that the 3rd-order derivative is zero?

It depends. If your second order backward involves PyTorch operations, then the 3rd-order derivative will be computed by PyTorch backpropping through those operations.

With the setup_context method, I see that the ctx.save_for_backward is within that method rather than the forward method like standard torch.autograd.Function objects. Is this the new default syntax?

Yes, the syntax is different. We are pushing this forward as a "new default syntax" for autograd.Function, but will support both syntaxes going forward.

Can I have a link to the pytorch slack? I remember you sent it a while back, but I can't find it! Thanks!

Can you email me your email and I'll manually add you? Mine is my github username @ gmail.com

Does the forward method need a ctx argument like the setup_context and backward methods or does it not as its a static method? (And the saving of tensors is now handled by the setup_context method instead of the forward method?

Forward method does not need a ctx argument. The saving of Tensors is now handled by setup_context.

One function I want to implement contains the use of a functools.lru_cache, do you think this will work with vmap? I do have a way of circumventing the lru_cache with pytorch primitives, but I was just curious (as it works without vmap).

Could you provide more details as what what you're doing with lru_cache? Just memoizing the inputs of the function?

Also, is this torch.autograd.Function fully supported with the torch.compile?

torch.autograd.Function is not optimized by torch.compile today in most cases. This new autograd.Function has the same support for torch.compile as the old one. Support for all autograd.Function with torch.compile is somewhere on our roadmap.

Apologizes for the late reply @zou3519 !

We have docs now, that should answer the questions :) https://pytorch.org/docs/master/notes/extending.func.html

I shall give this a read!

Yes, the syntax is different. We are pushing this forward as a "new default syntax" for autograd.Function, but will support both syntaxes going forward.

I have attempted to port over my custom function to the new default syntax, although, I have noticed a broadcasting issue when computing gradients via vmap or .backward(). (I can share an example code, for clarity if needed!).

Can you email me your email and I'll manually add you? Mine is my github username @ gmail.com

Email has been sent now.

Could you provide more details as what what you're doing with lru_cache? Just memoizing the inputs of the function?

I've managed to create a pytorch version of the code that circumvents the need for the lru_cache. In short, it was used to speed up the calculation of a matrix (involved in the derivatives of a determinant function) that is constructed via  permutations of a vector. It turns out it is quicker to use pytorch operations to compute it directly rather than utilize a  lru_cache weirdly.


PowerLineFrequency in the eeg.json file not working

Hi,
I use bids-matlab-tool-master to create the bids folder. In the GUI, there is an option where I can choose the PowerLineFrequency for the EEG. However, it won't convert into the number I want. It is n/a and BIDS validator did give me a warning. I believe that it is the format of the input from GUI.
Best regards,
Cheng-Teng

hey @ChengtengIp
just to make sure, is this a bids stater kit issue or a bids-matlab-tool issue?

It is a bids-matlab-tool issue

ok closing this then


[ISSUE #2149] Apache RocketMQ rebalancing architecture optimization

What is the purpose of the change
Move the rebalancing calculation to the broker, and the client requests the broker to obtain the allocation result.
Brief changelog

Implemented the function for clients sending message allocation requests to the broker side.
Implemented the AllocateMessageQueueProcessor to handle message allocation requests sending from clients.
Migrate the code of allocation strategies through org.apache.rocketmq.common, which enables both broker and client side to invoke those strategies.

Verifying this change
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage decreased (-0.4%) to 50.877% when pulling<PHONE_NUMBER>f063fd41a5ee445483ee668b2b63b4 on jack870131:optimize_rebalance into fac30c3596d5577cd80a52af9ad89a0839016137 on apache:optimize_rebalance.

Codecov Report

Merging #2169 into optimize_rebalance will decrease coverage by 0.38%.
The diff coverage is 35.71%.

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


Instruction steps

The instructions for deploying the widgets needs to be more clear.

Step 1 should be download the web app builder for ArcGIS.
Last step should be to run Startup in "webappbuilder folder".
This would be helpful for first time users who are not familiar with the install steps.

Added additional steps to address the request


Different tensor computation result between using CPU and GPU devices

🐛 Describe the bug
During the development of the skew2vec function (trying to transform the skew-symmetric matrix to the 3D vector), I found when using this formula err_pose = (torch.mm(desired_pose.T, Rwb) - torch.mm(Rwb.T, desired_pose))(All tensor is 3x3 matrix) which is similar with torch.mm(A, B.T) - torch.mm(B, A.T), the result will not match the skew-symmetric characteristic and the difference is pretty small.
The implementation of skew2vec function is:
def skew2vec(input:torch.Tensor) -> torch.Tensor:
    v = input.tensor() if hasattr(input, 'ltype') else input
    assert v.shape[-2:] == (3, 3), "Last 2 dim should be (3, 3)"
    assert torch.equal(v.permute(0, 2, 1), -v), "Each matrix must be a skew matrix"

    return torch.stack([torch.stack([-v[..., 1, 2]], dim=-1),
                            torch.stack([ v[..., 0, 2]], dim=-1),
                            torch.stack([-v[..., 0, 1]], dim=-1)], dim=-1)

The following is the tensor calculation result when I use cuda type tensor.
tensor([[[ 0.00000000000000000000, -0.00632718438454868588, -0.18133159863325493122],
[ 0.00632718438454868675,  0.00000000000000000000, -0.18298103584576658198],
[ 0.18133159863325493122,  0.18298103584576663749, 0.00000000000000000000]]], device='cuda:0', dtype=torch.float64)

which will cause the second assertion in the skew2vec function being failed. The PyTorch official is aware of this NUMERICAL ACCURACY problem.
I also found some functions have added the rtol and atol parameters in the method, e.g. this mat2SO3 function https://github.com/pypose/pypose/blob/3b3149208129d2747e779d13cdba3695c1107e62/pypose/lietensor/convert.py#L258.
Maybe the best way to also add the rtol and atol in the skew2vec parameters and use torch.allclose to check the equality?
Versions
Collecting environment information...
PyTorch version: 2.0.1+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.26.3
Libc version: glibc-2.31

Python version: 3.10.9 (main, Mar  1 2023, 18:23:06) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-1036-gcp-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: Tesla T4
Nvidia driver version: 450.236.01
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.5
[pip3] numpydoc==1.5.0
[pip3] torch==2.0.1
[conda] blas                      1.0                         mkl
[conda] mkl                       2021.4.0           h06a4308_640
[conda] mkl-service               2.4.0           py310h7f8727e_0
[conda] mkl_fft                   1.3.1           py310hd6ae3a3_0
[conda] mkl_random                1.2.2           py310h00e6091_0
[conda] numpy                     1.23.5          py310hd5efca6_0
[conda] numpy-base                1.23.5          py310h8e6c178_0
[conda] numpydoc                  1.5.0           py310h06a4308_0
[conda] torch                     2.0.1                    pypi_0    pypi

I agree with this change, @xiangfuli you may feel free to change it and create a PR. Thank you so much!


[Feat.] How to enable Telegram plugin in Graylog docker image

Hi
I'm using Graylog 4.2 within a docker image so there's no configuration file.
I copied plugin version 2.3.6 (which is suitable to my graylog version) into the docker container plugin folder.
And then restarted graylog, but I couldn't see Telegram Notification type on notiication definitions.
Which ENV variables should I add to enable this plugin?
Thanks.

Hi, I don't support old versions.
You could try installing other plugins, to see if your setup is generally working as expected.


coutervalues refactoring, making app working offline

some bugfixes in wallet-common regarding the countervalue api
refactor countervalues to adopt unified pollRates() (see draft proposal)
make app working offline, before it was always waiting countervalues to load..
add a generic CounterValuePollingProvider & withCounterValuePolling

code from Root was migrated in the provider. it have the same autopolling feature / listen to appstate like before. however, it only happens when root is "ready", which is when localstorage is asynchronously read (in the future it is important if we decrypt it)
counterValuePolling.poll() method is exposed via context, and returns a Promise (we have used it in the "pull to refresh" of dashboard just for PoC)
counterValuePolling.polling is a boolean that is true when a pull is happening, we use it to display a spinner on top right header of dashboard (PoC)

Future improvments:

we should move counterValues actions / stores logic as much as possible into wallet-common, because all wallet-common dependents will benefit from it, also we eventually will migrate to our next countervalue api
we need to figure out where we want to poll() & where we want to show to the ui it's polling (to be designed)

don't merge this yet. i need to do more testing with the device tomorrow.


Add readiness timeout

This change adds a timeout flag which will cause linkers-await to exit if the proxy fails to become ready within the given timeout. This will be used by linkerd/linkerd2#7659 and there is a comment explaining how it appears when the proxy fails to become ready.
Local testing is shown below
$ make build
$ ./target/x86_64-unknown-linux-gnu/debug/linkerd-await -t 1s
linkerd-proxy failed to become ready within 1s timeout

Signed-off-by: Kevin Leimkuhler<EMAIL_ADDRESS>

With these latest changes, when the proxy fails to become ready within the timeout we see the following event for a pod. You'll notice the message is passed through as expected.
  Warning  FailedPostStartHook  27s   kubelet            Exec lifecycle hook ([/usr/lib/linkerd/linkerd-await -t 1s]) for Container "linkerd-proxy" in Pod "linkerd-destination-66bbd75bb8-9pgsz_linkerd(ba8fff94-e3fe-40cc-83dc-c122cabc06b1)" failed - error: command '/usr/lib/linkerd/linkerd-await -t 1s' exited with 69: linkerd-proxy failed to become ready within 1s timeout
, message: "linkerd-proxy failed to become ready within 1s timeout\n"


Option to ignore previous state in AsyncValue by default

Is your feature request related to a problem? Please describe.
I have found that in most places in my app, I want to use .unwrapPrevious() on AsyncValues so that the UI correctly reverts to a not interactive loading state when connection to some service (embedded hardware with websockets interface) used by my app is lost.
It is a real time application, so I don't use offline first design. The connection is  robust enough to never drop out randomly, but it can disconnect if there is a firmware crash or I load a new firmware version during development. While the connection is not present, most UI is grayed out until the hardware connects again.
If I forget to write .unwrapPrevious, then the UI will look like it's still usable, even though the connection to the hardware has been lost, and every operation the user might attempt will error out.
Describe the solution you'd like
Add some kind of compile time option to invert the default and modified behaviour of using the previous state.
New option off (default, current behaviour):
Extra typing is required to disable using the previous state.

AsyncValue.valueOrNull: Return current value or previous value if current state is error or loading.
AsyncValue.unwrapPrevious().valueOrNull: Return value only if current state is data.

New option on (explicitly enabled, proposed behaviour):
Extra typing is required to enable using the previous state.

AsyncValue.valueOrNull: Return value only if current state is data.
AsyncValue.withPrevious().valueOrNull: Return current value or previous value if current state is error or loading.

Similar changes to every other function that uses the previous value by default in the current implementation.
Describe alternatives you've considered
We can just make sure to type .unwrapPrevious everywhere, but it's too error prone.
Additional context
Another request for the same feature in an old comment: https://github.com/rrousselGit/riverpod/issues/2097#issuecomment-1398000811.

There's already the parameter asReload: true on ref.invalidate/invalidateSelf in the 3.0 branch, which kind of does that.
But to begin with, there's already AsyncValue.isRefreshing/isLoading. So you can write logic based on that.
For instance, you could do:
extension<T> on AsyncValue<T> {
  T? get currentValue => isRefreshing ? null : valueOrNull;
}

Overall you're not really meant to use unwrapPrevious. You're supposed to use pattern matching to react to loading/error states.

just make your own extension method with the logic you want?
i have my own Widget widgetWhen(Widget Function(T) whenData, {/*optional loading and error overrides*/}) that injects my loading and error widgets for me, and I can specify what logic I want.
you could easily just ensure it acts however you like.

I have no plan to add such an option for now.
I do plan on adding documentation around how to handle the various AsyncValue states ; but I don't think that forcibly setting AsyncValue.value to null is the way to go about it.


Tests/theme img

Resolves failing tests with images located in theme directories

Coverage increased (+0.2%) to 96.697% when pulling 26715f9cfad4f048500b045f9cf88ae00ad0b54d on tests/theme_img into 2021cddfc10b56be03e204301f53b3efca631429 on master.

Coverage increased (+0.2%) to 96.692% when pulling 26715f9cfad4f048500b045f9cf88ae00ad0b54d on tests/theme_img into 2021cddfc10b56be03e204301f53b3efca631429 on master.

Coverage increased (+0.2%) to 96.692% when pulling 26715f9cfad4f048500b045f9cf88ae00ad0b54d on tests/theme_img into 2021cddfc10b56be03e204301f53b3efca631429 on master.

Changes Unknown when pulling 43b48b87337729ace7571d0481f9687648522b3d on tests/theme_img into ** on master**.

Current coverage is 4.56% (diff: 0.00%)

No coverage report found for master at 210505a.

Powered by Codecov. Last update 210505a...43b48b8

Changes Unknown when pulling 43b48b87337729ace7571d0481f9687648522b3d on tests/theme_img into ** on master**.

Changes Unknown when pulling 5f117d36ae27d613a41c75e683da38bf7eade031 on tests/theme_img into ** on master**.

Coverage decreased (-91.8%) to 4.778% when pulling 5f117d36ae27d613a41c75e683da38bf7eade031 on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Coverage decreased (-91.8%) to 4.778% when pulling 5f117d36ae27d613a41c75e683da38bf7eade031 on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Coverage decreased (-91.8%) to 4.778% when pulling 5f117d36ae27d613a41c75e683da38bf7eade031 on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Current coverage is 4.56% (diff: 0.00%)

No coverage report found for master at 210505a.

Powered by Codecov. Last update 210505a...5f117d3

Coverage decreased (-96.5%) to 0.0% when pulling dcc2f87f9bdbc6f2a1f83c658024148dcfe80740 on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Coverage increased (+0.1%) to 96.675% when pulling dcc2f87f9bdbc6f2a1f83c658024148dcfe80740 on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Coverage increased (+0.2%) to 96.692% when pulling 131f0dfeabb55bb7bfb03fdd206b86774ee7150c on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Coverage increased (+0.2%) to 96.692% when pulling 131f0dfeabb55bb7bfb03fdd206b86774ee7150c on tests/theme_img into 210505afa698b553a64e4c63e0387c97b57697af on master.

Current coverage is 96.91% (diff: 100%)

No coverage report found for master at 210505a.

Powered by Codecov. Last update 210505a...131f0df


Timezone setting

Currently timezone is hardcoded into the firmware. At very least it should be made an setting in the Kconfig menu. Ideally it would be exposed on the web interface for adjustment. Maybe moment.js can help

Closed via #15 in the simplest manner. TZ strings still need to be in POSIX format which are...difficult to find


Use PRB0t in the browser

One of the use cases detailed in the readme is for adding live editing to static sites. I'm guessing this means PRB0t should be able to be used in the browser. It seems like CORS prohibits it right now.
Check out this CodePen for what I'm imagining.

@j-rewerts
You can publish the app by yourself.
And you can refer to this,set the headers as this.
    res.setHeader("Access-Control-Allow-Origin", "*");
    res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
    res.setHeader("Access-Control-Allow-Methods", "POST,GET");
    res.setHeader('Content-Type', 'application/json;charset=utf-8');

There is no such requirement yet.
Now just  new PR() and  pr.send().   :)

My requirement is when create branch, need to create branch from the upstream repo.
Now the PRB0t can only create branch from fork repo branch .
Now I'm researching the Github API and see how it works.

The reason why is a fork is because the user is PRB0T but I can add this functionality by adding two options.

[ ] Add OAuth Token (So you can use your own custom user from the request it self). I will prefer to avoid this and just keep the option to self hosting option.
[ ] Add the option to the constructor to choose branch rather than fork.

@whtiehack Would that work for you?

In fact, you can set your own token now.
Because you has a token parameter in the PullRequest contruct.
https://github.com/PRB0t/PRB0t/blob/ccaacfa98098c4e84c5d847f8bd2c17383b84f28/src/PullRequest.js#L6-L16
Just need to set up like this:
{
  "user": "<github-user>",
  "repo": "<github-repo>",
  "title": "<pull-request-title>",
  "description": "<pull-request-description>",
  "commit": "<commit-description>",
  "files": [
  	{"path": "<file-path>", "content": "<file-content>"}
  ],
  "token":"YOU TOKEN here"
}

Add the option to the constructor to choose branch rather than fork.
+1.

For example, the original repository: PRB0t/PRB0t, my FORK repository whtiehack/PRB0t, when I submit the PR,I can choose create a PR branch with PRB0t/PRB0t instead of  whtiehack/PRB0t.
@M3kH  ,thanks for you tools again.

@M3kH Let me know if you want my upstream CORS code. I can submit as a PR. If not, feel free to close this issue.

@j-rewerts if doesn't bother you too much I'm just curious which changes you apply for make it CORS compatible.
Although I rather not implement that in my published endpoint to avoid abuse of it.

I did it in this PR.

It would be nice to somehow make this configurable at deploy time for PRBot. That way, I don't have to maintain a hard fork of PR Bot. @M3kH Would be open to that? You could keep your no-CORS deployment and I could just pass in config options for my CORS deployment?

@j-rewerts Is there a way for you to test this branch https://github.com/PRB0t/PRB0t/pull/41 ?
I don't use now for deployment, so would be glad if you can :-)

I've actually never heard of now. I deployed using Heroku.

Closed with #41.


Technical Advisory 43870 Doc Update

Re: Technical Advisory 43870
Issue Description
The mitigation steps should include example to generate session cookie
Suggested Resolution
cockroach auth-session login maxroach --certs-dir=certs

  username |     session ID     |                           authentication cookie
+----------+--------------------+----------------------------------------------------------------------------+
  maxroach |<PHONE_NUMBER>82643969 | session=CIGAjv7pi7m9BxIQIpYyFNH5pRcqf2Y6kEgv6A==; Path=/; HttpOnly; Secure
(1 row)
#
# Example uses:
#
#     curl [-k] --cookie 'session=CIGAjv7pi7m9BxIQIpYyFNH5pRcqf2Y6kEgv6A==; Path=/; HttpOnly; Secure' https://...
#
#     wget [--no-check-certificate] --header='Cookie: session=CIGAjv7pi7m9BxIQIpYyFNH5pRcqf2Y6kEgv6A==; Path=/; HttpOnly; Secure' https://...
#

The explanation for cockroach auth-session should be in the reference docs for the CLI, and linked in the advisory. The advisory itself is not the right place to provide reference documentation.
I don't recall who's responsible to document the new command, or if there's a doc issue already. @Amruta-Ranade do you recall?

This one?
https://github.com/cockroachdb/docs/issues/6631

there's already effort to do that and will close this issue.


Add Machine Learning Interpretability

https://github.com/jphall663/awesome-machine-learning-interpretability
A curated list of awesome machine learning interpretability resources.
PRs Reviewed:
PR1643
PR1641
By submitting this pull request I confirm I've read and complied with the below requirements 🖖
Please read it multiple times. I spent a lot of time on these guidelines and most people miss a lot.
Requirements for your pull request

Don't waste my time. Do a good job, adhere to all the guidelines, and be responsive.

You have to review at least 2 other open pull requests.
Try to prioritize unreviewed PRs, but you can also add more comments to reviewed PRs. Go through the below list when reviewing. This requirement is meant to help make the Awesome project self-sustaining. Comment here which PRs you reviewed. You're expected to put a good effort into this and to be thorough. Look at previous PR reviews for inspiration.

You have read and understood the instructions for creating a list.

This pull request has a title in the format Add Name of List.

✅ Add Swift
✅ Add Software Architecture
❌ Update readme.md
❌ Add Awesome Swift
❌ Add swift
❌ Adding Swift
❌ Added Swift

Your entry here should include a short description about the project/theme of the list. It should not describe the list itself. The first character should be uppercase and the description should end in a dot. It should be an objective description and not a tagline or marketing blurb.

✅ - [iOS](…) - Mobile operating system for Apple phones and tablets.
✅ - [Framer](…) - Prototyping interactive UI designs.
❌ - [iOS](…) - Resources and tools for iOS development.
❌ - [Framer](…)
❌ - [Framer](…) - prototyping interactive UI designs

Your entry should be added at the bottom of the appropriate category.

The suggested Awesome list complies with the below requirements.

Requirements for your Awesome list

Has been around for at least 30 days.That means 30 days from either the first real commit or when it was open-sourced. Whatever is most recent.
Don't open a Draft / WIP pull request while you work on the guidelines. A pull request should be 100% ready and should adhere to all the guidelines when you open it.
Run awesome-lint on your list and fix the reported issues. If there are false-positives or things that cannot/shouldn't be fixed, please report it.
Includes a succinct description of the project/theme at the top of the readme. (Example)

✅ Mobile operating system for Apple phones and tablets.
✅ Prototyping interactive UI designs.
❌ Resources and tools for iOS development.
❌ Awesome Framer packages and tools.

It's the result of hard work and the best I could possibly produce.
If you have not put in considerable effort into your list, your pull request will be immediately closed.
The repo name of your list should be in lowercase slug format: awesome-name-of-list.

✅ awesome-swift
✅ awesome-web-typography
❌ awesome-Swift
❌ AwesomeWebTypography

The heading title of your list should be in title case format: # Awesome Name of List.

✅ # Awesome Swift
✅ # Awesome Web Typography
❌ # awesome-swift
❌ # AwesomeSwift

Non-generated Markdown file in a GitHub repo.
The repo should have awesome-list & awesome as GitHub topics. I encourage you to add more relevant topics.
Not a duplicate. Please search for existing submissions.
Only has awesome items. Awesome lists are curations of the best, not everything.
Does not contain items that are unmaintained, has archived repo, deprecated, or missing docs. If you really need to include such items, they should be in a separate Markdown file.
Includes a project logo/illustration whenever possible.

Either centered, fullwidth, or placed at the top-right of the readme. (Example)
The image should link to the project website or any relevant website.
The image should be high-DPI. Set it to maximum half the width of the original image.

Entries have a description, unless the title is descriptive enough by itself. It rarely is though.
Includes the Awesome badge.

Should be placed on the right side of the readme heading.

Can be placed centered if the list has a centered graphics header.

Should link back to this list.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.
Should be the first section in the list.
Should only have one level of nested lists, preferably none.

Has an appropriate license.

That means something like CC0, not a code licence like MIT, BSD, Apache, etc.
WTFPL and Unlicense are not acceptable licenses.
If you use a license badge, it should be SVG, not PNG.
To verify that you've read all the guidelines, please add comment with just the word unicorn.

Has contribution guidelines.

The file should be named contributing.md. Casing is up to you.

Has consistent formatting and proper spelling/grammar.

The link and description are separated by a dash. Example: - [AVA](…) - JavaScript test runner.
The description starts with an uppercase character and ends with a period.
Consistent and correct naming. For example, Node.js, not NodeJS or node.js.

Doesn't include a Travis badge.You can still use Travis for list linting, but the badge has no value in the readme.
Doesn't include an Inspired by awesome-foo or Inspired by the Awesome project kinda link at the top of the readme. The Awesome badge is enough.

Go to the top and read it again.

unicorn

For me, its okay. Thanks for contribution!

Thanks for making an Awesome list! 🙌
It looks like you didn't read the guidelines closely enough. I noticed multiple things that are not followed. Try going through the list point for point to ensure you follow it. I spent a lot of time creating the guidelines so I wouldn't have to comment on common mistakes, and rather spend my time improving Awesome.

For me, its okay. Thanks for contribution!

@vinibeloni Please do a better effort when reviewing. This is very far from following the guidelines.

Hi @matheusgmaia. Here are some pointers for things you might want to address if you want your PR to be merged:

The heading title of your list should be in title case format: # Awesome Name of List.
✅ Awesome Machine Learning Interpretability
❌ awesome-machine-learning-interpretability
Includes a project logo/illustration whenever possible (for your list, there may not be an image though).

Either centered, fullwidth, or placed at the top-right of the readme. (Example)
The image should link to the project website or any relevant website.
The image should be high-DPI. Set it to maximum half the width of the original image.

Has a Table of Contents section.

Should be named Contents, not Table of Contents.

Also, consider sticking to the following format for link items:
Link - Description.
Often, you just have long descriptive links or links with no description.

Thanks for the feedback.

This is not explicitly in contribution guidelines but under Python section you have links to zip files
* [Bayesian Case Model](https://users.cs.duke.edu/~cynthia/code/BCM.zip)
* [Bayesian Rule List (BRL)](https://users.cs.duke.edu/~cynthia/code/BRL_supplement_code.zip)
* [Falling Rule List (FRL)](https://users.cs.duke.edu/~cynthia/code/falling_rule_list.zip)

Items should link to a project/product pages with some descriptions and docs. If you need to have the above links maybe its better to point to the home page (first link 'Bayesian Case Model' case) https://users.cs.duke.edu/~cynthia/code.html at least it as a reference to an academic paper.

@matheusgmaia Bump

@matheusgmaia You should make a PR to fix the issues, as requested by @jphall663 here: https://github.com/jphall663/awesome-machine-learning-interpretability/issues/23


BUG: Derived parameter DMASourceID is not populated

Description
Execution script assessment for MSSQL occur "Derived parameter DMASourceID is not populated" because in the file "instanceReview.ps1" needs a space in line 127 on parameter "-h-1-w 32768"
$dmaSourceIdObj = @(sqlcmd -S $serverName -i sql\getDmaSourceId.sql -U $collectionUserName -P $collectionUserPass -C -l 30 -W -m 1 -u -h-1-w 32768)
Version
None
Priority
priority:0
What oracle database version are you seeing the problem on?
None
Which sql script version ?
None
Relevant log output
PS C:\Users\admin\dma\db>
PS C:\Users\admin\dma\db> powershell.exe .\RunAssessment.bat -serverName winsqls -port 1433 -collectionUserName sa -collectionUserPass dmasauser123 -manualUniId mcastanho
[02/07/24 17:53:54]   Retrieving Metadata Information from winsqls,1433
Sqlcmd: '32768': Unexpected argument. Enter '-?' for help.
[02/07/24 17:53:55]   Creating directory C:\Users\admin\dma\db\opdb_mssql_PerfCounter__16041001_4.3.28_MCASTANHO_master_MSSQLSERVER_020724175354

[02/07/24 17:53:55]   Checking directory path + log file name lengths for max length limitations...
[02/07/24 17:53:55]   Derived parameter DMASourceID is not populated.  Defaulting value....
[02/07/24 17:53:55]
[02/07/24 17:53:55]   Checking directory path + output file name lengths for max length limitations...
[02/07/24 17:53:55]   Executing Assessment on Server winsqls,1433 Against the Following Databases:

Thank you for reporting this.  This is occuring in situations where the instance is running on the non-default port and the user specifies a port on the command line.
In your case since your instance is running on the default port, you should be able to omit that switch and obtain a successful run.
I will incorporate the fix into the next release. Thank you for reporting this.