Classification metrics consistency

🚀 Feature

First of all, thank you very much for this awesome project. It helps a lot evaluating deep learning models on standard and out-of-the-box metrics for several application domain.
My request(s) will be more focused on classification metrics (also applied to semantic segmentation). Maybe, we will need to split that into several issues. Do not hesitate.
Motivation

I have made some tests to check if all metrics taking the same inputs work as expected. I have multiple scenarios in mind, since semantic segmentation is a pixel-wise classification task :

Binary classification
Multi-class classification
Binary semantic segmentation
Multi-class semantic segmentation

Doing those tests (mentioned below), I noticed some inconsistency between the different metrics (shape of inputs, handling binary scenario, parameters name, parameters default values, etc.). The idea would be to standardize more the interface of each classification metrics.
Pitch

Let us take the different scenarii in mind:
Binary classification
import torch
from torchmetrics import *

# Inputs
num_classes = 2
logits = torch.randn((10, num_classes))
targets = torch.randint(0, num_classes, (10, ))
probabilities = torch.softmax(logits, dim=1)

# Compute classification metrics
metrics = MetricCollection({
    'acc': Accuracy(num_classes=num_classes),
    'average_precision': AveragePrecision(num_classes=num_classes),
    'auroc': AUROC(num_classes=num_classes),
    'binned_average_precision': BinnedAveragePrecision(num_classes=num_classes, thresholds=5),
    'binned_precision_recall_curve': BinnedPrecisionRecallCurve(num_classes=num_classes, thresholds=5),
    'binned_recall_at_fixed_precision': BinnedRecallAtFixedPrecision(num_classes=num_classes, min_precision=0.5, thresholds=5),
    'calibration_error': CalibrationError(),
    'cohen_kappa': CohenKappa(num_classes=num_classes),
    'confusion_matrix': ConfusionMatrix(num_classes=num_classes),
    'f1': F1(num_classes=num_classes),
    'f2': FBeta(num_classes=num_classes, beta=2),
    'hamming_distance': HammingDistance(),
    'hinge': Hinge(),
    'iou': IoU(num_classes=num_classes),
    # 'kl_divergence': KLDivergence()
    'matthews_correlation_coef': MatthewsCorrcoef(num_classes=num_classes),
    'precision': Precision(num_classes=num_classes),
    'precision_recall_curve': PrecisionRecallCurve(num_classes=num_classes),
    'recall': Recall(num_classes=num_classes),
    'roc': ROC(num_classes=num_classes),
    'specificity': Specificity(num_classes=num_classes),
    'stat_scores': StatScores(num_classes=num_classes)
})
metrics.update(probabilities, targets)
metrics.compute()

Binary classification is acting as expected, except for the KLDivergence metric which complain with following exception:
RuntimeError: Predictions and targets are expected to have the same shape

I have several questions regarding the binary scenario:

What is considered the best practice?  Having num_classes set to 2? Having set to 1 but some metrics complain about it (ConfusionMatrix, IoU)?
Is setting num_classes to 2 is considered as binary or multi-class mode? I imagine it depends on the metric.
Some metrics take num_classes as None value for binary mode, some others don't. It is not really clear, to my mind, how to handle properly binary classification with all those metrics.

Multi-class classification
This mode seems to work as expected, and being consistent since num_classes is clearly defined here. Hence, the same question,  is computing the metrics with 2 classes equivalent to binary mode. If not, how to handle properly that mode.
Code that is properly working (expect for the KLDivergence, same issue as mentioned above).
import torch
from torchmetrics import *

# Inputs
num_classes = 5
logits = torch.randn((10, num_classes))
targets = torch.randint(0, num_classes, (10, ))
probabilities = torch.softmax(logits, dim=1)

# Compute classification metrics
metrics = MetricCollection({
    'acc': Accuracy(num_classes=num_classes),
    'average_precision': AveragePrecision(num_classes=num_classes),
    'auroc': AUROC(num_classes=num_classes),
    'binned_average_precision': BinnedAveragePrecision(num_classes=num_classes, thresholds=5),
    'binned_precision_recall_curve': BinnedPrecisionRecallCurve(num_classes=num_classes, thresholds=5),
    'binned_recall_at_fixed_precision': BinnedRecallAtFixedPrecision(num_classes=num_classes, min_precision=0.5, thresholds=5),
    'calibration_error': CalibrationError(),
    'cohen_kappa': CohenKappa(num_classes=num_classes),
    'confusion_matrix': ConfusionMatrix(num_classes=num_classes),
    'f1': F1(num_classes=num_classes),
    'f2': FBeta(num_classes=num_classes, beta=2),
    'hamming_distance': HammingDistance(),
    'hinge': Hinge(),
    'iou': IoU(num_classes=num_classes),
    # 'kl_divergence': KLDivergence(),
    'matthews_correlation_coef': MatthewsCorrcoef(num_classes=num_classes),
    'precision': Precision(num_classes=num_classes),
    'precision_recall_curve': PrecisionRecallCurve(num_classes=num_classes),
    'recall': Recall(num_classes=num_classes),
    'roc': ROC(num_classes=num_classes),
    'specificity': Specificity(num_classes=num_classes),
    'stat_scores': StatScores(num_classes=num_classes)
})
metrics.update(probabilities, targets)
metrics.compute()

Binary semantic segmentation
Since TorchMetric supports extra dimensions for logits and targets, these classification metrics may also be used for semantic segmentation tasks. But for that type of task, I ended up with some issues.
Let us take an example of 10 images of 32x32 pixels.
import torch
from torchmetrics import *

# Inputs
num_classes = 2
logits = torch.randn((10, num_classes, 32, 32))
targets = torch.randint(0, num_classes, (10, 32, 32))
probabilities = torch.softmax(logits, dim=1)

# Compute classification metrics
metrics = MetricCollection({
    'acc': Accuracy(num_classes=num_classes),
    'average_precision': AveragePrecision(num_classes=num_classes),
    'auroc': AUROC(num_classes=num_classes),
    # 'binned_average_precision': BinnedAveragePrecision(num_classes=num_classes, thresholds=5),
    # 'binned_precision_recall_curve': BinnedPrecisionRecallCurve(num_classes=num_classes, thresholds=5),
    # 'binned_recall_at_fixed_precision': BinnedRecallAtFixedPrecision(num_classes=num_classes, min_precision=0.5, thresholds=5),
    'calibration_error': CalibrationError(),
    'cohen_kappa': CohenKappa(num_classes=num_classes),
    'confusion_matrix': ConfusionMatrix(num_classes=num_classes),
    'f1': F1(num_classes=num_classes, mdmc_average='global'),
    'f2': FBeta(num_classes=num_classes, beta=2, mdmc_average='global'),
    'hamming_distance': HammingDistance(),
    # 'hinge': Hinge(),
    'iou': IoU(num_classes=num_classes),
    # 'kl_divergence': KLDivergence(),
    'matthews_correlation_coef': MatthewsCorrcoef(num_classes=num_classes),
    'precision': Precision(num_classes=num_classes, mdmc_average='global'),
    'precision_recall_curve': PrecisionRecallCurve(num_classes=num_classes),
    'recall': Recall(num_classes=num_classes, mdmc_average='global'),
    'roc': ROC(num_classes=num_classes),
    'specificity': Specificity(num_classes=num_classes, mdmc_average='global'),
    'stat_scores': StatScores(num_classes=num_classes, mdmc_reduce='global')
})
metrics.update(probabilities, targets)
metrics.compute()

First of all, BinnedAveragePrecision, BinnedPrecisionRecallCurve and BinnedRecallAtFixedPrecision are failing with following exception:

RuntimeError: The size of tensor a (2) must match the size of tensor b (32) at non-singleton dimension 2

While it is stated in the documentation (https://torchmetrics.readthedocs.io/en/latest/references/modules.html#binnedrecallatfixedprecision) that forward should accept that type of format (logits = (N, C, ...) and targets = (N, ...)).

Accuracy has a default value for mdmc_average set to global, while other metrics (Precision, FBeta, Specificity, etc) have it set to None -> Need to be consistent on this. Either everything is set to None or global. I would argue that setting the default to global would be ideal since the user would be able to use those metrics for classification or semantic segmentation tasks seamlessly.

I notice that StatScores uses mdmc_reduce parameter while the other metrics called it mdmc_average. I think, it would be suitable to be consistent over the name of this parameter. The easiest change would be to adopt definitely mdmc_average(since only StatScores would need to be updated).

Once again, how should we properly deal with binary data. For the example, I use a 2-classes workaround but is there a better of handling binary semantic segmentation tasks?

Multi-class semantic segmentation
The scenario is the same as the previous one while setting num_classes to a higher value than 2.
Conclusion
This issue gathers different topics that may be need to be treated separately but have in common API consistency.
We can start a discussion about it, but my main question, regarding that long text, is how to properly deal with binary classification and semantic segmentation.

Is using 2-classes a suitable workaround?
Or should we be compliant with BCELossWithLogits interface for example, meaning having the probabilities and targets having the exact same shape (for instance (10, 32, 32) in my example).

I would like to have your thoughts about that. :)
And sorry for that long issue but I wanted to be as clear as possible, providing meaningful example.
Alternatives

Document more on how each metric should be used in binary tasks.
Additional context

The main idea of all those requests is to ease the use of those metrics and standardize interfaces (shape of inputs, num_classes parameters, etc.). I understand that is a tough topic but it matters.

