Issue with async inline delegates ($taskResult1 is not defined)

This is a rather edge scenario and easy to work around. But since C# does support inline delegates with the "async" modifier, and the error only occurs at runtime I'm reporting this anyway.
The issue is seems to occur when async methods are written as inline delegates, such as an asynchronous eventhandler in the example below.
The example works completely fine if the code uses a seperate method as the async eventhandler instead of an inline async delegate.
Steps To Reproduce
https://deck.net/0099d558e1e56ef9e7a8b9fd3120d1e9
// Bug report by Christian "ChrML" Lundheim - 18.02.2019
// Bridge.NET 17.6.0

public class Program
{
    public async static void Main()
    {
        // Prepare the test: Make a new button class.
        ButtonAsync button = new ButtonAsync();

        // Example 1 - Works fine:
        // Add, execute and remove seperate async method as eventhandler.
        Console.WriteLine("BEGIN: Executing eventhandler as seperate async method");
        button.ClickAsync += EventHandler;
        await button.OnClickAsync();
        button.ClickAsync -= EventHandler;
        Console.WriteLine("FINISH: Executing eventhandler as seperate method");

        // Example 2 - Does not work:
        // Add and execute inline async delegate as eventhandler.
        Console.WriteLine("BEGIN: Executing eventhandler as inline async delegate");
        button.ClickAsync += async () => await Test();
        await button.OnClickAsync();  // EXCEPTION: $taskResult1 is not defined.
        Console.WriteLine("END: Executing eventhandler as inline async delegate (this never happens)");
    }

    static async Task EventHandler()
    {
    }

    static async Task Test()
    {
    }
}

public class ButtonAsync
{
    public event ButtonClickAsyncEventHandler ClickAsync;

    public Task OnClickAsync() => ClickAsync?.Invoke();

};

public delegate Task ButtonClickAsyncEventHandler();

Expected Result
$tcs.setResult(null);

I'm not 100% sure, async code in JS is somewhat complex. But $taskResult1 is undefined and returns void, so should probably be null like the code inside "EventHandler" method.
Actual Result
$tcs.setResult($taskResult1);

In fact you forgot somthing
please use async keyword in OnClickAsync method

Hello, @ChrML and thanks for reporting the issue!
I can't really seem to be able to run your code in a native C# console application, maybe I am missing something, like a project setting or C# API version? Interesting Deck does not issue the same message, this may be passing roslyn somehow, whereas failing in Visual Studio.
Getting this:
The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.

On lines 15 and 23 of the deck you provided (await button.OnClickAsync();).

https://deck.net/0219a2a4542c74c3c2be6a1221d52c80

@miladsadeghi72 You made the method async, but you forgot to await the event Invoke. So effectively the exception likely still occurred, but got tossed away because the task is not awaited. Still by looking at the JS code a not init var is still being used.
The original code without OnClickAsync is infact working by just returning the task as it is without passing it through an async method. Its not required to use the async/await pattern the whole way if you just return the task. Although on a general basis I see this scenario is probably not a good idea because with no eventhandlers you'll end up awaiting "null", tho this is not affecting this test.

@fabriciomurta I will look at my settings at work tommorrow and attempt to compile it natively.

@fabriciomurta Likely your main method is not async or you have an older version of C#. I believe async Main() method was only added recently, but you can make another method for testing.
Here's some information about async delegates:
https://blog.stephencleary.com/2014/02/synchronous-and-asynchronous-delegate.html
I will come back to you tomorrow when I've confirmed (I don't have the software in front of me right now).

@ChrML  yes you are right, but it's have other type of bugs
https://deck.net/e475a8713934bc89995d5e13ea29d95a
diffrent is:
// bugy code
        button.ClickAsync += async () =>await Test();

And
 // fine
button.ClickAsync += async () =>
        {
            await Test();
        };

@fabriciomurta this can help

Likely your main method is not async or you have an older version of C#.

@ChrML, It is C# 7.2 or newer, and .NET Framework 4.7.1.
In the console app project properties I see C# 7.3 available, and the project is set up to the latest minor version:

@miladsadeghi72 These examples are identical and both are allowed in C#. First is just an abbreviation recommended for one-liners, while the second is more verbose but allows for more than one line of code in the delegate.

@fabriciomurta For the example above to compile under Native .NET Framework you need to:

Set .NET Framework version to 4.7.2 or later
Set C# version explicitly to C# 7.3 (apparently the "latest" as considered by Visual Studio is 7.2)
Change the Main() method return value from "void" to "Task"

