Add set as Lockscreen button to toolbar when image files are selected

What's the Problem?
No response
Solution/Idea
Adding a toolbar button will increase ease of use when setting an image as lockscreen.
Alternatives
NA
Priorities
No response
Files Version
No response
Windows Version
No response
Comments
Related: https://github.com/files-community/Files/issues/7769#issuecomment-1016431345

The "Set as background" could be changed to a flyout labelled as "Set as..." for example, and have it drop-down so you can choose either lockscreen or desktop. But, for me, changing the lockscreen isn't a "common" task, so just having the desktop background button is sufficient in my use case.

Adding a flyout would require two clicks to choose an action which will in most cases end up being the set as desktop background option.

Adding a flyout would require two clicks to choose an action which will in most cases end up being the set as desktop background option.

What about "Set as... Background" but if you right click it shows the flyout? Left-clicking will have the same effect (setting as background)

@BanCrash one of the goals of the toolbar is ease of access, would adding a menu flyout would have any benefit over the existing context menu?

@BanCrash one of the goals of the toolbar is ease of access, would adding a menu flyout would have any benefit over the existing context menu?

Yep, I think you are right. Then would be to add another button but just in case there is space for that.
Maybe we can recover the option to customize the toolbar so the users can choose what they want to have or not in the amount of space that we have.

Not sure what the proper element is called, but instead of a separate button why not a split button? The primary button is to set as desktop, and the arrow would show the dropdown to set as lockscreen. Personally, when I change my desktop, I always set my lockscreen to match, so this would be very useful to me.

@generalguy41 do you have a concept or design showing how this would work?

@generalguy41 I should have explained, we use split buttons in Files, the question was how it can work with the existing toolbar UI.

@yaichenbaum here's a quick mockup. Something like this:

This looks like a regular flyout, in order for the slip button to work, it would need a solid background.


Could you implement cross-validation with callbacks when to stop?

and/or train tree by tree with callbacks whether to stop training?
that'd be nice.
Doesn't have to be a python callback. c++ is fine if you don't want to lose in speed performance.

Thanks for your advice. We are working on this.

Just a suggestion. Xgboost creates K independent datasets for K-fold CV. You could save a lot of memory and make it fast if you instead set the id for each sample indicating which fold number is used in the testing.
For example if you pass a vector [0,1,2,3,4], then the first row would be used as a test in CV only in the first fold.
Or something like that. Do you understand what I mean?

顶楼上，迫切希望补上callback和指定validate dataset的功能，这样就可以代替lightgbm了，速度真的快了很多很多，这样好的project不被完成太可惜了！  还有在使用的时候发现数据传输到GPU花的时间比训练长不少，要是能有builtin的grid search就更完美了

没能力coding帮助楼主，楼主贴个支付宝吧我们赞助点咖啡钱

@zhuyw05 Thank you for the feedback! We will work on that. Please stay tuned.

Hi, we have added a function "cv" for cross-validation which supports the setting of the validation set. You can refer to the document for the parameters. We're still improving the python interface and will add callbacks such as early stopping in the future. Thanks.


[enhancement]: Investigate using spandrel for upscaling and image restoration

Is there an existing issue for this?

[X] I have searched the existing issues

Contact Details
No response
What should this feature add?
spandrel is a module extracted from the chaiNNer project that facilitates loading and running ML models. The focus is on image restoration workflows. Many architectures are supported. A1111 uses this in some fashion.
We should explore leveraging this library to extend our upscaling capabilities.
Alternatives
No response
Additional Content
No response

@RyanJDick Any thoughts on relying on spandrel for upscaling? Maybe this can be a solid base for our upcoming upscaling sprint.


Orientation into anatomical planes as part of the post-processing

Hello @pdedumast! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file pymialsrtk/interfaces/preprocess.py:

Line 1491:80: E501 line too long (80 > 79 characters)
Line 1587:80: E501 line too long (88 > 79 characters)
Line 1597:80: E501 line too long (86 > 79 characters)
Line 1602:5: E301 expected 1 blank line, found 0
Line 1609:80: E501 line too long (100 > 79 characters)
Line 1673:80: E501 line too long (80 > 79 characters)
Line 1682:80: E501 line too long (81 > 79 characters)
Line 1684:80: E501 line too long (86 > 79 characters)
Line 1697:80: E501 line too long (425 > 79 characters)
Line 1745:80: E501 line too long (174 > 79 characters)
Line 1765:80: E501 line too long (88 > 79 characters)
Line 1871:80: E501 line too long (96 > 79 characters)
Line 1898:1: W391 blank line at end of file

In the file pymialsrtk/pipelines/anatomical/srr.py:

Line 225:80: E501 line too long (159 > 79 characters)

In the file pymialsrtk/workflows/postproc_stage.py:

Line 22:1: E302 expected 2 blank lines, found 1
Line 55:80: E501 line too long (81 > 79 characters)
Line 84:80: E501 line too long (80 > 79 characters)
Line 87:30: E128 continuation line under-indented for visual indent
Line 90:30: E128 continuation line under-indented for visual indent
Line 111:29: E128 continuation line under-indented for visual indent
Line 113:29: E128 continuation line under-indented for visual indent
Line 116:29: E128 continuation line under-indented for visual indent
Line 118:29: E128 continuation line under-indented for visual indent
Line 120:29: E128 continuation line under-indented for visual indent


bugfix/cplp 2064/idp cleanup

idp.json for german translations to be added

Added

Findings are all added in ticket https://jira.catena-x.net/browse/CPLP-2465

Just to avoid duplication. Created new MyForm component.


ResponseStreamingError not retried with urllib3 2.x

Describe the bug
When using download_fileobj to get an s3 object in an environment with urllib3 version 2.x a tcp connection reset while streaming the response body will not be retried.
This is retried correctly when using urllib3 version 1.x
Expected Behavior
The request should be retried according to the configured policy
Current Behavior
botocore.exceptions.ResponseStreamingError is raised to the caller after only a single request attempt.
Reproduction Steps
Given the following script that simulates an unreliable network connection:
import http.server
import logging
import socketserver
import threading
from http import HTTPStatus
from io import BytesIO

import boto3
import botocore.client
from boto3.s3.transfer import TransferConfig

def repro(endpoint: str) -> None:
    session = boto3.Session(aws_access_key_id='', aws_secret_access_key='')
    client = session.client(
        "s3",
        endpoint_url=endpoint,
        config=botocore.client.Config(
            max_pool_connections=1, retries=dict(mode='standard', max_attempts=3)
        ),
    )

    client.download_fileobj(
        Bucket='bucket',
        Key='bad',
        Fileobj=BytesIO(),
        Config=TransferConfig(use_threads=False),
    )