Additional question, if I am correct, TorchMetrics handles those 4 scenarii for now (based on that: https://github.com/PyTorchLightning/metrics/blob/6bcc8b0f7f52b370583aff4a9192d7a399f3da75/torchmetrics/utilities/checks.py#L73):
# Get the case
if preds.ndim == 1 and preds_float:
    case = DataType.BINARY
elif preds.ndim == 1 and not preds_float:
    case = DataType.MULTICLASS
elif preds.ndim > 1 and preds_float:
    case = DataType.MULTILABEL
else:
    case = DataType.MULTIDIM_MULTICLASS

Would MULTIDIM_BINARY make sense to handle properly binary semantic segmentation?

Hi @mayeroa, thanks for raising this issue.
You are completely right that there are some problems with the consistency of our classification metrics, which are becoming more and more clear as we gain more users.
The optimal case would be that all metrics support binary, multi-label and multi-class classification and that the user can have as many additional dimensions as the want for each metric. However, this is definitely not the case at the moment.
I think it is pretty clear to me that the hole classification package need to be refactored, and IMO we need to add an argument called task (or something) which can be either binary, multi-label, multi-class which the user needs to provide. However, this is a huge undertaking and I am not sure when we get the bandwidth to do it.

cc: @aribornstein @ethanwharris

Issue will be fixed by classification refactor: see this issue https://github.com/Lightning-AI/metrics/issues/1001 and this PR https://github.com/Lightning-AI/metrics/pull/1195 for all changes
Small recap: This issue describes a number of inconsistencies in the classification package especially regarding how binary tasks are dealt with, both for single dimensional input but also multi dimensional input (like in segmentation). In the refactor all metrics have been split into a binary_*, multiclass_* and multilabel_* version that all follows the same interface to make the metrics consistent. To be precise regarding this issue:

For Binary classification -> use binary_* metrics
Multi-class classification -> use multiclass_* metrics
Binary semantic segmentation -> use binary_ metrics
Multi-class semantic segmentation -> use multiclass_* metrics

Issue will be closed when https://github.com/Lightning-AI/metrics/pull/1195 is merged.


[Ahuna] Assistant gallery modal

Create the page as per figma
ignore the names under the assistant
ONLY with All / From workspace / from dust tabs for now
NO Add / test buttons (but ... button for AssistantDetails modal)
Button "See all assistants" from home conversation points to gallery
assistant gallery should

not show private assistants
not show assistants from my list when shopping for new ones
show workspace assistants with triggers? or how?

Related framing and figma
Prototypes of what's going to be done are here for members and here for admins

Test is not implemented yet but will add a card for that


lib/nationbuilder: include response object in errors

This commit provides users with access to HTTP response objects
when the NationBuilder client encounters an error. Among other
things, this allows applications to respond intelligently to
different status codes. For example, checking for a 401 status
code can indicate to the host application that an access token
has expired or is otherwise invalid.
 Other than extending the error
objects with a response accessor, there should be no other
side effects.
Affected classes:

ServerError
ClientError
RateLimitedError

@jeffomatic apologies for the delayed review - I can see the need for more/better error handling here, it feels like that might fit better with more error-specific classes for the types encountered for related status codes (ex. NationBuilder::UnauthorizedError for status code 401) instead of giving access to the full response in each case. Thoughts?

@codealchemy That makes sense, especially given that there is already some precedence with RateLimitedError.
However, regardless of how errors manifest as types, I do think that exposing the raw response might be a nice feature for debugging things that fall outside of the error conditions that have been intentionally classified by the client code. When I've had to maintain APIs, this kind of thing happens due to bugs in the API server, or because it may be difficult to enumerate all possible error conditions from the API server, or even more likely, the because client app is using an HTTP proxy on their side that is misbehaving.
One other thing to consider with the class-oriented strategy is that it would change your interface (maybe you could subclass ClientError? to preserve compatibility with rescue clauses?), and it may put you on the hook for maintaining an exhaustive list of error cases in the client code.

I think giving access to the full response would be exposing more than we need to; additionally any relevant information (code, body, headers) would be an additional method call away - if we're to expose more context of the response in the error I think it would be preferable to be deliberate on which pieces of the response to surface (for example, how Koala and Twitter gems access attributes such as http_status)
Subclassing ClientError would be the way to go for the example I mentioned above - though it feels like a combination of both approaches would both give more context to the consumer on the error, and alleviate the need for an exhaustive list of error classes. We've covered Unauthorized and http_status codes so far, curious to your thoughts on what else might be helpful here.

I think giving access to the full response would be exposing more than we need to

Sure, that makes sense. I think it's not quite my place to determine what error conditions ought to be exposed as types, since I'm not privy to the full range of error conditions exposed to your users, but this feels like a good start:

Adding a common ResponseError base class for ServerError, ClientError, and RateLimitedError that has http_status, body, and headers accessors.
Adding an UnauthorizedError as a child class to ResponseError.

RateLimitedError would technically fall under ClientError in my book, but I would rather not mess with the relationship between existing error classes.
What do you think?

That looks good - however something I missed catching earlier is that you should be able to access the last response through the client after a request (noted in the thread here, related client code here). It appears that in the case of errors, this fails to get set because we raise the error when parsing the raw response - and it looks like moving that setting into an ensure in #perform_request_with_retries would solve the issue(s) you're trying to address without needing any changes to the current error classes - thoughts?

and it looks like moving that setting into an ensure in #perform_request_with_retries would solve the issue(s) you're trying to address without needing any changes to the current error classes

That's fine also. Typed errors are a nice convenience, but maybe more surface area than you want to mess with. The only concern here is that this solution isn't thread-safe (an issue in JRuby or Sidekiq or whatever) in the case that the client object is shared, but that's an architectural question that is out of scope for this issue. If #40 lands, I'd be fine closing this PR.

@jeffomatic thanks for the discussion here and bringing this to our attention - #40 has been merged and was a part of the 1.6.0 release, which is now available.


Use the PaneProgressBar on the heat map and pca plots

This change now makes it so that the PaneProgressBar gets used by RTScheduleGraphPane. Here's what it looks like as it is updating a change that I made to the list of window widths:

Here are some things that I would like feedback on:
I added a new class "ProgressHandler" which can be constructed from just a CancellationToken and an Action<int>.
Q. Do we really need a new class which does the same thing as "IProgressMonitor"?
A. Nick's answer: I tried using IProgressHandler in ClusterDataSet.PerformClustering, and it would have been pretty complicated code to pass an IProgressStatus object to the IProgressHandler to indicate that the percent complete had changed.
Q. Should UpdatePercentComplete take a double instead of an integer
A. Nicks's answer: I think it probably should (or at least there should be an overload which takes an integer). I could imagine a case where integer granularity between 1 and 100 would not be fine enough.
I made some changes to PaneProgressBar.
I changed the coordinates form CoordType.PaneFraction to CoordType.XPaneFractionYChartFraction. This simplified the code a lot because now the Y-coordinate zero is right below the Chart Title. I currently am positioning the progress bar 10% of the way below that title (.1f):
       private PointF _barLocation = new PointF(1f/3, .1f);
Q. Does anybody have any opinion about what the Y-coordinate of that progress bar should be?
Here are some more screenshots:

Maybe the implementation could be updated to support unknown progress, like the Windows progress bar where it just bounces back and forth, indicating that processing is happening, but it is not possible to indicate how close it is to complete.

Do those save and restore correctly?

No, the work to make these graphs behave like proper dockable windows is going to happen in a different branch.
My plan is to make it so that there is only one heat map: if you ask for a heat map from either a Document Grid or a Fold Change Grid, and there is already a heat map showing, then the grid will become the new data provider for the heat map.
In the .sky.view file, the heat map will remember which grid window was its owner.
I haven't figured out all of the details of how that's going to work.

shouldn't IsCanceled check the CancellationToken instead of just returning false?
Oops. Good catch. I'll fix this.
Yes, I needed to use this class for a call to "BrukerTimsTofMethodExporter.GetScheduling" from RTScheduleGraphPane.

It would be better to be able to place this precisely aligned to the top of the graph the way we do for the RT stick annotations (ID and Predicted) in the chromatogram graphs.
The problem with positioning things using pixels the way that ChromGraphItem.AddRetentionTimeAnnotation does is that you have to reposition the items every time the chart size changes. So, for ChromGraphItem, those things get added to the GraphPane during the ZedGraphControl.OnPaint method (MSGraphPane.drawLabels).
I was hoping to avoid that with this PaneProgressBar. Can we come up with a position in terms of chart fraction or the other sort of automatically adjusting coordinates so we don't need to be listening to the resize events?

I suppose 20% from the top is fine for positioning.


Watcher fixes

Add unit tests to Consul watcher.
Fix the following things in the Consul watcher :

Bind upstreams on <IP_ADDRESS> by default
Fix read timeout using connect timeout value

If you don't mind to adapt the commit messages by prepending the commit subject with an appropriate tag like BUG/MINOR: of MEDIUM:, TESTS: CLEANUP: as suggested in the HAProxy contributing guide here https://github.com/haproxy/haproxy/blob/master/CONTRIBUTING
I think it would be useful to keep the commits separate instead of squashing them to fix the commit message.


WIP: dump all failed services

First, we were missing ignition-fetch.service in this list
which is a huge omission.
But more generally for Fedora CoreOS we have a ton of stuff
going on the initramfs; our custom mount units, resizing
the rootfs etc.
Change this to dump all failed services.

This worked for having ignition-fetch.service fail but I tried changing things so that ignition-ostree-mount-rootfs.service failed and...that seemed to get into a conflict with https://github.com/coreos/ignition-dracut/pull/146 that I need to debug

OK rebased :surfer: and I'm not reproducing the error I hit before - IIRC it was something like "Cannot start ignition-virtio-dump.service, transaction is destructive".
And now that I later hit https://github.com/coreos/coreos-assembler/pull/1447 I think we may need to do something similar there and ignore isolating to emergency.target at least, but still Conflicts=initrd-swtich-root.target or so to ensure we stop on switch root?
But that's obviously orthogonal to this PR.


fix: weekday check function for other locales

Fixing issue #150 , #221

Problem:

Calendar doesn't show previous month, all months start with 1.

Reason:

This is due to getNumberOfDay being stuck at number = 0, when delcaring dayjs.locale() other than "en" globally outside library.

The Fix:

Instead of using hard-coded weekday string array ["Sunday", ... "Saturday"], a function is created to specifically use previously set locales.

Merge please! 🥲

Hello @cheeselemon 👋.
Sorry for the late reply.
Thanks for the contribution.


Centered Load Button

Me as a user would expect the load older mail button to be centered

Duplicate of #182. But to be fair, #182 has a very non-descriptive name


added index to key accessor function

[ ] PR has tests / docs demo, and is linted.
[ ] Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
[ ] Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Sweet.  Thank you!  Planning to do a release in the next couple of days.


Fix input buffering for A APIs

This fixes an issue where character-wise reading of an input like "abc"
would return "a" to the caller, store "b" as a partial translation
(= wrong) and return "c" for the caller to store it for the next call.
Closes #16223
Closes #16299
Validation Steps Performed

ReadFile with a buffer size of 1 returns inputs character by
character without dropping any inputs ✅

Look ma! A new VS version dropped:

Would you be willing to pull the audit fixes into a separate PR?


Not able to play voice mail using url

Hi,
We are recording voice mail for the opponent user if he can't be picked the call.
not able to play voice mail in using URL provided by Twilio
ex:  https://api.twilio.com/2010-04-01/Accounts/ACXXXXX.../Recordings/RE557ce644e5ab84fa21cc21112e22c485.wav
let us know any solution for that.

Hi @aniketlokhande07
Can you describe the feature with more specific steps?

Hi,
we implemented voice mail features for the voice calls.
We are connecting a voice call to a number, if the receiver did not pick the call then, we are recording a voice mail for that number.
we are able to record and play the voice mail from the Twilio console. we are getting that recording logs in a mobile application with the help of recording API. As the format is given in the documentation for play voice mail using URL, we created like below
Voice mail recording logs:
{
CallerName = "";
From = "+12034569189";
To = "+12038710662";
recordingResource =             {
"account_sid" = AC255536077907e6e344d067770f4a7b16;
"api_version" = "2010-04-01";
"call_sid" = CA8d4165804b6a6630e1591439275bda5b;
channels = 1;
"conference_sid" = "";
"date_created" = "2020-08-24T12:58:53+00:00";
"date_updated" = "2020-08-24T12:58:57+00:00";
duration = 3;
"encryption_details" = "";
"error_code" = "";
price = "-0.00250";
"price_unit" = USD;
sid = RE590ec8095f3a9384df40d4f00e2d5628;
source = RecordVerb;
"start_time" = "2020-08-24T12:58:52+00:00";
status = completed;
"subresource_uris" =                 {
"add_on_results" = "/2010-04-01/Accounts/AC255536077907e6e344d067770f4a7b16/Recordings/RE590ec8095f3a9384df40d4f00e2d5628/AddOnResults.json";
transcriptions = "/2010-04-01/Accounts/AC255536077907e6e344d067770f4a7b16/Recordings/RE590ec8095f3a9384df40d4f00e2d5628/Transcriptions.json";
};
uri = "/2010-04-01/Accounts/AC255536077907e6e344d067770f4a7b16/Recordings/RE590ec8095f3a9384df40d4f00e2d5628.json";
};
}
voice mail URL: https://api.twilio.com/2010-04-01/Accounts/AC255536077907e6e344d067770f4a7b16/Recordings/RE590ec8095f3a9384df40d4f00e2d5628.wav
It's working fine earlier, right now it's not working.
Twilio reference URL: https://www.twilio.com/docs/voice/api/recording

Thanks for the update @aniketlokhande07
Let me know if I understood correctly from the record of the Call SID:

You placed a call to two Twilio Wireless numbers. Once connected, the response of a /voicemail endpoint will be executed.
The /voicemail endpoint then redirected the calls to a  &  TwiML response

The part which I am not sure - how does the mobile app (presumably using the Voice iOS SDK) fit into your use case? Are you trying to make calls to the mobile client and play the recordings once the call is accepted and connected on the mobile client's side?

@bobiechen-twilio
How to play audio from this url : https://api.twilio.com/2010-04-01/Accounts/AC255536077907e6e344d067770f4a7b16/Recordings/RE590ec8095f3a9384df40d4f00e2d5628.wav
Earlier we were able to play audio in android and iOS device by using above url. But now it shows file not found. Above link was accessible from browser also. But now when we open in browser, it asks for authentication.
Our aim is to fetch user specific voice mails from twilio and show it in android/iOS app side list. And user can play those voice mails in app.
Looking for your quick update. How to get fully accessible voice mail url in .mp3 or .wav format.

Thanks for the update @umesh180887.
The additional authentication may have been introduced recently. Unfortunately this might be the specialized area of the SDK team, I would suggest that you open a support ticket and ask for help regarding direct access to the recordings outside the browser (which might have your credentials cached when you logged in).
Since this is not an SDK specific issue, I will close this one for now but please feel free to reach out to us any time!

Hi @bobiechen-twilio,
Twilio side I made the below change and voice mail URL working for me
changed Enforce HTTP Auth on Media URLs from enable to disable


locahost :5000 is forbidden for WASM demo

locahost :5000 is forbidden
Access to localhost was deniedYou don't have authorisation to view this page.
HTTP ERROR 403
cd to wasm folder and make all

make all
cp -f "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./js/
GOOS=js GOARCH=wasm go build -o lib.wasm wasm.go
open 'http://localhost:5000'
go run http/serve.go

Browsrs get forbidden though.

flipped it to 5001 and it works
maybe I had something running there on 5000


[SPARK-34343][SQL][TESTS] Add missing test for some non-array types in PostgreSQL

What changes were proposed in this pull request?

This PR added tests for some non-array types in PostgreSQL.
PostgreSQL supports wide range of types (https://www.postgresql.org/docs/13/datatype.html) and PostgresIntegrationSuite contains tests for some types but ones for the following types are missing.

bit varying
point
line
lseg
box
path
polygon
circle
pg_lsn
macaddr
macaddr8
numeric
pg_snapshot
real
time
timestamp
tsquery
tsvector
txid_snapshot
xml

NOTE: Handling money types can be buggy so this PR doesn't add tests for those types.
Why are the changes needed?

To ensure those types work with Spark well.
Does this PR introduce any user-facing change?

No.
How was this patch tested?

Extended PostgresIntegrationSuite.

For reviews: As I mentioned in the description, handling money types can be buggy and I'll fix it in #31442 .
Also, arrays of some types are not supported so I'll fix the issue in #31419 .

Test build #134835 has started for PR 31456 at commit 2739020.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39422/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39422/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39422/

Test build #134835 has finished for PR 31456 at commit 2739020.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134835/

SPARK-34357 (#31473) changed the type-mapping of JDBC time from Integer to Timestamp so I've modified the test for time in this PR to follow the previous change.
I also confirmed the modified test passes.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39472/

Test build #134887 has started for PR 31456 at commit 9536f75.

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/39472/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39472/

Test build #134887 has finished for PR 31456 at commit 9536f75.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134887/

Thanks! Merged to master.


Dev / ui back testing - Javascript heap out of memory

Testing the back test on the dev branch, hope this helps.
Meta:
The sqlite db is about 5 years and 10 months of data
Running standard StochRSI
Candle size 1 minute
History size 10 (not sure what this is for.
This is on windows 10, machine has 16gig ram and memory allocation in windows is 20gig.
Returns the following error in the console:

<--- Last few GCs --->
617021 ms: Mark-sweep 1383.9 (1435.2) -> 1383.8 (1435.2) MB, 2113.1 / 0.0 ms [allocation failure] [scavenge might not succeed].
619173 ms: Mark-sweep 1383.8 (1435.2) -> 1383.8 (1435.2) MB, 2151.9 / 0.0 ms [allocation failure] [scavenge might not succeed].
621241 ms: Mark-sweep 1383.8 (1435.2) -> 1385.1 (1419.2) MB, 2067.9 / 0.0 ms [last resort gc].
623359 ms: Mark-sweep 1385.1 (1419.2) -> 1386.4 (1419.2) MB, 2117.6 / 0.0 ms [last resort gc].

<--- JS stacktrace --->
==== JS stack trace =========================================
Security context:<PHONE_NUMBER>9CFB61
1: stringify [native json.js:178] [pc=000003C553F384F7] (this=00000143079C9121 <a JSON with map 000002AEB190A0E1>,E=00000225FF6B6581 <an Object with map 000002AEB1910CD1>,F=0000014307904381 ,S=0000014307904381 )
2: arguments adaptor frame: 1->3
3: get length [C:\Bots\gekko-develop\node_modules\koa\lib\response.js:204] [pc=000003C554213886] (this=000002DCE9440...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Where you running a backtest or a live gekko?

Backtest.

Wow! How big is your database (the history folder within gekko)?
On Feb 26, 2017 23:20, "thegamecat"<EMAIL_ADDRESS>wrote:

Backtest.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/603#issuecomment-282597291, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA7MD4P7NXYaTYdqKQ6z5sv8bihTsmYBks5rggihgaJpZM4MMhZO
.

450 meg. It's actually not that bad. The awesome thing is your back tester works like a charm.

I'm not getting errors any more but the the UI essentially stops after while, both with the large history and a shorter one of eth for a year.

If you set the candleSize to one day, does that still happen? Also can you take a screenshot of where it gets stuck?

Example:
poloniex	BTC	XEM	2016-09-11 21:59	2017-03-11 20:59	5 months, 4 weeks, 18 hours, 30 minutes
Basically nothing happens visually aside from the Backtest button appears. Nothing different appears in Node.
If I set it to 1 day it works fine.
Looks like a timeout somewhere on the web client, this works fine on CLI.

The lower you set the candle size, the more processing Gekko has to do. But on my pretty old  laptop (macbook air from 2012) has no problem doing a backtest with the UI over 8 months of data using 5 minute candles.

The webclient does a backtest "request" to a "gekko server" that will actually perform the backtest. this request (a HTTP POST request) is where the timeout most likely have happened, there are no timeouts in the web UI.
Questions:

What browser are you using?

What OS are you using?

If you are using chrome, can you do the following:

load the UI
right click on the page - click inspect
"go to the network tab"
start a backtest
wait a few minutes
make a screenshot of the result

MBP 2015 - OSC (latest) - 8 or 16gig memory, forget which and an i5.

I'm happy to screenshare / skype whatever if you like.

I thought I would be able to fix this fast, but it appears I am not..
So I am able to backtest MACD against 8 months of data with 1 minute candle size, but the UI will freeze for me. Interesting that your laptop, which should be at least twice as fast as mine, struggles this hard (I have 4gb of RAM, which I think is my problem).
So this means that Gekko is quite able to backtest over so much data, but it's hard to get the results into the UI (all data needed to spawn the price chart, which in your case is ~6 months x 30 days x 24 hours x 60 minutes = 259200 data points).

I will look into this after #611, which has my main priority now. But not that I am not sure what you are hoping to achieve by running a strat against 1 minute candles: I have never seen someone making a successful TA strategy that operates on the 1 minute level, there is to much micro market noise. And even if you want to do that, there is really no big reason to simulate over 6 months of data (in my opinion). So I guess this might be out of scope for what Gekko is intended to do.
In my experience most successful strats run between 30 minute and 3 day candles.

I know what you mean but I have a strat which works great on 1m candles.
It also fails on a windows machine (as per the original post).
I've also had the same issue with 5m candles.
I've done some thinking about how to work around this based on the same 6 month logic as you have - if I could select the date range then this would likely solve this.
Out of interest, which db are you using? I'm using sqlite.
And finally, understand the priority lies elsewhere.

It also fails on a windows machine (as per the original post).

Even though the error is different, the solution is the same: if it's a huge backtest we need to send back less detailed graph, so that the UI can handle it (a graph with over 100,000 points is not very readable anyway).

I've done some thinking about how to work around this based on the same 6 month logic as you have - if I could select the date range then this would likely solve this.

That used to be an option before, I will add a daterange picker back to the backtester!

Out of interest, which db are you using? I'm using sqlite.

Yes sqlite as well, I am not sure if the other ones support all the new requirements (they were added by other people, before I started working on the UI).

Thanks. That date range would be brilliant.
What I'm doing at the moment is writing all outputs in a method to a csv - covering several different indicators. Then I'm segmenting that manually and making my own graphs with it in Tableau. This is fundamentally because I am a trading noob and this, combined with coding the methods helps me see what's working and what isn't. That's why I'm looking at 1m plus long periods of time.
I can also use this output for some machine learning when I get to it.
It's a bloody great project and tool you've made :)

Closing this for now since we can't reproduce under normal usage, there are some performance optimalisations on the roadmap :)


Update action version and set timeout of lint

Pull Request Test Coverage Report for Build 480718574

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 28.944%

Totals

Change from base Build 480677023:
0.0%

Covered Lines:
1154

Relevant Lines:
3987

💛  - Coveralls

Pull Request Test Coverage Report for Build 480718574

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 28.944%

Totals

Change from base Build 480677023:
0.0%

Covered Lines:
1154

Relevant Lines:
3987

💛  - Coveralls


KOSMOS 2.5 Release the training code

Hello,
I am very interested in your project, Kosmos 2.5. I have a question: do you plan to release the training code for the model?
Thank you.

hi @ShchelkunovA ,  We’ve provided inference code that includes examples of the model’s input and structure. You can adjust this code as needed for training : )


Delete v3 and v4 configuration tests in favor of ndc-snapshot-metadata tests

What
The v3 and v4 configuration tests are a bit redundant because we have the ndc-snapshot-metadata tests. This PR removes them, introduces a snapshot for the current v4-config, and deletes the schema.json in each dir because they are also not used in favor of static/schema.json.

@plcplc it has never been used actually.


Only 1/4 screen is captured when display has a 200% scale setting.

My monitor has the above setting, when running the following code to capture screenshot, only 1/4 is captured. I guess internally, FlaUI doesn't consider the scale setting, so it uses a smaller ScreenWidth and ScreenHeight (1/2 to the actual ScreenWidth and ScreenHeight) to get screenshot.
var image = Capture.Screen();
image.ToFile(@"screen.png");

When the scale setting set to 100%, the screen capture is normal (image for whole screen is captured).

@xiechunhong Hi, do you mind posting a snippet of how to get it solved?

I am currently investigating here. But it seems not extremely easy, especially for backwards compatibility. I would need to be able to get the DPI setting for each monitor and calculate the effective pixels or make the process DPI per Monitor Aware (which seems to only work from .NET 4.6.1 or higher and on Windows 8.1). Also it is unclear from when on a DPI per Monitor could be set? Maybe also starting from Windows 8.1. I will need to investigate further for this issue. If someone has some information, feel free to help out.

I will close this as the issue is tracked in #306.


registerOnSaveHandler timeouts after 30 sec

[Enter feedback here]
We need to add a note in the documentation about registerOnSaveHandler timeout.
The developer has 30 seconds to complete the async save operation (i.e. the callback passed to registerOnSaveHandler). After that it gets timeout and show a generic error to the user.

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

ID: 3b94a38e-82f8-45a1-8ccc-b0a96edd0404
Version Independent ID: 6e077924-9658-cdd2-50de-0f9561d6366b
Content: Create a configuration page - Teams
Content Source: msteams-platform/tabs/how-to/create-tab-pages/configuration-page.md
Product: msteams
GitHub Login: @surbhigupta
Microsoft Alias: lajanuar

Looks like changes are done.


require writing test case for verification suites

ugh, this message pact stuff.. the message pact suites are inconsistently failing, saying Verification Failed - Uncaught exception during scan and seeing a ton of stuff like [25.046s][warning][gc,alloc] ClassGraph-worker-18: Retried waiting for GCLocker too often allocating 256 words 🤦
@kflorence FYI

@jbwheatley oh nice, that's happening in main too? 😅  see #20

I don't really understand why the changes in this PR cause the GC error when the test suites all run on main 🤷♂

@jbwheatley I think it's a bit flaky, I wouldn't be surprised if it were happening also in main. I think the classpath scanning stores a lot of stuff in memory, so the fix for now might be just giving the build more memory. We do have a slightly odd case here, where we have many suites that all run tests at the same time and require classpath scanning -- in a normal project, there would only be one suite running provider tests -- although, since the scanning happens for every consumer I'd imagine this problem would also occur for a single provider with many consumers.

I turned off parallel execution in the tests and they all passed haha. Seems like you had the right idea about why the issue was happening!

@jbwheatley yeah, I tried that too, and it did help, although when I ran the tests multiple times it was still a bit flaky (at least in my new PR). I think it might still need a bump in memory (although perhaps not as high as 4GB).


Add NIH funding requirement to the MIMIC website

The NIH require researchers of studies using MIMIC-III to include the following acknowledgment in their publications:

Research reported in this publication was supported by the National Institute of Biomedical Imaging and Bioengineering of the National Institutes of Health under Award Number R01EB017205. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

Where did this requirement come from? It does not sound right to me
since their research is not NIH supported. Our database resource is NIH
supported but wonder whether everyone who uses it should claim NIH
support. They should, however, reference our papers.... we can talk
about this when I get back.
Roger
On 9/7/2016 1:26 PM, Tom Pollard wrote:

The NIH require researchers of studies using MIMIC-III to include the
following acknowledgment in their publications:
Research reported in this publication was supported by the
National Institute of Biomedical Imaging and Bioengineering of the
National Institutes of Health under Award Number R01EB017205. The
content is solely the responsibility of the authors and does not
necessarily represent the official views of the National
Institutes of Health.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MIT-LCP/mimic-website/issues/52, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AHDnSohBKl-QH0s5_Ah-rI6gv2Y8ODi1ks5qnvPAgaJpZM4J3KgG.

--
Roger G. Mark, M.D., Ph.D.
Professor of Health Sciences and Technology
and of Electrical Engineering
Room E25-505
MIT
Cambridge, MA 02139
Tel<PHONE_NUMBER>
Fax<PHONE_NUMBER>

Here's my take on this, Roger.People are able to use MIMIC free of charge (vs. the Medicare database, NIS, NHANES, etc.) because the NIH is funding the project. I don't think it's unreasonable for them to mention that the MIMIC database is supported by funding from the NIH. In fact, this creates a digital trail of where tax dollars that go into the NIH are spent. I think taxpayers should be able to "see" where their contributions to science go to.I know that we cannot police this but we should at least try to encourage MIMIC users to acknowledge NIH funding of the MIMIC database. This is not too much considering the service that they get for free.Leo
From: rgmark<EMAIL_ADDRESS>To: MIT-LCP/mimic-website<EMAIL_ADDRESS>Sent: Sunday, September 11, 2016 1:45 PM
Subject: Re: [MIT-LCP/mimic-website] Add NIH funding requirement to the MIMIC website (#52)
Where did this requirement come from? It does not sound right to me
since their research is not NIH supported. Our database resource is NIH
supported but wonder whether everyone who uses it should claim NIH
support. They should, however, reference our papers.... we can talk
about this when I get back.
Roger
On 9/7/2016 1:26 PM, Tom Pollard wrote:

The NIH require researchers of studies using MIMIC-III to include the
following acknowledgment in their publications:
Research reported in this publication was supported by the
National Institute of Biomedical Imaging and Bioengineering of the
National Institutes of Health under Award Number R01EB017205. The
content is solely the responsibility of the authors and does not
necessarily represent the official views of the National
Institutes of Health.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MIT-LCP/mimic-website/issues/52, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AHDnSohBKl-QH0s5_Ah-rI6gv2Y8ODi1ks5qnvPAgaJpZM4J3KgG.

--
Roger G. Mark, M.D., Ph.D.
Professor of Health Sciences and Technology
and of Electrical Engineering
Room E25-505
MIT
Cambridge, MA 02139
Tel<PHONE_NUMBER>
Fax<PHONE_NUMBER>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Improve the search section in Post Index Number pge

The search by dropdown and the search input section are together which makes it a bit confusing to the user. Want to work on it.


Fixed order of generators when merging configs and profiles

Revised the merging part of profiles and configuration.
Now, when a generator is specified in  it is moved to the beginning of the list of generators, which makes sense since normally the first genertor kicking wins.
For enricher it's not so clear, but now enrichers are also moved to the beginning to the enricher list for consistencies sake.
For fined tuned enricher/generator ordering handling it is recommend to use an explicit (possibly handcrafted) profile where the order can be fine tuned.
Fixes #862

[merge]ing as its a crucial fix for the proper generator ordering in #720


Nextjs: Nhost client not properly updating user session

I am using nhost with Nextjs. I am trying to use createServerSideClient on a SSR page. but it is not passing the accesstoken when i am making queries with nhost.graphql.request(). I tried to get the session with nhost.auth.getSession(). it is returning null. getNhostSession() is also returning null.
I followed all the steps in the documentation.
i can retrieve the user data once the page is hydrated with useUserData
but i couldn't retrieve any auth related data on getServerSideProps

Same problem as https://github.com/nhost/nhost/issues/886

@altschuler is there any workaround for this? or do we have to wait till they fix it?

I don't think there's much to do about it currently, but someone from nhost would know better :)

Also seeing this


[BUG] expression_pb2.py is not being generated

Description

I had a working buf setup which was working perfectly and after one rebuild I noticed that something was wrong, eventually I found out that the expression_pb2.py is not being generated.
Tried with different proto versions, different PCs.
I was not able to find the expression proto file and where it's generated.
Steps to Reproduce

Expected Behavior

Actual Behavior

Screenshots/Logs

Environment

Operating System:   Linux
Version:  Arch; Bluefin
Compiler/Toolchain:
Protobuf Compiler & Version:
Protoc-gen-validate Version:
Protovalidate Version:  from latest, down to 0.7.1

Possible Solution

My workaround solution was to switch back to v0.7.1  in the buf.yaml file:
buf.build/bufbuild/protovalidate:v0.7.1

Additional Context

hey @martin-varbanov96, what version of protovalidate-python are you using? As noted in the v0.5.0 release notes, you'll want to update imports from using the generated buf.validate.expression_pb2 to use buf.validate.validate_pb2; you shouldn't need to use generated code from expression.proto now.

I was using 0.4.0, I will verify that everything is working with 0.5.0, but in the requirements.in file I did not specify any version... should it install the latest version? I am using python 3.12.4 . now I have forced it with protovalidate==0.5.0 I guess this should fix the problem

I'm only somewhat familiar with the requirements.in workflow, but my understanding is that at some point you'd convert that file into a requirements.txt, which may have pinned the previous version.
We do expect some minor breaking changes as we iterate pre-1.0, so it might be better if we pinned the protovalidate module in our README to a particular version known to work with the latest release, but it's just one more place to fall out of date. Once we reach 1.0, we shouldn't have breaking changes like that. Let me know if 0.5.0 doesn't work!

I can confirm that 0.5.0 is working perfectly.
python 3.12.4 users using requirements.in files should manually bump their version because the default is 0.4.0 and is not working


Code Inspection: npm audit on atomist/a260p86nh/sdm-deps/master

lodash:<4.17.12

(error) Prototype Pollution Update to version 4.17.12 or later. - CVE-2019-10744

lodash:4.17.11:

@octokit/rest>lodash
lodash

[atomist:code-inspection:atomist/a260p86nh/sdm-deps/master=@atomist/atomist-sdm]

Issue closed because branch atomist/a260p86nh/sdm-deps/master was deleted.


[superset-client][logger] replace ajax with SupersetClient

This PR is one of several that implement the final step 4) discussed in #5772, to refactor just JS logger ajax calls for easier review.

dashboard #5854
explore #5869
charts #5875
sql lab #5896
logging (this PR)

@kristw @mistercrunch @graceguo-supercat @michellethomas @conglei
tested with unit tests and inspected logs to make sure they were the same format before / after:
before (slice + dashboard loading)

after (slice + dashboard loading)

Codecov Report

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

@@           Coverage Diff           @@
##           master    #6133   +/-   ##
=======================================
  Coverage   76.91%   76.91%
=======================================
  Files          47       47
  Lines        9362     9362
=======================================
  Hits         7201     7201
  Misses       2161     2161

Continue to review full report at Codecov.

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


[FEATURE] Show Network Topology in the UI

The network topology will show lilke this:

connect with https://github.com/harvester/harvester/issues/2236

@torchiaf Please help check the issue, if you need backend help, please reach @w13915984028. cc @innobead


Warn if send is called after .run completes

Calling send after .run returns can result in broken assumptions and discarded actions.

If the bad .run is directly sent into a Store, the send calls will work but they won't be tracked by [ViewStoreTask|TestStoreTask|TestStore].finish()
If the EffectTask.run is converted into a Publisher by applying a Combine operator, the resulting Effect will entirely ignore actions sent after the async closure returns, since EffectTask.publisher marks the effect as completed at that point.

This PR adds a runtime warning that's emitted if send is called after the .run closure returns, formally marking this as undefined behavior.
.run { send in
  Task {
    try await Task.sleep(for: 1)
    await send(.action) // now emits a warning
  }
}

For clarity, so the problem is in user code not taking part in structured concurrency of .run { send in ... } but instead wrapping their logic in a non-structured Task { ... }. Nice idea to warn about that!

thanks, yeah I wanted to mention "structured concurrency" in the runtime warning but figured it's better to avoid jargon. FWIW there are a number of other ways to trigger this such as calling a completion/GCD-based API (eg DispatchQueue.main.asyncAfter) so "switch from unstructured to structured concurrency" isn't a blanket solution. Users may need to use other synchronization primitives (continuations, AsyncSequence, task groups) instead.

Hi @kabiroberai, thanks for the PR! Overall I think this looks good! I took a pass at playing with the messaging, but Stephen and I will discuss more. I also split the test to focus just on the publisher API versus the pure async/await API.
We should be able to merge this soon.

@mbrandonw btw I think CI is failing because the check is guarded by #if DEBUG, so the release tests don't work. We can conditionally compile the tests too, or maybe make the check run in release builds too — up to you folks.

🤦♂ thanks for pointing that out. Was confusing me. Yeah I think it's OK to do this check in release. We already have other runtime warnings in release. Want to fix that up if you have the time?

@mbrandonw so it looks like the runtimeWarn impl is guarded by #if DEBUG anyway; think we'll have to make the tests debug only to make them pass

@mbrandonw so it looks like the runtimeWarn impl is guarded by #if DEBUG anyway; think we'll have to make the tests debug only to make them pass

Sorry again, I should have looked into this more closely. You are right, runtimeWarn only causes test failures in DEBUG because we can't ship the dynamic XCTFail stuff in release code due to App Store rejections.

Finally got tests to pass 😅. Custom executors can't come soon enough.
@stephencelis and I will chat about this today and hopefully get it merged!


[WIP] RBAC Proxy TLS

New deprecation warnings from kube-rbac-proxy container, after updating kube-rbac-proxy version to v0.14.1 in #47.
According to https://github.com/brancz/kube-rbac-proxy/issues/196 TLS will be mandatory from V1 release.
In order to comply with it we add a self-signed TLS to the kube-rbac-proxy container.
*Since the secret is exposed and not encrypted, then we won't merge it ATM and we only want to test it now.

Using a hardcoded, public cert and key is a bad idea. Let's discuss a better solution...
/close


Can't get rid off invalid credentials

The problem
When I first tried to setup the integration, I typed in invalid credentials. Now, I am stuck in the setup process. Whenenever, I start the setup, I am directly refered to a website telling me the connection failed stating my old and invalid client id. I have deleted my browsers cache, reinstalled the integration, used different computers and browser but always directly get the wrong link. I used the tab, logged in via Swagger, replaced the client id from the setup's URL but can't establish a connection.
I assume the wrong credentials are somewhere stored within HA. How can I delete them and start new?
Thanks for your help!
Version of miele integration having the issue?
0.1.14
Version of Home Assistant Core having the issue?
2023.8.3
Anything in the logs that might be useful for us?
No response
Additional information
No response

Goto Settings->Integrations and select the overflow menu (3 dots)

I can't find the integration in the integration menu yet because I couldn't sucessfully finish the setup. In the hacs menu, I find the overflow menu but it only offers me the option to re-download which doesn't help.
Thanks for the quick reply!

There should be an overflow meny in Settings->Devices and services . You can also reach the credentials admin page by going directly to /config/application_credentials

Thanks for clarifying! This solved my issue.


add a tab character after each line import

as title, I detect an issue that every import/export doesn't add a tab character after each line import/export, and a new line character before the curly close bracket. this looks better than current
// original
import { method1, method2, method3, method4 } from 'alphabet'

// format
import { method1,
method2,
method3,
method4 } from 'alphabet'

// expected
import {  // add a new line character after {
  method1,  // tab character at the beginning of line
  method2,
  method3,
  method4
} from 'alphabet'

could you do a little fix for it
Thanks

Hi, this is mentioned in the README:

Note that the plugin simply inserts newline characters after each token in the import when splitting, and the fix output never includes leading tabs or spaces. To have consistent indentation, be sure to use the built-in indent rule.

You can find how to configure said rule here: https://eslint.org/docs/rules/indent


GameJolt Support

Since Indie Cross existed, everyone wants to make mods to be compatible with GameJolt.
So I thought: "Why don't give it a shot and implement a custom client for it by myself?"
I know everyone wants this, so I think it would be a good idea to implement it into PE.

Ye, I’ll add this to my mod for credit

I’ve been wondering how to do it since aflac.

@DabbinDude316B Remember, this is a draft, is not finished yet, but I'm glad you liked the idea

ShadowMario wants this engine to be kept as close to the vanilla engine as possible though

Oh, ok, there's no problem at all :)


docs(elements): update images and summaries

Closes #1008
What I did

Updated all the images and summaries for the /elements landing page according to the design spec
Modified the example shortcode to allow for absolute paths in its image src

Testing Instructions

Review the linked spec and verify that it matches the deploy preview

Notes to Reviewers

@nikkimk Thanks for the review. I think I've addressed all the issues you identified. Can you take another looksy, pleaseee? <3

@eyevana Some very small edits:

Add Breadcrumb (coming soon) card and thumbnail, but do not link it anywhere
Remove the gray border around the Dialog card
Add Footnote (coming soon) card and thumbnail, but do not link it anywhere
Change Navigation primary to Navigation (primary)
Change Subnav to Subnavigation
Change the text under the Make a request heading to:

To request a new element or if updates need to be made to an existing element, create a GitHub issue.
The link above should open a new tab or window.

@eyevana Hey, I do not see the (coming soon) element cards and text as described in my comment above.

@coreyvickery yep, I'm working on that last piece now. I'll ping you here when it's ready for another round of reviews.

@coreyvickery I added Breadcrumb and Footnote to /elements as coming soon. Do you also want me to include them in the side nav? For example, "Breadcrumb (coming soon)" with no link?

@coreyvickery I added Breadcrumb and Footnote to /elements as coming soon. Do you also want me to include them in the side nav? For example, "Breadcrumb (coming soon)" with no link?

@eyevana No thanks.

@bennypowers @nikkimk can you take a look at how I handled the "coming soon" elements and let me know what you think? I stubbed them under the /elements directory so they could be included and sorted under the elementDocs collection, and then I just added some conditional logic in the templates to concatenate the title with "(coming soon)".

@eyevana Sorry, I forgot to mention that we are removing Subnavigation for now.

@coreyvickery exclude completely or just mark it as coming soon?

@eyevana Yes, kill it. Or create a new issue to kill it website-wide.

@coreyvickery ready for you 👁 ❤

@nikkimk thank you!

@eyevana looks like there are still some conflicts to resolve

Done! :)

@eyevana looks like there are still some conflicts to resolve

Done! :)