When this is done, the example in the Deck works correct under native .NET.

I made a new deck with a much simpler example that reproduces this same error.
This example also works out of the box in native .NET:
https://deck.net/fd2e144db19a63f09ac6f8d43875d2a5

https://deck.net/1250e80cfc07528fdb2e63c33ee834e0
https://deck.net/e475a8713934bc89995d5e13ea29d95a

https://deck.net/1250e80cfc07528fdb2e63c33ee834e0
https://deck.net/e475a8713934bc89995d5e13ea29d95a
@miladsadeghi72 Good point, I think you found the root of the issue. Seems the Bridge.NET compiler actually compiles it quite different depending on if you scope the delegate using { and }, or if you don't. Altough both ways to do it are equally valid in C# and should be compiled identical.

its also is a way to fix this issue
@fabriciomurta why dont defect this?
what is wrong?
we try to help

its also is a way to fix this issue
@fabriciomurta why dont defect this?
what is wrong?
we try to help

its also is a way to fix this issue
@fabriciomurta why dont defect this?
what is wrong?
we try to help

I'm sure he just wants to iron out what the problem is and confirm that it works on native .NET first before defecting this. Remember this is not exactly a huge problem, but quite easy to work around.
In my experience the Bridge.NET team has been very good at fixing these small things as they get reported. And on Github we can also make pull requests to fix these issues ourselves. =) 👍 💯

Hello again, and thanks for keeping up with us! We've fixed this issue a few days ago, and now just integrated it on the branch that will result in the next Bridge version! That said, the fix will be available next Bridge release; the version number is reflected in this issue's milestone.


Densenet

Hi, I'm trying to train your model in "food101.ipynb".
But I have some problems with training.

Which Dataset did you use and how did you split it
It seems that Densenet121 was used (not 161)
Test accuracy doesn't rise from 0.6
You trained at 1050ti, can i train at 1650(notebook)?

thankyou