class Handler(http.server.BaseHTTPRequestHandler):
    def do_HEAD(self):
        self.send_response(HTTPStatus.OK)
        self.send_header('Content-Length', '10000')
        self.end_headers()

    def do_GET(self):
        self.send_response(HTTPStatus.OK)
        self.send_header('Content-Length', '10000')
        self.end_headers()
        # content length and body do not agree - simulating a connection drop
        self.wfile.write(b'\x00' * 1000)

if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG)

    with socketserver.TCPServer(("localhost", 0), Handler) as httpd:
        threading.Thread(target=httpd.serve_forever, daemon=True).start()
        repro(f'http://localhost:{httpd.server_address[1]}')

and the following conda environment:
---
name: test
channels:
  - nodefaults
  - conda-forge
dependencies:
  - python 3.11
  - boto3 1.34.53
  - urllib3 2.0.7

Observe that only a single request is made and the following exception is raised:
botocore.exceptions.ResponseStreamingError: An error occurred while reading from response stream: ('Connection broken: IncompleteRead(1000 bytes read, 9000 more expected)', IncompleteRead(1000 bytes read, 9000 more expected))

and with the following conda environment:
---
name: test
channels:
  - nodefaults
  - conda-forge
dependencies:
  - python 3.11
  - boto3 1.34.53
  - urllib3 <2

Observe that multiple request attempts are made and the following exception is correctly raised:
s3transfer.exceptions.RetriesExceededError: Max Retries Exceeded

Possible Solution
No response
Additional Information/Context
No response
SDK version used
boto3 1.34.53
Environment details (OS name and version, etc.)
Python 3.11

This should be available in the next release of s3transfer now that https://github.com/boto/s3transfer/pull/301 is merged. Thanks again, @apmorton!


Revamp the Name.save()

There is alot we can do clean up this method and make it more concise.
Wait on this until #56 is completed.

While we are at, verify where we are using the Requests package. I believe that the save method is the only place that package is used. If that is the case, we can remove it and use urlib2, and reduce the number of dependencies by 1.


fix: install bindings once

Bindings were being overwritten whenever the script changed. This PR ensures the bindings are installed once on a given context.
Note the calls are guaranteed to run in order.
Fixed: crbug/1434252

Tests seem to be failing?


change cache file content

i'm changed the cache content from standard php parsable files to unserializeable php value

I did not know it was faster, I made this change because I feel it is safer from errors.


insertion and update result apis

First of all, I want to thank you about the module.
I jsut want to know if there any restrictions or a use case to return the id of inserted element with  insertOne and insertMany; why we don't return the inserted element containing the different attributes with id and also for updating an element too?

insert operation will return inserted_id


Q: Does skyeye support Secure Coalitions in SRS, and/or multiple teams

as title states, asking for documentation on if skyeye support Secure Coalitions in SRS, and/or multiple teams like redfor and bluefor, both with and without secure coalition enabled.

Hello!

if skyeye support Secure Coalitions in SRS

This is currently not implemented, but it would not be difficult for me to add support.

multiple teams like redfor and bluefor

My current strategy for this is to run two separate instances of SkyEye, one for each team. I had previously looked into supporting both using a since instance, but this adds a lot of complexity to save only around 2GB of RAM.
Note that I currently don't recommend using SkyEye for PvP because of https://github.com/dharmab/skyeye/issues/65 and because the bot currently has god-mode vision. I have some ideas for fixing both issues I'll be tackling in the coming weeks.


Make a migration guide/notes for Jean after migrating stCelo to react-celo to rainbowkit

Blocked by #125

See draft here: https://github.com/celo-org/celo-monorepo/blob/8e2e2c5c53bd7f7c5df4f2a64974555ad0250615/packages/sdk/contractkit/MIGRATION-TO-VIEM.md

Duplicate of #125 oops


Deprecate html4_writer

This does not remove the fixes that we made for the html4_writer, these could be removed in a future release.
Depends on #1075
Fixes #938

Also going to block this PR. It might make more sense to put this in a release before removing Sphinx 2 support. Currently, we have not described to users that it's required to upgrade to the HTML5 writer, so jumping right to breaking builds will be a bad experience for users.

Note, this does not break builds using the html4 writer this might not require sphinx2, I am a bit unsure if sphinx will work if we evaluate a config value which is not present.

Closing in favor of 114fb85b441db180af2f53dc0f74f16bf7c72e16


Add comment about vEgoStarting to interfaces

Do we want an assert after CarInterface.get_params() in car_helpers.py too or is this good?

Do we want an assert after CarInterface.get_params() in car_helpers.py too or is this good?

For so long as those conditions interact the way they do, I think an assert would be a good idea. I tripped over the oscillation condition while working on #22963. It shouldn't be permitted to happen and it's not obvious what's happening when it does.