Actually need to make one more change


Change npt.ArrayLike to npt.NDArray[<type>] where appropriate

Is Your Feature Request Related to a Problem? Please Describe
Currently, we have a lot of npt.ArrayLike, but we could benefit more from type checking through mypy #280 and using the npt.NDArray[type].
Describe the Solution You'd Like
No response
Describe Alternatives You've Considered
No response
Additional Context
No response

This is being done #308


[v3] svg broken inEdge

SVG get stretched in Edge when its height/width does not have a unit.

Operating system and version: Windows 10
Browser and version: Edge

Fixed in v3.0.0-rc.3


Use internationalization.

Make the software accept other languages, and ability to the user change between them.

[x] Change all the GUI Strings to the ResourceBundle;
[x] Add JComboBox in the SettingsPanel to switch between the available languages;

Closed on 1dabc78.


5.2.2 BulkInsert Guid field wrong value

5.2.2 BulkInsert Guid field wrong value
rollback to 5.2.1 will fine.

What is your use case and could you make a Test, or alter the following one, where it would be reproducible.
Take a look at https://github.com/borisdj/EFCore.BulkExtensions/blob/1a9c62a792d299bdc9326ce84df3c4e6335e1237/EFCore.BulkExtensions.Tests/EFCoreBulkTestAtypical.cs#L19
Lines
https://github.com/borisdj/EFCore.BulkExtensions/blob/1a9c62a792d299bdc9326ce84df3c4e6335e1237/EFCore.BulkExtensions.Tests/EFCoreBulkTestAtypical.cs#L49-L54
In 5.2.2 change was
from
if (listHasAllDefaultValues)
{
    DefaultValueProperties.Add(propertyWithDefaultValue.Name);
}