I am using food 101 dataset
check it on tensorflow web to download
I used both 121 and 161 but for reasons I dno`t want to publish 161 here.
you could use even 940mx also colab


401 Unauthorized on api/UrlList

When I try to access the "URLs Manager" I'm getting 401 Unauthorized from the service -- but I don't understand why, and I'm hoping someone can give me a nudge in the right direction.
The service is running (no problem there, of course)...
I temporarily disabled the authentication check on UrlShortener and added a few URLs and tested them, so I'm sure the actual function app is working, I just can't figure out how to authenticate to it.
I eventually got my AAD apps and custom domains and CORS all working -- and was able to log in with the TinyBlazorAdmin pointing at my function app... but every attempt to actually use the admin app is resulting in those "An unhandled error has occurred. Reload" error bars, and showing up in the logs for UrlList or UrlClickStatsByDay as "Request was not authenticated."
Browser debug tools shows I'm sending an authorization: Bearer .... token in the request, but I don't understand where I went wrong.

Hi, did you resolve this? I'm can't login using azure ad, how did you get it working? I'm getting an issue similar to https://github.com/FBoucher/TinyBlazorAdmin/issues/80. Thanks in advance

Okay so have the AD auth working but now getting same error An unhandled error has occurred.

So im now getting something similar to this
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: 'user_impersonation'

did you manage to fix it?
what we did was to edit the AzFuncAuthorizationMessageHandler.cs to look like this:
      public AzFuncAuthorizationMessageHandler(             IConfiguration config,             IAccessTokenProvider provider,             NavigationManager navigation) : base(provider, navigation)         {             var section = config.GetSection(nameof(UrlShortenerSecuredService));             Endpoint = section.GetValue<string>(nameof(Endpoint));             AppIdUri = section.GetValue<string>(nameof(AppIdUri));             ConfigureHandler(                 new[] { Endpoint },                 new[] { string.Concat(AppIdUri, "user_impersonation") }             );
after that you need to change the appsettings.json to:
{   "AzureAd": {     "Authority": "https://login.microsoftonline.com/{tenantID}",     "ClientId": "{AzureADAppRegistrationClientID}",     "ValidateAuthority": true   },   "UrlShortenerSecuredService": {     "Endpoint": "{EndpointURI}",     "AppIdUri": "api://{AzureADAppRegistrationFunctionAppID}/"   },   "DetailedErrors":true }
Microsoft changed how AD Auth and App Registrations works.


Detect command interface

Adds a detect command interface
Also modifies some logic in web.py

I think the command should be called predict and not detect.
This way, we can use it for whatever task (classification, object detection, masking, pose estimation, etc.) and this would only be differentiated by choosing a different  --model parameter.

@dekked @gastonrod07 I agree with Alan's comments.


Fixing mutations so that they work in introspection

Using :atom references instead of strings

This fixes https://github.com/joshprice/graphql-elixir/issues/52

Thanks! :green_heart: :blue_heart: :purple_heart:


Add ai text object

Thanks for making a great plugin! I just switched to this one from vim-indent-object, and I noticed that this plugin doesn't support the ai text-object like vim-indent-object does. It is very useful when in visual mode and you've selected an indentation with ii, because then you can keep hitting ai to select the next indentation level. The mnemonic for ai is "around indendation", just like how (at least to me) ii reads "inside indendation".
For example, pressing vii with the cursor on the line with the comment "cursor here", and then pressing ai expands your selection to the next indendation level:
table.insert(active_right, {
  provider = 'filetype' -- 3. Pressing `ai` a second time selects this indendation level
  left_sep = left_sep,
  right_sep = right_sep,
  hl = { bg = 'line_bg' },
  enabled = has_file_type,
  icon = function()
    return {            -- 2. Pressing `ai` selects this indendation level
      str = get_icon(), -- 1. Put cursor here and press `vii`
      always_visible = true,
    }
  end,
  truncate_hide = true,
  priority = 1
})

Thank you for the kind words, and using my plugin!
You are raising two valid points here. Let's have a discussion to understands what needs to be done.
Regarding ai
You are correct, this needs to be implemented. The reason I didn't get to implement this was because of problems handling this. Imaging you have the following contents (cursor is represented by |):
11
  aa
    bb|
    bb
  cc
22

The cii produces:
11
  aa
  |cc
22

Which is logical, and when the NL at the end of the second indented line is removed, cc will be in front of the caret.
Now the question is, how does it look like when the around area of the indentation is removed? In vim's language, it should be the text object plus the white spaces. (actually, leading or trailing white spaces).
Considering there is another indentation text-object (11-22) is after, you are supposed to be removing any white space after the cursor. The other option is to remove the before one and break the rule:
11
  aa|cc
22

I am not arguing that this is bad, I just want to understand what is the right way of dealing with this.
Regarding expansion motion
That's a great idea, and is doable. I have a couple of questions though:

Is it only valid if the visual selection was initiated by this plugin?
What if the user changes the visually selected area and put both ends in different levels, to which direction should it grow?

First of all I realize now that your plugin operates in visual mode and not in visual-line mode. I think it makes more sense to operate in visual-line mode since each indent is per line. I think in your example
11
  aa
    bb|
    bb
  cc
22

it makes more sense to me if doing cii yields this:
11
  aa
    |
  cc
22

i.e. that the indentation level is preserved. My guess is that switching to visual-line mode will give this behaviour more or less automagically.
Most of my thoughts here come from using the plugin vim-indent-object. I think it is very intuitive to use, perhaps give it a try to get a feel for what feels intuitive.
I realize also that the behaviour of ai isn't quite what I described earlier. In vim-indent-object it is ii that expands to the "next" indendation level, but only if you've already selected the entire current indendation level. ai targets the current indendation level, and the line above. I'm not sure what the use case is for this. Perhaps it would make more sense for ai to select the current indendation level and any ledaing or trailing new lines (up to but not including the next indendation level). Here < indicates the lines that get selected:
11

  aa
                     <
                     <
    bb|      < ii    < ai
    bb       <       <
             <       <
    bb       <       <
                     <
  cc
22

Is it only valid if the visual selection was initiated by this plugin?

Either that, or ii could check if every correct line is already selected (i.e. if the selection wouldn't have changed on ii), and in that case expands to the next indendation level.

What if the user changes the visually selected area and put both ends in different levels, to which direction should it grow?

vim-indent-object seems to select based on the "lowest" (leftmost) indendation level that is selected, but it would also make sense to me to select only based on the indendation level of the line that the cursor is on (i.e. as if the selection was made from normal mode).

I have implemented the ai and fixed the visual-line problem.
Let me think about the ii and ai after the visual selection idea you have, which makes sense by the way, and will get back to you. In the meanwhile, if you have any more input please feel free to comment here.


Develop example with image classification

Some examples of non-toy datasets I found on Kaggle:

Natural Scenes, multiclass https://www.kaggle.com/datasets/puneet6060/intel-image-classification
Ships, 2-class https://www.kaggle.com/datasets/rhammell/ships-in-satellite-imagery
Manufacturing, 2-class https://www.kaggle.com/datasets/ravirajsinh45/real-life-industrial-dataset-of-casting-product
Materials, 2-class https://www.kaggle.com/datasets/arunrk7/surface-crack-detection

We have a pillow.ImageDataset already https://docs.kedro.org/projects/kedro-datasets/en/kedro-datasets-4.1.0/api/kedro_datasets.pillow.ImageDataset.html
Extra points:

Object storage with MinIO
Experiment tracking with MLflow

Stretch goals:

Data versioning with DVC
Orchestration with Airflow

Here it is! https://github.com/kedro-org/kedro-academy/tree/main/kedro-image-classification well done @ankatiyar 👏🏼
Ended up using the Ships dataset, and covered MinIO, MLflow, and Airflow.


add maintainers file

follow up from https://github.com/fermyon/spin/issues/2629

just need an approval from @radu-matei @itowlson


Automatic syncing of individual timelines

Currently during automatic syncing all timelines of an account are synced as one operation.
This is inconvenient for several reasons:

A user cannot see, when any individual timeline was last synced and if it was successful or not. Only one result for all timelines is shown.
In a case of an error syncing of all timelines should be repeated, even for those timelines, which were synced successfully during previous sync. This means unnecessary network traffic and delays.
There is no way to turn on/off automatic syncing of only some timelines.

Implemented in v.27.00 (180), available at the Open Beta testing channel https://play.google.com/apps/testing/org.andstatus.app


fonipa font

We're using mui-language-picker in https://github.com/sillsdev/TheCombine and one of our users has suggested that for language "Japanese (ja-fonipa)"any language and script "Phonetic - fonipa", the default font should be "DoulosSIL" instead of "Noto Sans CJK JP"the default for that language.

ok, thank you for the suggestion. I think it is a good idea. Let me look
into how difficult that might be. Is the issue that There is not other font
option or that the default option isn't the best?
Greg Trihus
Skype: gtryus / Facebook http://www.facebook.com/gtrihus / LinkedIn
http://www.linkedin.com/pub/greg-trihus/15/602/335
On Fri, Jan 29, 2021 at 4:23 PM D. Ror<EMAIL_ADDRESS>wrote:

We're using mui-language-picker in https://github.com/sillsdev/TheCombine
and one of our users has suggested that for language "Japanese (jp-fonipa)"
and script "Phonetic - fonipa", the default font should be "DoulosSIL"
instead of "Noto Sans CJK JP".
[image: Screen Shot 2021-01-29 at 17 19 44]
https://user-images.githubusercontent.com/6411521/106333322-666c1180-6256-11eb-8502-59be15cf1616.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sillsdev/mui-language-picker/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3PQ3BWGEMDDAVXMBNUK3S4MYNLANCNFSM4WZUA3AQ
.

When a user selections language "Japanese (ja)", the default script is "Japanese (alias for Han + Hiragana + Katakana) - ..." and the two font options are "Noto Sans CJK JP" and "Noto Serif CJK JP". If the user changes script to "Phonetic - fonipa", the language code updates from (ja) to (ja-fonipa), but the font options do not change.

Thanks, I'll check it out.
Greg Trihus
Skype: gtryus / Facebook http://www.facebook.com/gtrihus / LinkedIn
http://www.linkedin.com/pub/greg-trihus/15/602/335
On Mon, Feb 1, 2021 at 12:29 PM D. Ror<EMAIL_ADDRESS>wrote:

When a user selections language "Japanese (ja)", the default script is
"Japanese (alias for Han + Hiragana + Katakana) - ..." and the two font
options are "Noto Sans CJK JP" and "Noto Serif CJK JP". If the user changes
script to "Phonetic - fonipa", the language code updates from (ja) to
(ja-fonipa), but the font options do not change.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sillsdev/mui-language-picker/issues/1#issuecomment-771063643,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3PQ7562NPUGTEMM5GDEDS43XIFANCNFSM4WZUA3AQ
.

I just realized that fonipa is IPA, not Japanese specific, so I edited the original text of this issue accordingly.

I updated the language picker to address this issue.
Greg Trihus
Skype: gtryus / Facebook http://www.facebook.com/gtrihus / LinkedIn
http://www.linkedin.com/pub/greg-trihus/15/602/335
On Tue, Feb 2, 2021 at 8:56 AM D. Ror<EMAIL_ADDRESS>wrote:

I just realized that fonipa is IPA, not Japanese specific, so I edited the
original text of this issue accordingly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sillsdev/mui-language-picker/issues/1#issuecomment-771692132,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3PQYZYM3B2OIYZYKGYXDS5AHBZANCNFSM4WZUA3AQ
.

https://github.com/sillsdev/mui-language-picker/commit/5ce774e5d62af50111b742272d26c7c53abd2ea4
Thanks!

@gtryus There's still odd behavior in one case:
When switching "Script" from "Phonetic (IPA) - fonipa" back to the language's default, the font options don't update.

Yes it is in the nature of keeping the interaction as simple as possible.
The default case is "unmarked" and once you have marked it,  the preference
is toward retaining the marked case. Of course the user can always click
the X and type the code again. Language codes allow a lot of markup that
the user can't select from menu options and doesn't necessarily want to
lose when they pick another option.
On Tue, Feb 2, 2021, 1:34 PM D. Ror<EMAIL_ADDRESS>wrote:

@gtryus https://github.com/gtryus There's still odd behavior in one
case:
When switching "Script" from "Phonetic (IPA) - fonipa" back to the
language's default, the font options don't update.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sillsdev/mui-language-picker/issues/1#issuecomment-771918967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3PQYVDMGY7VS2ZZZKGMTS5BHT5ANCNFSM4WZUA3AQ
.

If you have a pull request suggestion, I'll look it over. Otherwise, I am
working on a release today and will have to get to it a bit later.
Greg Trihus
On Wed, Feb 3, 2021 at 6:24 AM Greg Trihus<EMAIL_ADDRESS>wrote:

Yes it is in the nature of keeping the interaction as simple as possible.
The default case is "unmarked" and once you have marked it,  the preference
is toward retaining the marked case. Of course the user can always click
the X and type the code again. Language codes allow a lot of markup that
the user can't select from menu options and doesn't necessarily want to
lose when they pick another option.
On Tue, Feb 2, 2021, 1:34 PM D. Ror<EMAIL_ADDRESS>wrote:

@gtryus https://github.com/gtryus There's still odd behavior in one
case:
When switching "Script" from "Phonetic (IPA) - fonipa" back to the
language's default, the font options don't update.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sillsdev/mui-language-picker/issues/1#issuecomment-771918967,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR3PQYVDMGY7VS2ZZZKGMTS5BHT5ANCNFSM4WZUA3AQ
.

@gtryus I tried this again, and I don't understand the behavior. I start with language "Japanese (ja)".

If I select script "Latin - Ltn", the language updates to "Japanese (ja-Ltn)" and the font options change; then when I select the default script "Japanese (alias for Han + Hiragana + Katakana) - ...", the language reverts to "Japanese (ja)" and the font options also revert.
If I select script "Phonetic (IPA) - fonipa", the language changes to "Japanese (ja-fonipa)" and the fonts update; but when I select the default script, the language and fonts do not revert.
By your description, I would have expected it not to revert in any situation, but it is only "-fonipa" that prevents reverting to the "unmarked" state.


Update AA doc to include default python runbook

Added default python runbook to the list of included resources for RunAs accounts

@jennyhunter-msft,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@jennyhunter-msft : Thanks for your contribution to the Azure documentation! The author, @mgoedtel, has been notified to review your proposed change.

@jennyhunter-msft - I have reviewed your suggested changes and approve them.  #sign-off


MLOps Workflow Checklist

Want to get a first pass on automating price model retraining, goal is not to overoptimize anything, or build for other models etc, just get to a point where retraining can happen daily without intervention.
Steps

[ ] pull fresh data from polygon/alpaca
[ ] join fresh data with historical
[ ] train model
[ ] store model binary (local now, model registry next)
[ ] mv model binary into docker image (this part is big bottleneck)

Closing due to inactivity.


Fix warning "The apiVersion 2021-09-01 was not found for the resource type: Microsoft.Storage/storageAccounts/fileServices/shares"

The following warning is observed from the log of integration-test pipeline:
The apiVersion 2021-09-01 was not found for the resource type: Microsoft.Storage/storageAccounts/fileServices/shares

Version has been updated to 2023-01-01