Yeah it can be confusing, but when vEgoStarting is less than stopping, it's possible for both the starting condition and stopping condition to be true in longcontrol.py, so it oscillates between them both.
For example if v_target_future = 0.75, then v_target_future < (CP.vEgoStopping := 1.0) for stopping and v_target_future > (CP.vEgoStarting := 0.5) for starting are both true for this future target speed (logic in long_control_state_trans function`).

Can we fix the state machine so this oscillation doesn't happen?

I believe it would still oscillate, just between stopping and PID, rather than starting. I'll try testing a fix in #23333

Merging this now. Once we fix the oscillation we should remove the comment again.

Sounds good!


How to disable this GPO?

[Enter feedback here]
As stated in this document - when you receive this error
"This device is blocked from starting while the user is not logged in. (Code 55)"
Then it is because of "the device is blocked from enumeration due to a Group Policy"
It would be most beneficial for customers to know how to disable this Group Policy.
Very many customers has hardware that currently is worth nothing because of this.
Unless you want each and every customer who are using thunderbolt connected devices (external disk arrays, external graphic cards etc) to start using MacOS - because here it works!

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

ID: c6744b3e-ee2f-c905-7a0f-463f5a375cd8
Version Independent ID: 08b86303-c41c-723a-b70d-43ba29aacfe6
Content: CM_PROB_CONSOLE_LOCKED - Windows drivers
Content Source: windows-driver-docs-pr/install/cm-prob-console-locked.md
Product: windows-hardware
Technology: install
GitHub Login: @tedhudek
Microsoft Alias: tedhudek

Hi @mct370770, thanks for the question.
Can you please elaborate on your scenario a bit more? Are these Thunderbolt devices and is the user logged into the computer?  Or are you using remote desktop or some other method?

 Additionally I have some Mac Mini 2018. They are all equipped with 64Gbyte DRAM and 2Tbyte NVMe. Externally I have some Lacie 6Big 60Tbyte arrays and some Razor Core X with AMD RTX3070 cards. These devices are shared between the computers - and they are all connected through thunderbolt 3.
When I boot a computer with a device already attached there are never any problems.
but if I decide after boot to attach one of the thunderbolt 3 devices then on Windows I run into that specific problem - the problem never shows in MacOS on a Mac Mini - but it does show on the Mac Mini if I boot it with Windows.

As stated - when I attach a thunderbolt device to a Windows based computer after boot and after login, then the device is unaccessable - and the device driver is saying:
"This device is blocked from starting while the user is not logged in. (Code 55)"
And when searching for the RCA for this, then you will be directed to Microsoft saying this:
Code 55 - CM_PROB_CONSOLE_LOCKED
This Device Manager error message indicates that the device is blocked from enumeration due to a Group Policy / MDM (Intune) policy to protect from DMA attacks.
and I would like to know where to find this Group Policy - and more - how to disable it in this scenario.

Hi Michael,
The relevant group policy is documented on https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-dmaguard.
You can use the Group Policy Editor UI to change the setting there if you need to.
I went ahead and added a link to the above page to the page you were on, https://learn.microsoft.com/en-us/windows-hardware/drivers/install/cm-prob-console-locked.
Hope this helps!
Ted


Added a new music- Frozen in Time

Description
I have added a new relaxing music named "Frozen in Time".
Type of change

[x] New feature (non-breaking change which adds functionality)

Thankyou so much !!
On Mon, Oct 23, 2023 at 11:26 PM Eduard-Constantin Ibinceanu <
@.***> wrote:

Merged #47 https://github.com/eduardconstantin/Regenerator/pull/47 into
master.
—
Reply to this email directly, view it on GitHub
https://github.com/eduardconstantin/Regenerator/pull/47#event-10744292886,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2S5QNWU5RQJG6YDE64DVLLYA2VWNAVCNFSM6AAAAAA6LBZ2SKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG42DIMRZGI4DQNQ
.
You are receiving this because you were assigned.Message ID:
@.***>


Support for :target styling

https://twitter.com/DavidDarnes/status/560859653538848768
https://developer.mozilla.org/en-US/docs/Web/CSS/:target

Created a quick CodePen to reproduce the bug http://codepen.io/daviddarnes/pen/ogeMeK

After doing some research, it appears this a longstanding bug with history.pushState in both WebKit and Mozilla browsers. Simply put, browsers do not reevaluate CSS rules on pushState.

https://bugs.webkit.org/show_bug.cgi?id=83490
https://code.google.com/p/chromium/issues/detail?id=89165
http://lea.verou.me/2011/05/change-url-hash-without-page-jump/#comment-203995404

And the workarounds to this issue prevent history from being updated (meaning the back button won't let you navigate back through your anchor links) and cause a page jump (which defeats the point of the script): http://www.zachleat.com/web/moving-target/
Based on this, I think this has to get filed under wontfix because the solutions are worse than the issue, and it's really something browser-makers need to address.


chore: release main

:robot: I have created a release beep boop
ui5-cc-excelupload: 0.17.3
0.17.3 (2023-05-20)
Bug Fixes

remove popup in FE scenario when uploading (#223) (f7d12b3)

ui5-cc-excelupload-button: 0.5.3
Dependencies

The following workspace dependencies were updated

dependencies

ui5-cc-excelupload bumped from 0.17.2 to 0.17.3

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/marianfoo/ui5-cc-excelUpload/releases/tag/ui5-cc-excelupload-v0.17.3 :sunflower:

:robot: Release is at https://github.com/marianfoo/ui5-cc-excelUpload/releases/tag/ui5-cc-excelupload-button-v0.5.3 :sunflower:


Option to disable SNAT / Masquerade

https://discourse.firez.one/t/disable-masquerade/74
If enabled, it should only apply to packets from the wg-firezone interface

More feedback around this:
another thing, for those using IPv6, lets say you are assigning IPv6 IP's to clients from a routed pool of IP's (eg. you have a /64 routed to the server), it would be useful to add a flag to the config to allow skipping NAT for IPv6 (probably best for IPv4 also)

lets say in config:
# Enable NAT for IPv4 traffic
# default['firezone']['nftables']['nat_ipv4'] = true
#
# Enable NAT for IPv6 traffic
# default['firezone']['nftables']['nat_ipv6'] = true
the current nftables config currently looks like this
table inet firezone {
        chain forward {
                type filter hook forward priority filter; policy accept;
        }

        chain postrouting {
                type nat hook postrouting priority srcnat; policy accept;
                oifname "eth0" masquerade persistent
        }
}
it would change to something like this
table inet firezone {
        chain forward {
                type filter hook forward priority filter; policy accept;
        }

        chain postrouting {
                type nat hook postrouting priority srcnat; policy accept;
                oifname "..." meta nfproto ipv4 masquerade persistent comment "NAT for IPv4 traffic enabled"
                oifname "..." meta nfproto ipv6 masquerade persistent comment "NAT for IPv6 traffic enabled"
        }
}
so if you disable IPv4 or IPv6 NAT then the relevant nftables lines wouldn't be added

I am not sure if this is the best way to do it, but something like this commit may be useful:
gbe0/firezone@3d895296987e9d81ee39ec71f87cfacaa512d0df

Thank you very much! Looking forward to next release :)


chore: remove build tools from this repo and use the share tools

Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO - learn more)

Relates to https://github.com/kedacore/test-tools/pull/130

/run-e2e internal


⚠ ClamAV has degraded performance

In cd12a99, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 81 ms

Resolved: ClamAV performance has improved in 820a351.


Cancel Process leaves process node in graph

When the use is creating a workflow and clicks on a process (as if to add to the workflow graph) but then cancels the creation of the process, the process node is not removed from the graph/outline, and remains in the display of both. This is compounded by the fact that the display does not automatically update so the new (stray) node is not seen immediately. Once detected, the user's work around is to manually delete the node, but canceled nodes should be automatically deleted.

When cancel button is chosen have the UI tell the backend to delete the just created process.


Python Function Chaining Example Incorrect Example

Python example does not show true function chaining. Only shows how to call one function with different parameters.

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

ID: a535d4d1-4ba0-0da2-9c23-59a64293ccb5
Version Independent ID: c6e3379a-d55a-61ab-b20b-7cb87aea7881
Content: Function chaining in Durable Functions - Azure
Content Source: articles/azure-functions/durable/durable-functions-sequence.md
Service: azure-functions
GitHub Login: @cgillum
Microsoft Alias: azfuncdf

Pinging @davidmrdavid

Thanks for reaching out @tyler555g!
Ah yes, this is an interesting one and I see where you're coming from. While the Python example doesn't really take the output of one activity and pass it as the input to the next, it can still be considered "function chaining" because the pattern, in the docs themselves, is defined as follows:

Function chaining refers to the pattern of executing a sequence of functions in a particular order. Often the output of one function needs to be applied to the input of another function.

In other words, the pattern's main characteristic is to establish a list of Functions that need to be called in order. While it's common to do this in a way that takes the output of the previous Function and applies it to the next one in the sequence, this is not strictly necessary.
Also, the Python example is equivalent to their JS and C# counterparts, so it's been written to conform to those examples :) . Please let me know if this is unclear, but I believe the documentation is currently correct as it stands.
That being said, I do wonder if we should re-think these snippets and have it show the outputs of activities become the inputs to the next in the sequence. @cgillum, @ConnorMcMahon, what do y'all think? That seems to me to be a little more interesting to show.

import azure.functions as func
import azure.durable_functions as df

def orchestrator_function(context: df.DurableOrchestrationContext):

    data = context.get_input()
    result1 = yield context.call_activity("Activity1", data)
    context.set_custom_status(result1)
    result2 = yield context.call_activity("Activity2", result1)
    context.set_custom_status(result2)
    result3 = yield context.call_activity("Activity3", result2)
    result4 = yield context.call_activity("Activity4", result2)
    return [result3, result4]

main = df.Orchestrator.create(orchestrator_function)

As I have since figured this out. Leaving my suggested example here to help others trying to figure this out.

I think a compromise similar to what I have done above shows both types and provides clarity for those trying to understand the correct pattern. Thoughts @davidmrdavid , @cgillum , @ConnorMcMahon ?

Thank you for the proposal, @tyler555g!
Is there a reason why you included the set_custom_status APIs in the snippet? I'm trying to understand if that's meant to communicate something about the pattern. In general, I would prefer to use only the call_activity APIs as that would keep it simpler and easier to parse.
I personally like the following compromise:
import azure.functions as func
import azure.durable_functions as df

def orchestrator_function(context: df.DurableOrchestrationContext):
    data = context.get_input()
    result1 = yield context.call_activity("Activity1", data)
    result2 = yield context.call_activity("Activity2", result1)
    result3 = yield context.call_activity("Activity3", result2)
    return [result1, result2, result3]

main = df.Orchestrator.create(orchestrator_function)

That being said, as I mentioned, I don't believe that function-chaining necessitates passing the output of the previous function as input to the next. I think it's sufficient to simply call 3 functions in a sequence, one after the other. As a result, I'm biased to keep the sample as-is, as I believe it currently communicates the minimum requirement for function-chaining: functions being invoked in a sequence :)

I'm not opposed to explicitly having the second example, separated by an explanation along the lines of:
"Because we are scheduling these activities sequentially, we can utilize the return value of any of these functions in any subsequent activity executions."
My only other critique would be that I feel that when you pass sequential results to each other like you do in that example, generally you don't care about the intermediate results like result1 and result2 and really just care about the final result, so maybe just return result3?

That works for me!

Just returning result3 works for me


Adds a GitHub Action that publishes the Scaler docs.

@rafa-be - can we look into why the unit tests are taking so long to run? Looks like a runaway issue?

@rafa-be - can we look into why the unit tests are taking so long to run? Looks like a runaway issue?

Not sure what happened, I don't see any error.
I restarted it.

Thanks @rafa-be - we might want to investigate though as we've had this issue before where the tests just runaway and keep running on 👍 Not major, has occurred twice since we pushed out the repo, maybe 3 times max.


NAM loads with some settings maxed out in Reaper[BUG]

Having set up NAM in reaper when I close a session and return the settings will "default" to max positions. Even the EQ which was not touched and is still in an off state will all be maxed out though still off.
I can reproduce this each and every time and even if I recall a saved preset FX chain in reaper the same issue persists.
It would be great if the plug could hold any and all parameter settings within reaper. Not sure if this is a reaper thing or a NAM thing to be fair.
I am on a desktop running windows 11 and Reaper 6.75. This occurs with vst only not standalone. NAM 0.7.0
commit db4cf2dea019b1a8ef10b62cb2af6f5df2666608
I hope that helps.
Additional context
Add any other context about the problem here.

Thanks! This is a NAM thing--the reason is that there are a different number of parameters in the plugin in the new version (thanks to the noise gate), so old saved plugins don't match up when loaded in.
Things should be ok if you start with a new version of the plugin. Is than an acceptable workaround?

Got a few of these; going to close this and continue tracking on #81.


Fix checkpoint catch up for transactions not in extra_transactions

When catching up to checkpoint we want to be able to move to next checkpoint even when transactions aren't in extra_transaction. This was partially done in #4178 and #4221 but there were few problems introduced previously, and this PR fixes them, namely:

We now store all transactions in transactions_to_checkpoint when catching up to checkpoint right away. To achieve this we remove txn sequence number from transactions_to_checkpoint table as it is not used(and if needed is present in other databases)

We now can receive transactions from batch service that are already in checkpoint(could not happen before as checkpoint always followed batch service). We add double check to update_processed_transactions to exclude those. There is no concurrency issues here since update_processed_transactions takes &mut self.

Thanks. I think this works. But I would love to see some tests.


Added Flyway for database migrations

Flyway migrations are run only for H2 database, otherwise use
the sbt flyway plugin to run the migrations and pass in the JVM args
to point to your database.
Also added PureConfig to load the PetStore configuration.

👍  LGTM
Thanks, again, this code base helped me


Simplifying StyleSheet implementations

Right now any StyleSheet has a list of functions without a default implementation. Implementing a StyleSheet is really annoying, because you have to override all of the functions and not just the thing you want to change.
I recently wanted to just change the border_radius of a text_input and I had to write the following code.
impl StyleSheet for Styles {
    fn active(&self) -> Style {
        Style {
            border_radius: 0,
            ..Style::default()
        }
    }

    fn focused(&self) -> Style {
        Style {
            border_color: Color::from_rgb(0.5, 0.5, 0.5),
            ..self.active()
        }
    }

    fn placeholder_color(&self) -> Color {
        Color::from_rgb(0.7, 0.7, 0.7)
    }

    fn value_color(&self) -> Color {
        Color::from_rgb(0.3, 0.3, 0.3)
    }

    fn selection_color(&self) -> Color {
        Color::from_rgb(0.8, 0.8, 1.0)
    }
}

As you can see I mostly just copied your sourcecode.
If StyleSheets would have these default styles as default implementation like this:
trait StyleSheet {
    fn active(&self) -> Style {
        Style {
            background: Background::Color(Color::WHITE),
            border_radius: 0,
            border_width: 1.0,
            border_color: Color::from_rgb(0.7, 0.7, 0.7),
        }
    }

    fn focused(&self) -> Style {
        Style {
            border_color: Color::from_rgb(0.5, 0.5, 0.5),
            ..self.active()
        }
    }

    fn placeholder_color(&self) -> Color {
        Color::from_rgb(0.7, 0.7, 0.7)
    }

    fn value_color(&self) -> Color {
        Color::from_rgb(0.3, 0.3, 0.3)
    }

    fn selection_color(&self) -> Color {
        Color::from_rgb(0.8, 0.8, 1.0)
    }
}

Implementing StyleSheets would be way more easy. Changing the border_radius would now only require the following code:
impl StyleSheet for Styles {
    fn active(&self) -> Style {
        Style {
            border_radius: 0,
            ..Style::default()
        }
    }
}

Is there a reason why StyleSheets are implemented like this right now?

I will open a PR for this during the week.

How would you want to do default styles which can be extended?
What if any function that returns a Style receives the default style as argument?

I don't think that is how button::Stylesheet does it. I'm not against different techniques, why do you think that that would be better?

I'm not against different techniques though, why do you think that that would be better?

If you are talking about my previous comment then because I don't know how to override the active style of a button for example without having to set each field.
Example:
impl button::StyleSheet for Style {
  fn active(&self) -> button::Style {
    // here I have to create the whole button::Style struct which requires me to know about the default values
  }
}

After thinking about this some more I found that button::Default exists. Maybe making the Default styles accessible to the users would we a solution?
Example:
impl button::StyleSheet for Style {
  fn active(&self) -> button::Style {
    let mut style = button::DefaultStyle.active(); // renamed to DefaultStyle for clarity
    // do something with style
    style
  }
}

Maybe this is something that could be solved with code generation?
Like from your first comment, you are basically setting what you want, then copying and pasting the rest from iced's source. Wich code generation could totally do
Something like?
#[derive(Styles)]
impl StyleSheet for Styles {
    fn active(&self) -> Style {
        Style {
            border_radius: 0,
            ..Style::default()
        }
    }
}

I created a draft PR which prototypes the idea I mentioned above using a button.

@hecrj I think thisnshouod be closed because of #1362 and #781


Chore: update deprecated settings for tap-postgres, target-snowflake

Feature scope
Configuration (settings parsing, validation, etc.)
Description
I run tap-postgres target-snowflake and when I do, I get the warnings on every run for:
[warning] `kind: password` is deprecated for setting definitions in favour of `sensitive: true`, and is currently in use by the
following settings of extractor 'tap-postgres': 'password', 'ssh_tunnel.private_key', 'ssh_tunnel.private_key_password',
'ssl_client_private_key'. Please open an issue or pull request to update the plugin definition on Meltano Hub at
https://github.com/meltano/hub/blob/main/_data/meltano/extractors/tap-postgres/meltanolabs.yml.

[warning] `kind: password` is deprecated for setting definitions in favour of `sensitive: true`, and is currently in use by the
following settings of loader 'target-snowflake': 'password', 'private_key_passphrase', 'private_key_path'. Please open an
issue or pull request to update the plugin definition on Meltano Hub at
https://github.com/meltano/hub/blob/main/_data/meltano/loaders/target-snowflake/meltanolabs.yml.

Solve
We need to update to use
sensitive: true instead.

Hi @SimonSchmitke, thanks for logging!
This is a harmless warning for the foreseeable future. The migration of plugin definitions is tracked by https://github.com/meltano/hub/issues/1418 and the implementation will likely be backwards compatible.
I'm closing this, since it's arguably a metadata migration to be solved by the Hub 🙂.


Left pane of the File Manager not functioning

The left pane of the File Manager doesn't work (with big X) and displays an error message (see bottom right)

Based on the logs got related to authentic-theme on the file-manager library.
[01/Sep/2023:17:19:45 +1200] miniserv.pl started

[01/Sep/2023:17:19:45 +1200] Using MD5 module Digest::MD5

[01/Sep/2023:17:19:45 +1200] Using SHA512 module Crypt::SHA

[01/Sep/2023:17:19:45 +1200] PAM authentication enabled

[01/Sep/2023:17:19:46 +1200] Restarting

[01/Sep/2023:17:19:47 +1200] miniserv.pl started

[01/Sep/2023:17:19:47 +1200] Using MD5 module Digest::MD5

[01/Sep/2023:17:19:47 +1200] Using SHA512 module Crypt::SHA

[01/Sep/2023:17:19:47 +1200] PAM authentication enabled

Error: You are not allowed to access `/home/students/home/10000401/.usermin`. The only allowed directories are: `/home/students/home/10000401`. <samp>?</samp>

Error: You are not allowed to access `/home/students/home/10000401/.usermin/filemin`. The only allowed directories are: `/home/students/home/10000401`. <samp>?</samp>

Error: You are not allowed to access `/home/students/home/10000401/.usermin/mailbox`. The only allowed directories are: `/home/students/home/10000401`. <samp>?</samp>

[01/Sep/2023:17:20:48 +1200] Restarting

[01/Sep/2023:17:20:51 +1200] miniserv.pl started

[01/Sep/2023:17:20:51 +1200] Using MD5 module Digest::MD5

[01/Sep/2023:17:20:51 +1200] Using SHA512 module Crypt::SHA

[01/Sep/2023:17:20:51 +1200] PAM authentication enabled

Using the 'Frame Theme' got no displays of errors. However, the user much prefer the default theme (Authentic themee). as they accustomed to it and no idea what really cause it perhaps when upgrading the usermin/webmin as currently using the 2.002 version.

Downgraded the usermin to 1.791, seems the File Manager is stable on this theme.
Got issues on 1.8xx and 2.xxx.

Hello,
Is this Virtualmin created user? If not, how exactly did you create the user with which you're having this issue?
Did you perhaps change ACLs for this user you're having an issue with?
Are you logging in to Webmin (port 10000) or Usermin (port 20000).

Hi @iliajie
Virtualmin not installed on this server and no ACLs been altered, the user is authenticated via mysql_pam. On the current setup only admin users able to use the webmin (port 10000) and the rest via Usermin (20000) as limit the functionality to use specific modules (even though possible to webmin).
As per tested again and allowed 1 user to use webmin, it doesn't have such an issue. Referring to Webmin 2.102, Authentic theme version 21.05.

In other words, only Usermin version above 1.791 have an issue with the File Manager.

To streamline the troubleshooting process and save both time and effort, could you please provide detailed steps to reproduce the issue you're encountering? I recommend starting by creating a new Unix user named usermin-test. Document each step you take so that the issue can be reproduced consistently. Once you've done this, kindly share the steps with me. As I mentioned earlier, I have not been able to replicate the problem on my end.
Before we proceed further, could you please manually restart both Webmin and Usermin? After doing so, test to see if the issue persists when using a different browser in private or incognito mode.
Thank you!

Restarting both webmin/usermin been tested previously and even using different browsers or it's privacy mode but still no avail.
These are the steps for further testing:

I tried to create a new user as per suggested, still using the Usermin 1.791, & Authentic theme version 19.45
useradd test101 passwd test101

As I used jailed environment
jk_jailuser -m -s /usr/bin/bash -j /home/students test101

Login to usermin - works as expected (able to browse using the left pane in the file manager)

Upgrade the usermin, as got in the repo (anyways can do via web dashboard directly to the webmin site)
dnf update usermin

Login to usermin using test101 (in this upgraded to Usermin 2.002, Authentic theme version 21.05), it works then logout. Try to login old users/accounts - it doesn't works

Restart usermin/webmin - login back test101, this time left pane malfunctions and displays those errors, same as those old accounts.

As per observation it created in the url https://example.com:20000/filemin/index.cgi?path=home%252Fstudents%252Fhome%252Ftest101%252F.usermin&xnavigation=1
You are not allowed to access /home%2Fstudents%2Fhome%2Ftest101%2F.usermin. The only allowed directories are: /home/students/home/test101.
By removing any path (after index.cgi) will refresh the File Manager - https://example.com:20000/filemin/index.cgi

Further observation on the old File Manager using Usermin 1.791, you can specify the accessible directories.

But for the new one (latest one), it doesn't have similar options (configurations), which I think this caused the issue.

Hope this helps.
Currently downgrading back (so user's not notice it :-) )
dnf downgrade usermin-1.791-1

Further observation on the old File Manager using Usermin 1.791, you can specify the accessible directories.

Yes, I remember we decided to remove this option.

You are not allowed to access /home%2Fstudents%2Fhome%2Ftest101%2F.usermin. The only allowed directories are: /home/students/home/test101.

You may want to edit/create /etc/webmin/filemin/test101.acl file with the following configuration:
noconfig=1
work_as_user=test101
allowed_paths=/home/students/home/test101
work_as_root=0

.. it should work then, I think.

You may want to edit/create /etc/webmin/filemin/test101.acl file with the following configuration:
noconfig=1
work_as_user=test101
allowed_paths=/home/students/home/test101
work_as_root=0

.. it should work then, I think.
I tried but seems not working though, maybe it is dependent on Java File Manager. I will further check once usage is low.


refactor: remove moment package

moment package could be replaced by few line of code

Hi Erfan,
I'd like to work on this issue. Can you please assign it to me?

@MadGanGithub sure

@MadGanGithub I don't have any dummy accounts right now. but I can test it for your. open a PR

Done 👍

@erfanium is there anything else to be sorted out?
If not, this can be closed right?

@MadGanGithub yeah, thanks for the help!


Define Status Effects

Define StatusEffect class and the different types thereof. Have subclasses for Poison, Bleed, and Burn.
How to test: Test that they initialize properly with the correct values set as variables.


[bal-navigation] - bug report

Safari Issues General
Attribute flex gap is not supported on 14.XX Safari, removes all the paddings. https://github.com/baloise-incubator/design-system/issues/532

Desktop

[ ] Border Radius transition got lost

[ ] Breakpoint Issue, white bar shouldn't touch the viewport Lets discuss in a session

[ ] Framedrops on browser resize not mvp relevant

https://user-images.githubusercontent.com/62377419/190674401-41a5d47b-22a4-4fd1-9ea5-1bd7ddddad83.mov

[ ] Scroll Behaviour has to be double checked, it seems like sometimes the overlay box is not actice (All browser desktop) Contact @clastzoo to show more issue of this bug.

https://user-images.githubusercontent.com/62377419/190675768-dc28b479-00ac-4beb-a132-68ba52fe1d52.mov
Tablet
IOS

[ ] Search Popover adjusts wiredly, Safari, Firefox, Brave a working correctly.

Mobile
IOS
Safari, Chrome,Firefox

[ ] Overflow issue when the user swipe over the gap on the bottom of the page.

Some minor issues on landscape mode but not MVP relevant for now.
Android
No issues found  🎉🎉🎉🎉

Moved to prio2 as nothing is breaking.

https://gist.github.com/nicolaskopp/637aa4e20c66fe41a6ea2a0773935f6e
to fix the search popover scroll to top issue on iOS

Waiting for after Gery's vacation.


PHP Warning:  fclose(): supplied resource is not a valid stream resource

PHP 7.0.8
mongo-php-library 1.1.0 (final)
PHP Warning:  fclose(): supplied resource is not a valid stream resource in .../src/GridFS/ReadableStream.php on line 78
This is my php code. It reads images from a MongoDB collection and display each file.
<?php
// include Composer (mongodb) extension
require '/src/composer/vendor/autoload.php';

class GridFS {

        private $client;

        public function __construct() {
                $this->client = new MongoDB\Client("mongodb://localhost:27017");
        }

        public function Image($id) {

                $db = $this->client->selectDatabase("myfiles");
                $bucket = $db->selectGridFSBucket();

                $stream = $bucket->openDownloadStream($id);
                header("Content-type: image/jpg;");
                echo stream_get_contents($stream);
                exit;
        }

        public function FindFiles($limit) {

                $collection = $this->client->selectCollection("myfiles", "fs.files");
                $filter = [];
                $options = ['limit' => $limit];
                return $collection->find($filter, $options);
        }
}

$id = isset($_GET['id']) ? urldecode($_GET['id']) : null;

$gfs = new GridFS();

if(isset($id)) {
        $gfs->Image($id);
}

?>

<title>ImageFiles</title>

<?php

$files = $gfs->FindFiles(10);

foreach ($files as $file) {
        $id = $file["_id"];
        echo "
ID: $id
\r\n";
        echo "
 \r\n";
}
?>

My solution is, to hide the warning...
public function close()
{
    if (is_resource($this->buffer)) {
        @fclose($this->buffer);
    }
}

Can you share a PHP script that reproduces this warning?
Based on the code, it's not clear to me how this warning would be triggered unless ReadableStream::close() was invoked multiple times, which itself sounds like a bug in our StreamWrapper implementation.

I have inserted my example php code. You need some image files into mongo database "myfiles". I think, Close(); was invoked multiple times (for each image).

I was able to test this a bit and it appears to be specific to PHP 7.x. Our StreamWrapper's close() method is still only called once, but the in-memory stream we use for buffering appears to be closed before the GridFS stream that encapsulates it. When the exit; statement is moved out of the Image() method, the script completes without any warning:
if(isset($id)) {
    $gfs->Image($id);
    exit; // relocated from GridFS::Image()
}

This makes sense, as our stream goes out of scope when Image() returns and is closed naturally.
I'm currently in the midst of refactoring the StreamWrappers to not use streams for buffer (see: https://github.com/mongodb/mongo-php-library/pull/304), so this will be resolved. In the meantime, feel free to use the above work-around.

Many thanks for your help. I've looked your refactoring and your benchmarks. It is surprising that a string buffer is faster than writing it directly into RAM.

It is surprising that a string buffer is faster than writing it directly into RAM.

Strings are in RAM as well. I was a bit surprised to find that the php://memory stream was nearly 4x slower, but I suppose that may be overhead of PHP's APIs (e.g. fwrite()). There is definitely a use case for php://memory, as in our tests when we want to quickly feed strings into GridFS without creating a file on disk; however, there wasn't a huge need for it in our StreamWrappers.

This should be fixed by #304 and will be resolved in the next 1.1.x release.

Correction: #304 pertained only to WritableStream refactoring. This was actually resolved by ReadableStream refactoring in https://github.com/mongodb/mongo-php-library/pull/323 (PHPLIB-247).


Deprecate math module APIs that are already supported in langl.float module

Description:
Some math module APIs are already supported in lang.float module. Therefore math module APIs need to be depricated.
Steps to reproduce:
Run the following sample.
import ballerina/lang.'float as floats;
import ballerina/io;
import ballerina/math;

public function main() {
    float x = floats:sqrt(123.456);
    float y = math:sqrt(123.456);

    io:println(x);
    io:println(y);
}

x and y output are the same.
Affected Versions:
slp2

We already removed Math module from the ballerina SL release. Hence closing


Improve documentation for the items property

Fixes #37

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


fix(pages): move deployment to release.yaml

:tada: This PR is included in version 1.0.0-alpha.15 :tada:
The release is available on:

GitHub release
npm package (@alpha dist-tag)

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Object with screen-space refraction gets rendered on top

Describe the bug
Objects with screen-space refractive materials get rendered on top of the scene without respecting depth information. Cubemap-based refraction is behaving as expected.
To Reproduce
Steps to reproduce the behavior:

Create a scene with multiple objects.
Assign a material to one of them which has screen-space refraction mode enabled.
The refractive material gets rendered on top of the viewport without taking the depth into consideration.

Expected behavior
The same behavior as cubemap refraction, otherwise the feature would be unusable in multi-object scenes.
Desktop (please complete the following information):

OS: iOS
Backend: OpenGL

Do you have a screenshot you can share please? Refraction objects are rendered after opaque objects but before transparents, and they should respect depth testing unless you turn that off. I'll try tomorrow to see if I can repro. Could you also share your material file please?

I have created a basic scene that demonstrates the issue. There is no transparency involved, SSAO is disabled.

An example for the refractive material:
material {
  name : transparentBMaterial,
  shadingModel : lit,
  refractionType : solid,
  refractionMode : screenspace,
  parameters : [
  // baseColor
    {
      type : float3,
      name : baseColor
    },
  // roughness
    {
      type : float,
      name : roughness,
      default: 0.0
    },
  // transmission
    {
      type : float,
      name : transmission,
      default: 0.0
    },
  // ior
    {
      type : float,
      name : ior,
      default: 1.5
    },
  // microThickness
    {
      type: float,
      name: microThickness,
      default: 0.0
    },
  // thickness
    {
      type: float,
      name: thickness,
      default: 0.5
    },
  // absorption
    {
      type: float3,
      name: absorption,
      default: 0.5
    }
  ]
}
fragment {
  void material(inout MaterialInputs material) {
    prepareMaterial(material);
    material.baseColor.rgb = materialParams.baseColor;
    material.roughness = materialParams.roughness;
    material.transmission = materialParams.transmission;
    material.ior = materialParams.ior;
    material.thickness = materialParams.thickness;
    material.absorption = materialParams.absorption;
  }
}

Thank you! I can reproduce the issue, it looks like our refracted objects are always drawn after all the opaque objects. Instead the refracted pass should be triggered once all the objects behind the first refracted object are drawn.


fix(redis sink plugin): use redis v7 lib in redis sink to consistent with edgeX

fix(redis sink plugin): use redis v7 lib in redis sink to consistent with edgeX
Signed-off-by: Jianxiang Ran<EMAIL_ADDRESS>

need update the redis plugin in 1.3.0 release


istioctl analyze should support structured output (json)

To support CI use cases, it would be useful to support structured output. This would allow parsing the output and doing certain things for different errors, or whatever else they want.

This is discussed a bit in this design doc: https://docs.google.com/document/d/1KuxDRPPt283jx_cIs2C9sFHjoHvoskJt3IGqhPJVHtM/edit
TL;DR: we probably want to support -o yaml and -o json like kubectl does.

I think there's enough acceptance of the doc to go ahead and get started so I'm gonna claim this issue and go ahead.


fix: Add view-transition-name property to CSSProperties type

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.94%. Comparing base (ce4eea7) to head (afa2152).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   94.94%   94.94%
=======================================
  Files          42       42
  Lines        2593     2593
=======================================
  Hits         2462     2462
  Misses        131      131

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Problem when detect hand palm with the model

Hi, i'm trying to use Full Yolo model to train and detect hand palm. I loaded the pretrain weight and try to test the model with 10 pic to train and 2 pic to test. After train about 17 epochs, the model can predict the box correctly but it also predict some mini box within that box with higher score than the main box. Please help. This is a result pic:
https://i.imgur.com/h1BpflZ.jpg

So the problem is that there are so many boxes activated. It's usually because of not enough training. I would suggest you train a couple more epochs.
The other thing is that your dataset is too small. Try to collect more data, such as from http://www.robots.ox.ac.uk/~vgg/data/hands/.


SemanticZoom combined with GridView cause the GroupHeader swaying during the scrolling

Describe the bug
SemanticZoom combined with GridView cause the GroupHeader swaying during the scrolling
Steps to reproduce the bug
check the following link https://github.com/microsoft/Xaml-Controls-Gallery/issues/805#issue-1039264977
check out the following project (Do not use full screen mode. Try resize the window to different size. Some size will behavior normal )
https://github.com/OneFingerCodingWarrior/Swaying.git
Expected behavior
No response
Screenshots

If scroll with vertical bar, control behavior normal

NuGet package version
No response
Windows app type

[X] UWP
[ ] Win32

Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
Windows version: 21H1 19043.1288
Microsoft Visual Studio Community 2019
Version 16.11.5

@RBrid and @ranjeshj FYI, thoughts on whats causing?

Hi Team, Any updates?


Español simplistic solution using site package

I decided to use the site package to load tools module.
And modify the path on the notebooks to load data.

sorry, I take some responsibility for that:  that is in some sense by design. The Binder instances are connected to tagged releases of the repository rather than to master.  That way, there's less chance that someone commits to master and breaks the binder startups.
You can tell as the url in the drop-in README includes the release number, and should be changed at mybinder ... after creating a new tagged release.

sorry, I take some responsibility for that: this is in some sense by design. The Binder instances are connected to tagged releases of the repository rather than to master. That way, there's less chance that someone commits to master and breaks the binder startups.

but still there is something weird, I see a different thing in binder than what John is seeing... I just started the binder from the link in the README...

You'd have to be using different urls?  I.e. did John pick an old one up in the slack channel, for instance.
I checked the Spanish & English READMEs are both:
https://mybinder.org/v2/gh/michaelJwilson/DESI-HighSchool/1.2.3
which incidentally, fails to load the docker image some of the time :s

Yes sorry! I have clicked the docker button :disappointed:
So, in this order the unique modification that is valid for now is the Rydberg Formula.
Thanks for the replies. So, I could collaborate in this project for next experiments :grinning:

Yes sorry! I have clicked the docker button 😞
So, in this order the unique modification that is valid for now is the Rydberg Formula.
Thanks for the replies. So, I could collaborate in this project for next experiments 😀

Thanks for looking into it @jsuarez314 !


scripts/detectNotUsingGitPush1by1.fsx: fix

Please respect our workflow guidelines: https://github.com/nblockchain/conventions/blob/master/WorkflowGuidelines.md


Fails under WAMP configuration

Shebang is not supported in windows. :/
Running this in a WAMP environment, it fails.

 Any suggestions?


Round-trip of SBOL2/SBOL3 python conversion

Clean up minor details to allow triple-to-triple identity in first tests of SBOL2/SBOL3 Python conversion
Note that pySBOL2 validation fails, apparently due to an issue with SHACL rules for the DateTime type (https://github.com/SynBioDex/pySBOL2/issues/429)

I am going ahead with a merge as there has been no review for several days.


Implement support of Matplotlib figures

Hello @lanpa,
First of all, thanks a lot for investing the time and developing this project. I find it super useful whenever I try (and usually fail ;) hacking PyTorch.
Frequently, when I work there's a need to create Matplotlib plot and add it to TensorBoard. There are known and well documented ways to do it by converting the figure to image. One of your examples in this repo actually demonstrates it and there's a few other ways to achieve the same result.
I was wondering if it would make sense to implement SummaryWriter.add_figure(...) method that would accept matplotlib.Figure, convert it into a RGB image and then add it to TensorBoard. I think the implementation could look roughly like this:
import matplotlib.pyplot as plt
import matplotlib.backends.backend_agg as plt_backend_agg

class SummaryWriter:
    def add_figure(self, tag, figure, global_step=None, close_figure=True):
        canvas = plt_backend_agg.FigureCanvasAgg(figure)
        canvas.draw()
        data = np.frombuffer(canvas.buffer_rgba(), dtype=np.uint8)
        w, h = figure.canvas.get_width_height()
        image = data.reshape([h, w, 4])[:, :, 0:3]
        if close_figure:
            plt.close(figure)
        self.add_image(tag, image, global_step)

I'll submit a PR if you think adding the method makes sense and it fits well into the API.
Have a good one!

from utils import figureToImg
def figureToImg(tag, figure, global_step=None, close_figure=True):
    canvas = plt_backend_agg.FigureCanvasAgg(figure)
    canvas.draw()
    data = np.frombuffer(canvas.buffer_rgba(), dtype=np.uint8)
    w, h = figure.canvas.get_width_height()
    image = data.reshape([h, w, 4])[:, :, 0:3]
    if close_figure:
        plt.close(figure)
    return image
writer.add_image(tag, figureToImg(figure), global_step)

Some quick thoughts:

We should make it fail fast and decouple the code if possible.
User can plot a batch of plots. ex: writer.add_image(tag, torch.cat(figureToImg(figure), figureToImg(figure1), figureToImg(figure2),...)) without subplot()
It should be easier to deal with other libs such as pandas visualization in the future.
The result of figureToImg(figure) can be saved to disk easily.
There's an add_video() function, so the return value of figureToImg() can be used to make GIFs too.

What do you think?

Thanks a lot for replying and your discussion ideas. Here are my thoughts:

The decoupling comes at a cost of extra from tensorboardX.utils import figureToImg line the user has to type. You're right that matplotlib would become a "soft" dependency just like moviepy. Situation here is a bit different though. Absence of matplotlib on a system can't end up as a late failure since one can't create a plot without it whereas one can easily create a movie without moviepy.

I didn't know about the batch feature. I have to try it out someday... I think we can support a single figure or a list of figures: writer.add_figure(tag, [figure1, figure2, ...]) to "mimic" this feature.

I agree. Maybe we can mix both ideas together by having utils.figureToImg(...) for conversion that would be called from SummaryWriter.add_figure(...).

That's true that saving would be somewhat easier. But I think vast majority of people who use this library want to display the image in TensorBoard so they can avoid storing it on disk.

There's a special API for matplotlib.animations so maybe videos should be handled in a separate issue, because it may be harder to figure out the right API than it seems at the first sight.

Using the tensorboardX.utils.figureToImg has also the disadvantage of being a buried deeper in the documentation (BTW The RTFD docs are great) and harder to find for the end-user. The figureToImg(...) function wouldn't be directly listed on the main page, right?

So I guess the choice between the two options is a matter of taste more than anything else:

Option A: writer.add_figure(tag, fig, global_step)
 writer.add_figure(tag, [fig1, fig2, fig3], global_step)

Option B:from tensorboardX.utils import figureToImg
writer.add_image(tag, figureToImg(fig), global_step)
writer.add_image(tag, torch.cat([figureToImg(fig1), figureToImg(fig2), figureToImg(fig3)], global_step)

plotting a batch is simply passing [N, H, W, 3] array to add_image(). add_figure(tag, [figure1, figure2, ...]) looks good too.
For people who don't need tensorboard, they can use your code to save plot easily:)

so your reply on point 3 serves this.

It can be listed under a new class tensorboardX.utils

I agree the difference is the API. And we can provide both options with the idea of point 3 :)

Agreed. Thanks. PR coming in a little bit.

thanks!


Broken Camera

I've downloaded new version of miritore and tried to export camera for alliance stardust, it was completely broken

camera with new tool

camera with old one

Looks like 67ab03650211baf7a3b075ac461dacade80e0383 broke the camera function (d038fb978463037ceb874f39d23cf28dff16aba2 works, <IP_ADDRESS>). I'll fix this asap.

But meanwhile, Fermata in Rapsodia camera works fine o: better than in old version