to
if (listHasAllDefaultValues || PrimaryKeysPropertyColumnNameDict.ContainsKey(propertyWithDefaultValue.Name))
{
    DefaultValueProperties.Add(propertyWithDefaultValue.Name);
}

// it is not feasible to have in same list simultaneously both entities groups With and Without default values,
// they are omitted OnInsert only if all have default values or if it is PK (like Guid DbGenerated)

Yes, my PK has default value.
var order = builder.Entity<Order>();
order.Property(o => o.Id).HasDefaultValueSql("newsequentialid()"); // Id is Guid

But I want to BulkInsert my value.
seems like #563. But SqlBulkCopyOptions.KeepIdentity not work for me

I'm still not able to reproduce your issue.
Previously mentioned Test ComputedAndDefaultValuesTest has BulkInsert of Document entity list where property DocumentId .HasDefaultValueSql("NEWID()"); // same is with newsequentialid()
And it passes successfully.
Try to alter that test and make your case reproducible.


Offline storage

First of all: Thank you so much for developing this project. I've read your blog post and I always felt exactly the same, not wanting to go for an all-in for Meteor, but rather use just the server part with a DDP connection to a client.
One thing I'd really like to use is offline storage, like they do in the Meteor world with [Ground DB] (https://atmospherejs.com/ground/db). Would something like this be possible with Asteroid?

A plugin would be the best choice indeed.
Full offline support is definitely a bit of work. I guess I can work around it for now. I just wanted to point it out maybe for future versions :).

This would be a great one to have. just the missing piece in my combo of appgyver supersonic, asteroid and meteor

+1

+1


NavigationRail doesn't have a menu

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Use case
The Material Design 3 Navigation Rail guidelines  show the anatomy of a Navigation Rail includes an optional Menu (item 2), but this is missing from the Flutter NavitagionRail Widget.
We do have an optional leading widget, but it's not the same as a Menu, since the specs define both a leading and a menu.
Proposal
Include an optional menu in the NavigationRail, but please don't make it just like leading, otherwise we have to control all the animation and open/close states ourselves, which adds lots of boilerplate. Make it have a default behavior, but also configurable.

Hi @feinstein! Thanks a lot for filing this issue.
I think from the specs, the menu should be part of the leading? We can use the M3 MenuAnchor which has the default M3 style for menu.
Here's an example: https://dartpad.dev/?id=694b84b742c5318947e495995a13ff05

Hi, I don't think the Menu should be part of the leading. The specs show a Menu and a FAB, togheter, and even specify them together.

Another thing, the leading trailing and others should be wrapped into an IconTheme, otherwise the destinations have a colored outline and the leading have a greyed one.


tdcc: Incorrect FSM generated in presence of par

The following program incorrectly computes the final value in y_int0 to be 0. The expected value is 1:
import "primitives/core.futil";
component main(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) {
  cells {
    f0 = std_reg(4);
    @external y_int0 = std_mem_d1(1, 1, 1);
    comb_reg = std_reg(1);
  }
  wires {
    group zero_f0 {
      f0.write_en = 1'd1;
      f0.in = 4'd0;
      zero_f0[done] = f0.done;
    }
    group false<"static"=1> {
      comb_reg.in = 1'd0;
      comb_reg.write_en = 1'd1;
      false[done] = comb_reg.done ? 1'd1;
    }
    group true<"static"=1> {
      comb_reg.in = 1'd1;
      comb_reg.write_en = 1'd1;
      true[done] = comb_reg.done ? 1'd1;
    }
    group write_comb_reg {
      y_int0.addr0 = 1'd0;
      y_int0.write_en = 1'd1;
      y_int0.write_data = comb_reg.out;
      write_comb_reg[done] = y_int0.done;
    }
  }

  control {
    seq {
      false;
      par {
        true;
        zero_f0;
      }
      write_comb_reg;
    }
  }
}

The false group sets the value in comb_reg to 0 while true sets it to 1. At the end of the program, we expect the value in comb_reg to be 1 since true will execute on all program paths.
However, tdcc generates the following code for the FSM and the par compilation:
// Group that implements execution of the `par` block
    group par {
      true[go] = !(pd.out | true[done]) ? 1'd1;
      pd.in = true[done] ? 1'd1;
     ...
      par[done] = pd.out & ... ? 1'd1;
    }

Group generated for top-level FSM:
    group tdcc {
      par[go] = false[done] & fsm.out == 2'd0 ? 1'd1;
      par[go] = !par[done] & fsm.out == 2'd1 ? 1'd1;
      ...
    }

The first par[go] statement represents the early transition.
The problem is that both true[done] and false[done] point to comb_reg.done. This creates the following cycle-by-cycle behavior:

cycle 0: false starts executing
cycle f: false is done executing and par starts executing. However, the guard in true[go] = !(pd.out | true[done]) is false because true[done] == false[done]. This also means that pd.in = true[done] ? 1'd1 will execute.
cycle f + 1: true[go] = !(pd.out | true[done]) still doesn't execute because the previous cycle wrote 1 into pd.

This means that true is never executed causing the unexpected output to be generated.
The problem is very similar to a previous bug in tdcc where the done signal from a previous cycle was being used to stop the execution of a group in the current cycle. A possible solution to this problem is exending the guard in the par to be:
true[go] = !(pd.out | (true[done] & fsm.out == 0)) ? 1'd1;

A higher-level statement of this problem is that while registers are allowed to be shared, their done signals cannot be. This class of bus arise from the fact that when we share registers, we invariably end up sharing their done signals as well. The style of fixes to this set of problem is making sure that all the done signals are "indexed" in the right FSM state (i.e. read in the FSM state that they should be read in).

Argh, just came across a slightly different version of the above example where the control program is:
    seq {
      false;
      par {
        seq { true; zero_f0; }
        zero_f0;  // Ensures that the `par` block doesn't get compiled away.
      }
      write_comb_reg;
    }

My initial thought was that I could just change the compilation of par so that each child's done whole is only read in the correct FSM state of the surrounding context. However, this example does not work with that change. The problem is that the FSM state from the outer context needs to be threaded through all the way to the true group's execution to ensure that its done signal is only read in the right state.
This means that tdcc needs to change a little more dramatically than I expected to allow for threading the current FSM state and ensuring that done signals are read in the right context.

Did this get fixed? If so I'm curious what the correction was

Nope, incorrectly closed. The problems is explained here: https://github.com/cucapra/calyx/discussions/651#discussioncomment-1324881

The integration test for durbin is disabled because of this issue: https://github.com/cucapra/calyx-evaluation/commit/115b282c8452a070bf29537b6e0867d8a77573ed


Char2 hex int

Teradata Functions Extension
char2hexint(string) -> varchar
Returns the hexadecimal representation of the UTF-16BE encoding of the string.

Please do not review it yet. It depends on another pull request:
https://github.com/TeradataCenterForHadoop/presto-td/pull/6

Can you rebase this on top of master?

rebased

Sorry. I believe it is fine now.

Merged, thanks!


Finding number of digits in an integer(TesseractCoding#406)

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
This program will helps you to count number of digits in an integer in O(1) Time Complexity.
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
(Write your answer here.)

@imPGupta Its always better to use underscore ('_') instead of spaces while naming a file. Although I have made required changes to the file name and README.md.

Sure, I will take care of this next time.

@atarax665 @iamrajiv Please resolve the issue and merge by by PR.

I have updated the README.md file now. This PR will get merged soon.


8.1.0 cargo-watch dependency has been yanked

Describe The Bug
The 8.1.0 cargo-watch dependency has been yanked. It should point to 8.1.1 not 8.1.0. If you manually install 8.1.1 it works.
To Reproduce
On a clean install (with no cargo-watch) and with this makefile:
[tasks.build]
command = "wasm-pack"
args = ["build", "--dev", "--target", "web", "--out-name", "wasm", "--out-dir", "./static"]
watch = { ignore_pattern = "static/*" }

run cargo make build.
Error Stack
➜  druid git:(master) ✗ cargo make build
[cargo-make] INFO - cargo make 0.35.11
[cargo-make] INFO - Project: druid
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: build
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "cargo" "install" "--version" "8.1.0" "cargo-watch"
    Updating crates.io index
error: cannot install package `cargo-watch`, it has been yanked from registry `crates-io`
[cargo-make] ERROR - Error while executing command, exit code: 101
[cargo-make] WARN - Build Failed.

Code Sample
I don't think it gets to my rust code.

@comath thanks, i'm releasing a fix for this now.
i wonder why 8.1.0 was yanked.

@comath can you please reinstall and tell me if this issue is resolved?

@sagiegurari  It worked! Thank you. :smile:


Example with redux

Checklist

[X] I've looked through the README
[X] I've verified that  I am running react-big-schedule version 4.2.0 or above.
[X] I've searched the existing issues and discussions for a similar question
[ ] I've provided relevant code snippets or error messages
[ ] I've included steps to reproduce the issue
[X] I've checked the browser console for any errors
[X] I've tested the issue with the latest version of react-big-schedule

Please make sure the question is worded well enough to be understood
Hello, Is it possible to have an example of how to use library with Redux Toolkit?

@bezxc thanks for using our library.
Please refer this https://github.com/react-scheduler/react-big-schedule-example/blob/master/src/pages/Add-More/functional-based.jsx istead of use reducer you can use redux

@ansulagrawal
Thanks for the quick answer, yes I did, but I ran into a problem, if you go to another page, and then return, the display of the component breaks. Perhaps I'm missing something.
Link to the sandbox

@bezxc will check and get back to you

@bezxc you can find your solution here https://codesandbox.io/s/boring-fog-cxpp72?file=/src/App.js
you need to reset the value of show scheduler on unmount of scheduler component

@JitendraSoni1234 thanks for the help

@bezxc thanks for closing the conversation


Broken link to Japanese MFA dictionary v2.0.0

mfa version: 2.0.0rc4
run mfa models download dictionary japanese_mfa on Ubuntu shows:
RemoteModelNotFoundError: Could not find a model named "japanese_mfa" for dictionary. Available: russian_mfa,
  mandarin_taiwan_mfa, mandarin_mfa, mandarin_erhua_mfa, mandarin_china_mfa, german_mfa,    french_mfa, english_us_mfa,
  english_uk_mfa, english_nigeria_mfa, english_mfa, czech_mfa, swedish_mfa,    portuguese_portugal_mfa, portuguese_mfa,
  portuguese_brazil_mfa, polish_mfa, korean_mfa, korean_jamo_mfa,    vietnamese_mfa, vietnamese_hue_mfa,
  vietnamese_ho_chi_minh_city_mfa, vietnamese_hanoi_mfa, ukrainian_mfa, turkish_mfa,    thai_mfa, swahili_mfa,
  spanish_spain_mfa, spanish_mfa, spanish_latin_america_mfa, hausa_mfa, croatian_mfa,    bulgarian_mfa, vietnamese_cv,
  uzbek_cv, uyghur_cv, urdu_cv, ukrainian_cv, turkish_cv, thai_cv, tatar_cv, tamil_cv,    swedish_cv, sorbian_upper_cv,
  russian_cv, romanian_cv, punjabi_cv, portuguese_cv, polish_cv, mandarin_pinyin,    maltese_cv, kyrgyz_cv, kurmanji_cv,
   kazakh_cv, italian_cv, indonesian_cv, hungarian_cv, hindi_cv, guarani_cv,    greek_cv, german_prosodylab,
  georgian_cv, french_prosodylab, english_us_arpa, dutch_cv, czech_cv, chuvash_cv,    bulgarian_cv, belarusian_cv,
  basque_cv, bashkir_cv, armenian_cv, and abkhaz_cv. You can see all available models either on
  https://mfa-models.readthedocs.io/en/latest/ or    https://github.com/MontrealCorpusTools/mfa-models/releases. If
  you're looking for a model from 1.0, please see
  https://github.com/MontrealCorpusTools/mfa-models/releases/tag/dictionary-archive-v1.0.

I try to download dic from release paga but the page shows 404.

Right, the Japanese models and dictionary are still under construction since I just got access to the LaboroTV corpora last week and have been cleaning it up and expanding the dictionary for including it in training.  The current Japanese MFA dictionary is available here: https://github.com/MontrealCorpusTools/mfa-models/tree/main/dictionary/japanese/mfa/v2.0.0, but eventually it'll be released like the other languages once it has pronunciation and silence probabilities.

Hi @mmcauliffe , is there any update on this? I tried checking the link you posted but I can't find the .dict file. Thanks!

@mmcauliffe
Also, is there any plan in the horizon to release not only a Japanese to IPA dict, but an acoustic model as well? I'd like to use MFA if possible, but if there are no plans in the horizon I will need to find alternative tools to do this.
I wouldn't mind trying to train a MFA acoustic model myself, though I don't know if Japanese will be particularly problematic, or if there are any extra steps I should do given the lack of spaces in the language.

So I have a decent Japanese model trained, I think, just doing some verification to make sure it's working as well as I'd like.  So should be a Japanese acoustic model, dictionary and g2p on the horizon (hopefully very soon!).
The only issue that I'm still unsure of is the word segmentation, since that was done external to MFA via nagisa but then I modified and corrected the transcripts pretty extensively to make proper phonological words (merging things like 使っ た back to  使った and things that feel more like words to me). I'd like to retrain a nagisa model, but I'd need to generate POS tags for the training data.  But the acoustic model and dictionary should at least be a good starting point.

@mmcauliffe Thanks for replying! I'm looking forward to try it once it's available.
By the way, is there a way to do only g2p for some input text (no audio) with the MFA command line? For other languages I was simply loading the dict and looking for words myself (ignoring for now probabilities and such), but here I would also depend on word segmentation to do that. I'm also not sure about what would happen when finding a word not in the g2p model.

By the way, is there a way to do only g2p for some input text (no audio) with the MFA command line? For other languages I was simply loading the dict and looking for words myself (ignoring for now probabilities and such), but here I would also depend on word segmentation to do that. I'm also not sure about what would happen when finding a word not in the g2p model.

@leandro-gracia-gil Yep, the mfa g2p command can take a corpus path as input and generate pronunciations for all words in there (though it would overlap with the dictionary, I'll think about a way to filter it down to just OOVs).  The other route would be to do mfa validate on the corpus which will generate an OOVs file in the temporary directory that you can use as input to mfa g2p.
@MicaelLemelin I'm shooting for end of November/early December if I can get the current issue resolved (at the moment it's matching a ton of silence to the final "vowel" of です and ます, even though it should just be deleted, but once I figure out, it should be good to go since everything else looks decent.

That's really great news. Can't wait to see it!
Thank you so much! @mmcauliffe

Thanks for the great work! Is there any update about the Japanese acoustic models？

Ok I fell down the rabbit hole trying to clean the laboroTV corpus, but I have some cool stuff in the pipeline for speaker classification/diarization.  Current plan is to shelve the laboro cleaning, get a decent model trained on

Common Voice 12
GlobalPhone
JVS
Microsoft's Japanese corpus
TEDxJP-10K, and release that.

I think I have most issues worked out with it, just trained a candidate model, so I'll see how the alignments from it look and correct any data issues still remaining in the corpora above before releasing.

Thank you very much for the update! Looking forward to try the model once it's ready.

Ok I fell down the rabbit hole trying to clean the laboroTV corpus, but I have some cool stuff in the pipeline for speaker classification/diarization. Current plan is to shelve the laboro cleaning, get a decent model trained and released with:

Common Voice 12
GlobalPhone
JVS
Microsoft's Japanese corpus
TEDxJP-10K

I think I have most issues worked out with it, just trained a candidate model, so I'll see how the alignments from it look and correct any data issues still remaining in the corpora above before releasing.

Thanks for all the works you have done! Your models really help me a lot in my research.

Ok Japanese acoustic model, dictionary, and g2p model are up now, so I'll close this out.
They're looking reasonably decent from my spot checks.  I'll keep working on the LaboroTV corpus to get a model trained with that in the near future, but there is a lot of noise both in terms of the recordings, segmentation, and the tokenization from nagisa that I'm basing the "word" segmentation on (words popping up like "まそれ", "えその" that contain hesitations merged with the following words).
I'm still thinking about best way to provide some tokenization model trained on the corrections that I've done, since it isn't straightforwardly what nagisa outputs (nagisa: "使 って" vs mfa: "使って").  To retrain nagisa, I'd need to get some POS tags going, but I may be able to scrape a reasonably good dictionary for tagging via wikipron/wiktionary.  This is largely outside of MFA, but might tie into using richer dictionaries with better morphological tagging/parsing rather than viewing each word as morphologically opaque and a completely unrelated to all other words.

Ok Japanese acoustic model, dictionary, and g2p model are up now, so I'll close this out.
They're looking reasonably decent from my spot checks. I'll keep working on the LaboroTV corpus to get a model trained with that in the near future, but there is a lot of noise both in terms of the recordings, segmentation, and the tokenization from nagisa that I'm basing the "word" segmentation on (words popping up like "まそれ", "えその" that contain hesitations merged with the following words).
I'm still thinking about best way to provide some tokenization model trained on the corrections that I've done, since it isn't straightforwardly what nagisa outputs (nagisa: "使 って" vs mfa: "使って"). To retrain nagisa, I'd need to get some POS tags going, but I may be able to scrape a reasonably good dictionary for tagging via wikipron/wiktionary. This is largely outside of MFA, but might tie into using richer dictionaries with better morphological tagging/parsing rather than viewing each word as morphologically opaque and a completely unrelated to all other words.

Wow thank you so much!! This is really useful for my research, as well :D


Batch size = 16?

Hi,
Thank you for your nice implementation.  I have a question about the batch size selection. It looks like the network is small enough for bigger batch size, for example 32 or 64 on a GTX 1080Ti. Batch size of 16 is a kind of regularization?
Another question is related to the G/D updates. In your generated samples, are you using 1:1?
Thanks.

Hi, @chapter544

The original authors noted that selecting batch size is important, so I didn’t increase the batch size even if I could use bigger batch size. Currently I’m testing whether using larger batch size is harmful or not.
I used 1:1.

@seungwonpark thank you for your information. I'll leave this issue a little longer so that we can confirm about the batch size selection.

Training loss curve of internal multi-speaker dataset. The batch size is 16(orange), 64(blue).
I can't determine whether 64 is okay for now...

@seungwonpark  Sorry but I couldn't find the note in the original paper that batch size was carefully chosen. Also, I've thinking that if we use multi-speaker training scheme and use larger batch, then it can include more modes in training batch so that it can helps training.(also discussed in https://arxiv.org/abs/1809.11096, but not sure because it may depends on domain)

@wade3han Actually it wasn't noted on the paper, but there was a TeX comment like:
%Batch size was an important hyper-parameter that required tuning to find optimal audio fidelity and faster training time. We used batch size 16 for all experiments.

You can see the LaTeX source of the original paper at: https://arxiv.org/format/1910.06711

I tried batch size: (32, 128, 256), with similar configuration of this repo,
batch 32 was better than others at 220k train step ( 32 > 128 > 256).
I haven't tried batch size = 16 yet.

Is it obvious that mel-gan works best at batch size 16? I reminded the mention of authors and now it sounds like they realize there are trade-offs between audio fidelity and faster training time; so if we took more time to train the model with larger batch-size, maybe we can get higher audio quality.

I just experimentally found batch 16 was best with learning_rate: (discriminator: 4e-4, generator: 1e-4 gan training technique? called ttur was beneficial) if other hyper params are fixed.


bug: watchAccount event activated when I change network in metamask

Is there an existing issue for this?

[X] I have searched the existing issues

Package Version
^0.8.8
Current Behavior
When I change network in metamask, sometimes activated event watchAccount. This happens after a few (3-5) network changes. And it only happens in metamask.
Expected Behavior
Event watchAccount must listen just change accounts.
Steps To Reproduce
Start a new project with wagmi
Instantiate a MetaMaskConnector in a code editor that supports documentations
Connect your MetaMask wallet and try changing network (3-5 tries).
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
No response

Even on your site, if you connect a metamask and change the network several times, the wallet will turn off.

By default, watchAccount invokes when the connector instance changes (which is what is happening here). You can scope the behaviour to only change on address changes by doing:
watchAccount(
  () => { ... },
  { selector: ({ address }) => ({ address }) },
)

Also possible that this is related to a longstanding MetaMask bug (wagmi attempts to shim fix, but possible it is not successful all the time).


consider FFI bindings

It occurred to me that we could generate bindings using the same rust code base for

[x] python (pyo3 for binding and maturin for packaging)
[x] node.js (yarn for packaging with napi-rs for native bindings and packaging)
~C (cbindgen for bindings and <your-choice-here> for packaging like conan or vcpkg or both and more)~
[ ] Java (jni-rs for bindings and maven for packaging)

The python, node.js, and java bindings would only work for Linux (32 or 64 bit).
I haven't explored the C or Java ideas, just throwing that out there. I have been exploring the python and node ideas (in a different project).
To use C bindings in Arduino builds, we'd have to ship the library with generated header file(s) and pre-compiled binaries (*.a files compatible with any supported architectures -- mostly variations of arm-none-eabi for newer chips). But I'm not sure how feasible that would be, given complications like an RTOS or other multi-tasking implementations.

I've been exploring cbindgen to create a C binding from rust source.
Unfortunately, I'm withdrawing the C binding from this proposal because cbindgen is rather limited. It cannot bind functions that use optional parameters, and function parameters cannot be given a default value. This affects

send()
write()
read()
constructor. Cbindgen actually generates the constructor from the given struct's public fields (which are all private in the RF24 struct).

Luckily, we already have a seasoned C++ code base for the nRF24L01 😉. And, I doubt anyone would want to migrate away from that just for memory safety.

About jni-rs
jni-rs is looking for new/more maintainers. This isn't a good sign for those of us wishing to use it in production-grade code.
At first glance
I'm not sure how a java class translates to a rust struct. None of the examples for jni-rs demonstrate this. All of the examples simply use a java class as a namespace for static methods (which are implemented in rust).
Full disclosure
I don't have any experience writing java. I'm not sure java has any significant following in the embedded dev sphere.
I'm leaving the java binding in this proposal to be considered optional. If we have a request to add it, then I'll reassess.

GO binding
I also looked into a GO language binding, but that seems dependent on a project named CGO; this would require translating rust into a C, and then linking the GO code to the exported C symbols. From what I can gleam (I'm no well versed in GO), there's virtually no benefit from writing GO implementations in rust because both languages seem to offer similar guarantees (memory safety with strict typing).
Instead, it would just be better to write an implementation in pure GO because there is a specialized GO compiler for embedded development: tinyGO.
Dart binding
If someone wants to write a flutter app using the nRF24L01, then theoretically, they could just use this rust package with the rinf project's offering (or write a FFI binding to the C++ RF24 code base). Dart also offers similar guarantees as rust (memory and null safety with strict typing). However, Dart is slightly less performant than rust.
PS - Cross-compiling Dart isn't really possible (without Docker containers and/or Virtual Machines), and it doesn't seem to be a goal for the Dart team.


add ui for modifying cloudwatch event schedules

use config.yml instead so that redeploys don't revert back to prior state


Fix some fallthrough warnings with gcc >= 7.

In the test queue, thanks

Merged to develop, thanks.


With the most recent pandas-stubs, mypy now complains about every call to itertuples()

With the most recent pandas-stubs, mypy now complains about every call to itertuples()
Is there a way that I'm supposed to tell the new release what my column names are?
Sample
import pandas as pd

df = pd.DataFrame({"a": [1, 2, 3, 4], "b": [5, 6, 7, 8]})

for item in df.itertuples():
    a = item.a
    b = item.b

mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

foo.py:6: error: "tuple[Any, ...]" has no attribute "a"  [attr-defined]
foo.py:7: error: "tuple[Any, ...]" has no attribute "b"  [attr-defined]
Found 2 errors in 1 file (checked 1 source file)

Originally posted by @j-carson in https://github.com/pandas-dev/pandas-stubs/discussions/832

With the new type mypy complains whenever it is passed to a function accepting NamedTuple :-(
error: Argument n to "foo" has incompatible type "_PandasNamedTuple"; expected "NamedTuple"  [arg-type]

@roj516 can you create a new issue and a more complete example?

With the new type mypy complains whenever it is passed to a function accepting NamedTuple :-(
error: Argument n to "foo" has incompatible type "_PandasNamedTuple"; expected "NamedTuple"  [arg-type]

@roj516 can you create a new issue and a more complete example?

881


proposal: Go 2: one line error handling with eReturn function

Introduction
I've read through a lot of the error handling proposals. I think the ones being considered are not simple. This proposal is for simple cases of assignment to an error. I do not propose any sort of global error handling. I do not propose any sort of chaining. I do not propose the mechanism proposed be provided to assignment to any variable.
Proposal
Any error function with the signature: func(error, string) error can be used in place of an assignment to a error variable. An error function is provided in the "fmt" package that will provide simple error handling. This error function is called EReturn.
Locally any function with the signature func(error, string) error can be used directly if it has the name eReturn Otherwise the function can be assigned to a variable called eReturn. Variable assignment could be used to assign different functions whether local or from a different package. It is my view that it would be unusual to have to more than one local error handler because the string parameter can be used to differenticate between use cases.
In use, the error is implicitly provided to the error function. Some examples may make the proposal more clear.
Assuming the package "fmt" is modified to include the following error function. Because it has the right signature and name, it can be directly used for many use simple use cases.
package fmt

// return the current error for a blank string, otherwise wrap the error
func EReturn(e error, errstr string) error {
	if errstr == "" {
		return e
	}
	return fmt.Errorf(errstr, e)
}

The proposed syntax with an error function in assignment position.
// 1. passes through the error from strFunc
str, fmt.EReturn("") := strFunc("something")

// 2. wraps some new infomation around the error from os.Open
file, fmt.EReturn("missing today's text") := os.Open("today.txt")

Both of the above case are syntactic sugar that the compiler can expand. For instance 2. is expanded to:
file, err := os.Open("today.txt")
if err != nil {
	return nil, eReturn(err, "missing today's text")
}

Locally the errstr passed through to the function may provide enough information to differentiate between cases. For example
func localEx(loc string) {
	const special = "I'm special"
	eReturn := func(e error, errstr string) error {
		errprefix := fmt.Sprintf("loc: %v ", loc)
		if errstr == special {
			// do some special processing
			return fmt.Errorf(errprefix + "special error " + errstr +": %w", e)
		}
		return fmt.Errorf(errprefix + errstr +": %w", e)
	}

	sp, eReturn(special) := specialFunc()
	sns, eReturn("not special") := notSpecialFunc()
    // more calls
}

Discuss
Possibly, EContinue, EBreak could be proposed to be used in loops. Possibly ELog could be used to continue
Template - Language change

Would you consider yourself a novice, intermediate, or experienced Go programmer?
intermediate
What other languages do you have experience with?
Scala, Java, Some others
Would this change make Go easier or harder to learn, and why?
Very slighly harder because it would be an extra concept to learn
Has this idea, or one like it, been proposed before?
I haven't found a similar proposal linking naming, a function in assignment position and a specific function signature.
Who does this proposal help, and why?
All those concerned that simple error handling is too verbose
What is the proposed change?
Please describe as precisely as possible the change to the language.
please see above proposal
What would change in the language spec?
please see above proposal
Please also describe the change informally, as in a class teaching Go.
not my expertise
Is this change backward compatible?
There is no break to existing code
Show example code before and after the change.
please see above proposal
What is the cost of this proposal? (Every language change has a cost).

How many tools (such as vet, gopls, gofmt, goimports, etc.) would be affected?
vet, gopls, gofmt
What is the compile time cost?

None. The proposal is syntactic sugar

How would the language spec change?
One small error function with specific name and signature
Orthogonality: how does this change interact or overlap with existing features?
No interaction, I think
Does this affect error handling?
Yes
If so, how does this differ from previous error handling proposals?
there are a huge number of proposals, but I haven't found an equivalent
Is this about generics?
No

Please fill out https://github.com/golang/proposal/blob/master/go2-language-changes.md when proposing language changes

Please fill out https://github.com/golang/proposal/blob/master/go2-language-changes.md when proposing language changes

see #32473 for a proposal on assigning to a handler functions
As I understand the limitation on naming means you can only have a single handler per package?

see #32473 for a proposal on assigning to a handler functions
As I understand the limitation on naming means you can only have a single handler per package?

@seankhliao
You can name the error functions with different names within the same package, but they are required to have the right signature. Once this is done you can assign any error function to a variable of name eReturn. That way you can swap between error functions.
Because you are always providing the error function with a string format argument, you could write a local error function to switch over the different string formats and provide differing functionality (assumes you are using a constant to provide the argument).

@seankhliao
You can name the error functions with different names within the same package, but they are required to have the right signature. Once this is done you can assign any error function to a variable of name eReturn. That way you can swap between error functions.
Because you are always providing the error function with a string format argument, you could write a local error function to switch over the different string formats and provide differing functionality (assumes you are using a constant to provide the argument).

Once this is done you can assign any error function to a variable of name eReturn. That way you can swap between error functions. (I've updated the proposal to make this more explicit).

I am really not a fan of this being the way to have multiple error handlers, especially because there is often going to be multiple handlers in a single package. In particular, it is clunky (you have to assign your error handler before you use it) and it isn't safe to use across multiple goroutines.

Once this is done you can assign any error function to a variable of name eReturn. That way you can swap between error functions. (I've updated the proposal to make this more explicit).

I am really not a fan of this being the way to have multiple error handlers, especially because there is often going to be multiple handlers in a single package. In particular, it is clunky (you have to assign your error handler before you use it) and it isn't safe to use across multiple goroutines.

@deanveloper I don't tend to use global variables.

@deanveloper I don't tend to use global variables.

Yes sorry for the confusion, it was because the proposal typically defines a global eReturn function, so I was thinking you had meant using a global eReturn variable as well. My bad.
Still unsure what I think about it.

Yes sorry for the confusion, it was because the proposal typically defines a global eReturn function, so I was thinking you had meant using a global eReturn variable as well. My bad.
Still unsure what I think about it.

@no worries

@no worries

@deanveloper Thank you for having the politeness of giving me your opinion. Based on what you said, I rewrote my proposal to make it as clear as possible. I believe you said in another thread that you like explicit "return " statements and I can completely understand this.

@deanveloper Thank you for having the politeness of giving me your opinion. Based on what you said, I rewrote my proposal to make it as clear as possible. I believe you said in another thread that you like explicit "return " statements and I can completely understand this.

Yeah I had said that before. I’m not sure if I still stand by that statement though. I’d rather use a solution that keeps explicit returns, but I’m getting more flexible to those that don’t have them.

Yeah I had said that before. I’m not sure if I still stand by that statement though. I’d rather use a solution that keeps explicit returns, but I’m getting more flexible to those that don’t have them.