text:
[QnA Maker] Multi-turn support in SDK

Multi-turn support in SDK

Pull Request Test Coverage Report for Build 75305

3 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 88.289%

Totals

Change from base Build 75261:
0.0%

Covered Lines:
3535

Relevant Lines:
3846

💛  - Coveralls

authors: coveralls trojenguri

repo: microsoft/botbuilder-js


text:
fix: port uischema for OnChooseEntity

Fixes #3110

Pull Request Test Coverage Report for Build 411187325

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.01%) to 84.497%

Files with Coverage Reduction
New Missed Lines
%

libraries/botbuilder-lg/src/templateExtensions.ts
1
85.0%

Totals

Change from base Build 406825705:
-0.01%

Covered Lines:
17610

Relevant Lines:
19918

💛  - Coveralls

source: gharchive/pull-request

authors: coveralls joshgummersall

license: MIT

license_type: permissive

license_source: github-api


text:
Guidance and examples informing around Structural vs Behavior Diagrams

Is your feature request related to a problem? Please describe.
As a developer, one might struggle to determine what diagrams to include as part of my design proposals or code contributions to a project.
Describe the solution you'd like
Guidance that first informs readers of the different types/classes of diagrams, and then for each one provides details, resources, and diagram examples.
Describe alternatives you've considered
Considered putting this in each customer engagement's working agreement, but realized that it is better suited as a foundational / engineering playbook.
Additional context
Appropriate designs is essential throughout the entire SDLC and lifecycle of a product.
Design proposals are made up of a lot of different pieces of information. Whether it is conducting trade studies or whether it is influencing a specific approach, a foundational piece of any design is knowing what type of diagram is best suited to convey information with the right amount of information and at the right time of a solution's lifecycle.

Closed by #953

source: gharchive/issue

authors: TessFerrandez adrian-gonzalez


text:
Fix FuncTests project not loading in VS2017

Load fails with:
cpp_client_telemetry\tests\functests\FuncTests.vcxproj : error : Cannot load project with duplicated project items: D:\Git\cpp_client_telemetry\lib\decoder\PayloadDecoder.cpp is included as 'ClCompile' and as 'ClCompile' item types.
Remove decoder.vcxitems from FuncTests as its contents are duplicated in ClientTelemetry.vcxitems

Can you review mine - it has the fix for a while :) #831

Can you review mine - it has the fix for a while :) #831

If yours gets in first, I'm happy to close this one and delete the remote. :)

Actually, I think I found an even better fix that also improves build time! PR to follow if it passes locally.

838 fixes this more rigorously, and improves build perf. Closing as unnecessary.

authors: maxgolov mkoscumb


text:
[PI] Get correct process for UWP app

Summary of the pull request
Attach to the correct process instead of ApplicationFrameHost when PI targets an UWP app window using shortcut or finder tool.
References and relevant issues
#3441
Detailed description of the pull request / Additional comments
Adopted the same logic used in PowerToys Run Window Walker plugin to show correct info for UWP windows.
Validation steps performed
Manually tested using Windows 10 UWP apps: Photos, Calculator and Feedback Hub.

Shortcut: PI attach to the correct process
Finder tool: PI attach to the correct process
Select ApplicationFrameHost from process list: PI attach to ApplicationFrameHost

PR checklist

[x] Closes #3441
[ ] Tests added/passed
[ ] Documentation updated
[ ] Telemetry compliance tasks completed for added/updated events

Just want to report a crash I have encountered while working on this but not related to this PR.
Application: DevHome.PI.exe
CoreCLR Version: 8.0.724.31311
.NET Version: 8.0.7
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: 5cd8 is not a valid value for Int32. (Parameter 'value')
 ---> System.FormatException: The input string '5cd8' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
   at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   --- End of inner exception stack trace ---
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at DevHome.PI.Models.WERHelper.FindOrCreateWEREntryFromEventLog(String filepath, DateTime timeGenerated, String moduleName, String executable, String eventGuid, String description, String processId)
   at DevHome.PI.Models.WERHelper.ReadWERReportsFromEventLog()
   at DevHome.PI.Models.WERHelper.<Start>b__16_1(Object o)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Let me know if anything else is needed.

Just want to report a crash I have encountered while working on this PR but not related to this change.
Application: DevHome.PI.exe
CoreCLR Version: 8.0.724.31311
.NET Version: 8.0.7
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException: 5cd8 is not a valid value for Int32. (Parameter 'value')
 ---> System.FormatException: The input string '5cd8' was not in a correct format.
   at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)
   at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
   at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   --- End of inner exception stack trace ---
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at DevHome.PI.Models.WERHelper.FindOrCreateWEREntryFromEventLog(String filepath, DateTime timeGenerated, String moduleName, String executable, String eventGuid, String description, String processId)
   at DevHome.PI.Models.WERHelper.ReadWERReportsFromEventLog()
   at DevHome.PI.Models.WERHelper.<Start>b__16_1(Object o)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Let me know if anything else is needed.

Interesting... I hadn't seen a PID stored as a hex value in the event log before for WER reporting. I'll get that fixed. Thanks!

authors: davidegiacometti timkur

repo: microsoft/devhome


text:
Updated deprecated GitHub actions

Closes #1530

Please also file an issue in the repo for this action to address this warning:

authors: Alan-Jowett gtrevi

repo: microsoft/ebpf-for-windows


text:
Add cancellation logic to SearchParameterStatusDataStore operations

User story
The search parameter status operations GetSearchParameterStatuses() and UpsertStatuses() should take in a cancellation token as input.
Acceptance criteria
Cancellation logic is added to search parameter status operations.

AB#84443

repo: microsoft/fhir-server


text:
Invisible overflow in FluentGrid with large content which exceeds the content container

🐛 Bug Report
When using a FluentGrid and it contains so much content that the div content is being exceeded there is a nasty bug when scrolling because there are two seperate overflows created.
I've tested it with FluentStack as well and with this component it works just fine.
In my case I have a grid with 2 columns. The first column displays a list of data and the second column displays a filter area.
💻 Repro or Code Sample
I've created a small sample repo and a small video which showcases the bug.
https://github.com/MarvinKlein1508/fluent-ui-scroll-bug
https://www.youtube.com/watch?v=sqAVsGUZavs
🤔 Expected Behavior
I would expect only one scrollbar to appear.
😯 Current Behavior
You will have two scrollbars.
💁 Possible Solution
I'Ve added overflow: hidden to .content which fixes this issue for me. However this solution isn't great because it will break other things then. For example when you use a FluentSelect which displays many items.
🔦 Context
I've just updated my templates to the latest version.
🌍 Your Environment
Mozilla Firefox

For the demo you provided, I solved it by changing Home.razor line 6 to
<FluentGrid Style="overflow: hidden;">

This gives you 1 scrollbar for the whole window
I don't think this is a component issue. We provide Style and Class parameter to 'tweak' things. Also, the template is just a starter. It is not an end-all-solve-all thing. You should be able to use the components fully without or with addapted <div class="content">
Another solution is to do what we do In the demo site where we change the height of the body-content element:

(needs to be -86px for template site) This gives you a scrollbar that just scrolls the right (content)  part

You have to add bottom padding as well on things like cards or else the shadow gets cut off.
Adding overview:hidden to ~most FluentGrid uses seems like a implementation issue.
By default if someone cannot get the base template and add a Grid to the home page, it seems like this will just create more tickets/issues logged as people need to re-tweak on every use of fluentGrid (which would be a reasonably the majority of pages)

@StephenOTT My second suggestion/solution works without adding any padding anywhere. It is als obetter than the first because it makes the header 'sticky'

@vnbaaij thanks for your reply. I would still encourage you to change the template for this.
This might be really confusing for new people which try out FluentUI for the first time. Especially when you think that the template works just fine out of the box.

authors: MarvinKlein1508 StephenOTT vnbaaij

repo: microsoft/fluentui-blazor


text:
API Coverage - Lua scripting or workaround

Feature request type
enhancement
Is your feature request related to a problem? Please describe
Garnet does not support Lua, which prevents it from being able to replace Redis.
However, we mainly use Lua to workaround issues in Redis, most significantly that MSET does not support expiry.
We had issues in production due to queued up SETEX when batch storing. Our workaround looks like this:
namespace ...
using StackExchange.Redis;

public static class RedisDatabaseExtension {

    /// <summary>Set a batch of keys to the string values with the given expiry.
    /// <para>MSET does not support setting expiry, but is better if values don't expire.</para>
    /// <para>EVAL a Lua script to call SETEX for every record in the batch.</para>
    /// <para>In any batches fail this will return false, and not execute further batches.</para>
    /// <seealso cref="https://redis.io/commands/eval/"/></summary>
    /// <param name="db">Redis DB to extend.</param>
    /// <param name="batchSize">Number of records in each batch.</param>
    /// <param name="expiresSeconds">Number of seconds to set as the expiry.</param>
    /// <param name="items">Collection of key-value pairs to set.</param>
    /// <returns>True if all scripts evaluated successfully, false if any failed to match the number of records input in a batch.</returns>
    public static async Task<bool> StringSetLuaBatch(
        this IDatabase db,
        int batchSize,
        int expiresSeconds,
        params (RedisKey key, RedisValue value)[] items) {

        // ARGV[1] is the expiry, so all the values are off-by-one compared to their keys
        const string lua = """
            local expiry = tonumber(ARGV[1])
            local count = 0
            for i, key in ipairs(KEYS) do
                redis.call('SETEX', key, expiry, ARGV[i+1])
                count = count + 1
            end
            return count
            """;

        List<RedisKey> keys = new(batchSize);
        List<RedisValue> values = new(batchSize + 1) { expiresSeconds };

        foreach(var (key, value) in items)
        {
            keys.Add(key);
            values.Add(value);

            if(keys.Count == batchSize)
            {
                if(keys.Count != (int) await db.ScriptEvaluateAsync(lua, [.. keys], [.. values]))
                    return false; // Count doesn't match, exit early with failure

                // Reset for next batch
                keys.Clear();
                values.Clear();
                values.Add(expiresSeconds);
            }
        }

        if (keys.Count != 0) // If any left over execute final batch
            if(keys.Count != (int) await db.ScriptEvaluateAsync(lua, [.. keys], [.. values]))
                return false; // Count doesn't match, exit early with failure

        return true;
    }
}

Lua lets us send one batch to Redis, and then Lua handles the SETEX loop.
Describe the solution you'd like
Lua scripting to work, so Garnet can be a drop-in replacement.
Describe alternatives you've considered
Everything else is nastier to support - diverge from RESP so MSET can expire? Alternate to Lua scripts (C# scripts?) Some batching/networking cleverness so the queue of SETEX doesn't block it up?
Additional context
No response

We had issues in production due to queued up SETEX when batch storing.

This is probably a Redis-specific issue. Garnet should do fine with SETEX sent by StackEchange.Redis which internally does adaptive batching. Perhaps try this out.

The linked PR https://github.com/microsoft/garnet/pull/369 augments custom stored procedures to support a variable number of parameters (similar to MSET) and further uses this to implement MSETPX as a custom transaction.

This is probably a Redis-specific issue. Garnet should do fine with SETEX sent by StackEchange.Redis which internally does adaptive batching. Perhaps try this out.

@badrishc possibly, it was a time consuming issue to reproduce and the result was an outage at a busy time so it would need testing. We're using StackEchange.Redis and Redis should have done fine with the long queue of SETEX too - I don't know whether the issue was with StackEchange.Redis or Redis itself, the symptom was that the queue of SETEX blocked any requests to Redis.

The linked PR #369 augments custom stored procedures to support a variable number of parameters (similar to MSET) and further uses this to implement MSETPX as a custom proc.

Interesting - so like a CLR function in SQL Server you can have custom .NET sprocs? I didn't realise Garnet could do that. I'll definitely check it out.
The main issue (with both suggestions) is that this would need a different build - we'd have a Garnet compatible version and a Redis compatible version and despite Redis's recent close-sourcing we have a lot of existing Redis. At best we have additional config settings and different code paths for different providers - that's real cost, especially as we're going to have production Redis around for a while to come even if we started migrating to Garnet tomorrow.

Redis should have done fine with the long queue of SETEX too

Redis being single threaded processing on the server side, would have choked on this scenario, even if the StackExchange client did the right thing, unfortunately.

The main issue (with both suggestions) is that this would need a different build

The way you would use StackExchange.Redis for this would be something like:
https://github.com/microsoft/garnet/blob/844fedd1340230fdb2173cb61dc404eb3a96f52e/test/Garnet.test/RespTransactionProcTests.cs#L388-L389

Closing as per provided workarounds, thanks!

authors: KeithHenry badrishc

repo: microsoft/garnet


text:
Why handlebars instead of pure Python?

Is your feature request related to a problem? Please describe.
It seems like a lot of actions in Guidance are control flows that use a Handlebars template. This requires users of the library to essentially learn a "new templating language" while giving up the benefits of intellisense and type checks when constructing prompt programs.
Describe the solution you'd like
Instead of creating a custom templating language, why not just allow actual Python code to be weaved in with strings? This creates maximum flexibility and could reuse patterns that Python devs are experienced with.
An analogy is React JS allows devs to write JS within React components, thus weaving in "rendering" and "logic" into the same block, without needing to learn much of a templating language.
For example, the following guidance program is written as a template:
program = guidance("""
{{~#system~}}
You are a helpful assistant.
{{~function_def get_current_weather}}
{{~/system~}}

{{~#user~}}
Get the current weather in New York City.
{{~/user~}}

{{~#while True~}}
    {{~#assistant~}}
    {{gen 'answer' temperature=1.0 max_tokens=50 functions="auto"}}
    {{~/assistant~}}

    {{#if answer_function_call}}
        {{~#function~}}
        {{answer_function_call()}}
        {{~/function~}}
    {{else}}
        {{break}}
    {{/if}}
{{/while}}
""")

But wouldn't it be more Pythonic to just construct some function/generator that looks like this?
@guidance
async def prompt(get_current_weather):
    yield SystemMessage(
        "You are a helpful assistant.",
        func=get_current_weather
    )
    yield UserMessage("Get the current weather in New York City.")

    while True:
        yield AssistantGenerate("answer", temperature=1.0, max_tokens=50, functions="auto")
        if answer_function_call:
            answer_function_call()
        else:
            break

^ This is just some pseudo-code, it probably won't work. I'm proposing some alternative ideas and would love to hear some design decisions/ideas/feedback!

@calclavia This is a great question. And there is a lot that could be said here, but perhaps I'll just start by sharing an example of some more pythonic interface code we have been experimenting with and see what you think. There are meaningful tradeoffs here, but there are also some exciting new directions. The code below shows some ideas we have about centering the whole process on updating the state of a language model (LM) object. Guidance programs would then become pure python functions.
In the example below calling the LM will return a new LM object updated to include that new text in its prompt. Dot chaining will sequentially update the state of the model until we have executed everything we want. There is some complexity around getting streaming to work well, but suffice it to say that can be hidden from the user in the example below.
# set the default language model used to execute guidance programs
lm = guidance.llms.OpenAI("text-davinci-003")

# define a guidance program that adapts a proverb
def program(lm, proverb, book, chapter, verse):
    return lm(f"""Tweak this proverb to apply to model instructions instead.

{proverb}
- {book} {chapter}:{verse}

UPDATED
Where there is no guidance""").generate('rewrite', stop="\\n-")("""
- GPT """).select('new_verse', options=[9, 10, 11])(":").generate("new_verse")

executed_lm = program(
    lm=lm,
    proverb="Where there is no guidance, a people falls,\nbut in an abundance of counselors there is safety.",
    book="Proverbs",
    chapter=11,
    verse=14
)

# we can now access named variables on the returned lm object
executed_lm["rewrite"]

Initial Thoughts:
So this is sort of a state machine/builder-pattern? You start with an empty state, and you update the state?
It seems like this example chains a bunch of calls, which could make sense. The downside is (maybe due to indentation or my lack of knowledge of what generate does) it isn't apparent to me what the control flow looks like now. Does generate return a new function - it seems like it's a higher-order function because it returns a callable?
What if my subsequent chained call requires a different parameterization, or uses a different model? Could I chain a GPT-3.5 call with a GPT-4 call? Just thinking about use cases...

Every step returns a new lm object, so we could rewrite the program above without dot-chaining like this:
def program(lm, proverb, book, chapter, verse):
    lm = lm(f"""Tweak this proverb to apply to model instructions instead.

{proverb}
- {book} {chapter}:{verse}

UPDATED
Where there is no guidance""")
    lm = lm.generate('rewrite', stop="\\n-")
    lm = lm("""\n- GPT """)
    lm = lm.select('new_chapter', options=["9", "10", "11"])
    lm = lm(":")
    lm = lm.generate("new_verse")

    return lm

As for switching different LMs, it is important to keep in mind that guidance acceleration works by incrementally building up the state of an LM, so switching LMs would force you to rebuild all that state from scratch (you can't switch LMs in a guidance program right now, you need two programs). But in this syntax it would not be too hard to switch LMs, you just need to copy the state from one LMs to another and then continuing building from there:
lm = guidance.lms.OpenAI("text-davinci-003")
lm2 = guidance.lms.OpenAI("text-curie-001")

def program_2lms(lm, lm2, proverb, book, chapter, verse):
    lm = lm(f"""Tweak this proverb to apply to model instructions instead.

{proverb}
- {book} {chapter}:{verse}

UPDATED
Where there is no guidance""")
    lm = lm.generate('rewrite', stop="\\n-")
    lm = lm("""\n- GPT """)
    lm = lm.select('new_chapter', options=["9", "10", "11"])
    lm = lm(":")

    lm2 = lm2(lm)
    lm2 = lm2.generate("new_verse")

    return lm2

As for changing parameterizations those are all just arguments to the generate function right now (and the lm objects also have default I suppose we could allow to be updated)

This looks promising.
Maybe the object chained shouldn't be called an lm, but something like lm_state? It seems like every time a program starts, it initializes with an initial LM state, which is then "built" through several instructions.
Also, using calling lm("\n- GPT ") is a bit confusing. A named function like lm.append("\n- GPT ") would be clearer on what it does.

@calclavia everything is pure python in our experimental setup, so control flow statements are just python code.

the name lm is because you really can think of these objects as the underlying model. Every time we update the model we get a new model object in a new state. All the objects we get in a single pythonic guidance program can share a common backend session object for performance reasons, but logically we can think of them as independent LMs.
still playing with calling syntax, for now we have call and __add__. I think "calling" a language model with a prompt makes sense, but I might be odd there. (I don't want to use append since that implies inplace modification)
If it works it means a lot of changes so we are working hard to sort out if there are any show stoppers. So far everything is looking really good. For example block level elements are now with blocks:

We also have streaming and async support working with dot chains

thanks again for the continuing feedback :)

When you call a language model, my assumption is you're sending an API call to OpenAI. It seems like most other frameworks refer to calling a model as generating - might be confusing.
Whereas appending or adding to the current prompt buffer makes more sense?

It will be tricky to get the next token to fill the stop in gen though. How would the syntax to fill out the blanks in json look like?  Current approach with handlebars is awesome to read.

We have a new release that started with this thread, thank you :)
Hopefully f-strings are still readable enough even with json examples, and everything else is way better :)

authors: PiotrCzapla calclavia marcotcr slundberg

repo: microsoft/guidance


text:
bump to v0.4.12

This will be my (@ksaur) last release as maintainer for Hummingbird, as I am moving on to a different company and job role. It has been a fantastic 5 years as maintainer for Hummingbird! Thanks to @interesaaat and @mshr-h for all of the collaborations over the years!

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

Project coverage is 87.52%. Comparing base (c5186d8) to head (e73f4a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #799   +/-   ##
=======================================
  Coverage   87.52%   87.52%
=======================================
  Files          76       76
  Lines        4625     4625
  Branches      741      741
=======================================
  Hits         4048     4048
  Misses        375      375
  Partials      202      202

Flag
Coverage Δ

unittests
87.52% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

authors: codecov-commenter ksaur

repo: microsoft/hummingbird


text:
Question: Will WinUI Desktop fully support UWP's Badge Notifications API?

UWP has a nice Badge Notifications API which adds a badge to an app's tile in the Start Menu and to the app's taskbar button:

(Example UWP app showing taskbar app button badge.)
Using the same API in a MSIX packaged desktop app adds the badge to the app's tile in the Start Menu, but there is no additional badge in the app's taskbar button. Will WinUI Desktop apps using UWPs Badge API be able to show a badge in the taskbar just like UWP apps?

@marb2000 as FYI

Hey Felix, thanks for asking this. We're investigating and will get back to you!

Hey Felix,
For Win32 apps using MSIX, we disabled the UWP badges from appearing on taskbar, since Win32 apps can use ITaskbarList to create custom taskbar "badges".
I'm aware this is definitely confusing though, and might not be what you'd expect!
Have you tried the ITaskbarList API? Are you still interested in instead using the UWP badges? We appreciate your feedback and it helps us prioritize what to work on next!

Hi @andrewleader
thanks for getting back to me this quickly :)
Yes, I'm aware of ITaskbarList API and WPF also makes creating an own taskbar badge quite easy with the TaskbarItemInfo API. Two points why I would still welcome the team to add full UWP Badge support to non-UWP projects:

With UWP, I just have to call the API and it works. I don't have think about creating an own icon overlay (the badge), draw a number aligned with the overlay (the badge content) and then how to apply it to the base icon in the taskbar. In UWP, all I have to do is specify I want to draw a number and then pass the number to the API. The system will take care of the rest for me. (For Win32, instead of drawning a number onto my custom badge, I could alternatively provide a set of images and then specify which one to use as the overlay.)
Windows UI needs to be aligned as best as best as possible across the different native app frameworks. Adding UWP Badge support to Win32/WPF apps enables these apps to provide a native Windows 10 UI and goes one step further into unifying the app experience. We've seen work done for this in the Windows Shell by adding native Windows 10 toast notification support to Win32 apps. It would be great if this would be extended to the Badge API of the Shell as well!

WinUI Desktop is about enabling Win32 apps to ship with the modern Windows 10 UI/UX. Thus, Win32 apps should have full access to the new Windows 10 Shell elements introduced by UWP to help in unifiying the app experience across the different Windows App models (Win32 and UWP).
The icing on the cake would be if you guys would also enable current Desktop Bridge apps (MSIX packaged apps) to provide a native Windows 10 Shell experience to their users. I'd be fine with this support only arriving for WinUI Desktop apps though as I can imagine your team being quite busy with the upcoming launch of Windows 10X.
If enabled for current MSIX packaged desktop apps, developers should be able to either use the existing ITaskbarList API (or equivalent in WPF) to create custom badges if needed, or use the UWP Badge API to create a familiar Badge experience for Windows 10 users.

Thanks Felix, that's excellent feedback! Really well articulated. We'll let you know if/when we have any updates.

@andrewleader
I tested out an MSIX packaged desktop app on the new Windows 10X emulator to see how badge suport is currently looking like and I'm happy to report that badges show up in both the taskbar and and the new Start menu!

and a closer look:

(TestAppWpf.... is the name of my Win32 app packaged as an MSIX)
I will use full badge support in the 10X shell as another argument why it would be nice to have the same level of support for our MSIX desktop apps/WinUI Desktop apps on Windows 10 😁

@marb2000 @andrewleader This seems like a fitting issue for Project Reunion (extended to all Windows apps - UWP and Win32).

authors: Felix-Dev andrewleader ranjeshj

repo: microsoft/microsoft-ui-xaml


text:
Add Logical Network Support

Design Spec: Link
Sample Test Commands: Added to the spec

@mjethwa-msft could you rebase your PR?

@mjethwa-msft could you rebase your PR?

rebased.

repo: microsoft/moc


text:
this.model.onDidChangeRawContentFast is not a function

monaco-editor version: 0.16.0
Browser: Chrome
OS:
Steps or JS usage snippet reproducing the issue:
Using this on angular 7
import * as monaco from 'monaco-editor';

        this._editor = monaco.editor.create(this.editorContainer.nativeElement, {
            value: 'function hello() {\n\talert("Hello world!");\n}',
            language: 'javascript'
        });

When rendering it im getting the follow stack trace:
core.js:15714 ERROR Error: Uncaught (in promise): TypeError: this.model.onDidChangeRawContentFast is not a function
TypeError: this.model.onDidChangeRawContentFast is not a function
    at ViewModel.push../node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelImpl.js.ViewModel._registerModelEvents (viewModelImpl.js:141)
    at new ViewModel (viewModelImpl.js:68)
    at StandaloneEditor.push../node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js.CodeEditorWidget._attachModel (codeEditorWidget.js:939)
    at StandaloneEditor.push../node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.StandaloneEditor._attachModel (standaloneCodeEditor.js:198)
    at new StandaloneEditor (standaloneCodeEditor.js:180)
    at standaloneEditor.js:57
    at withAllStandaloneServices (standaloneEditor.js:44)
    at Object.create (standaloneEditor.js:56)
    at MonacoComponent.<anonymous> (main.js:257238)
    at step (tslib.es6.js:97)
    at resolvePromise (zone.js:831)
    at new ZoneAwarePromise (zone.js:913)
    at Module.__awaiter (tslib.es6.js:67)
    at MonacoComponent.push../Source/app/shared/components/monaco/monaco.component.ts.MonacoComponent._createEditor (main.js:257221)
    at MonacoComponent.push../Source/app/shared/components/monaco/monaco.component.ts.MonacoComponent.ngAfterViewInit (main.js:257168)
    at callProviderLifecycles (core.js:22406)
    at callElementProvidersLifecycles (core.js:22380)
    at callLifecycleHooksChildrenFirst (core.js:22370)
    at checkAndUpdateView (core.js:23306)
    at callViewAction (core.js:23538)

This can happen only if an editor is created with a model option which is not an instance of a TextModel (aka monaco.editor.createModel). It therefore would miss the event onDidChangeRawContentFast

i have encountered the same issues and i found that the issue only happened when i build my typescript files using webpack prod mode, but  disapper when i build bundle using webpack dev mode.
the webpack version i used is 4.12.1.
@alexandrudima what do you mean model option? can you give a example.

how to fix it? @alexandrudima

Angular appears to be doing some kind of treeshaking which does not go well with the monaco editor (which is already treeshaken).
See:

https://github.com/microsoft/monaco-editor/issues/1603#issuecomment-536780037
https://github.com/angular/angular-cli/issues/14033#issuecomment-507516164

Angular is currently outside the scope of this project.
I suggest to ask on Stackoverflow or the angular integration repository.

authors: alexandrudima alexdima gaoyangxiaozhu gdYu hediet leonliang33

repo: microsoft/monaco-editor


text:
Why does my application randomly take exactly 1 minute to execute a single SELECT statement?

PHP Driver version or file name - 5.6.1
SQL Server version - 2012
Client operating system - Ubuntu 18.04
PHP version - 7.3
Microsoft ODBC Driver version - 13
View schema
SELECT P.*
FROM dbo.tblProjects P WITH(NOLOCK)
LEFT OUTER JOIN view_PJ_Status S WITH (NOLOCK) ON P.Pj_Status=S.Pj_Status
LEFT OUTER JOIN dbo.view_Code_PjStage ST WITH(NOLOCK) ON P.Pj_Stage=St.Code_PjStage
LEFT OUTER JOIN dbo.W3viewPJActivationDate AD ON P.Pj_PK = AD.Pj_PK
LEFT OUTER JOIN dbo.tblCustomer C WITH (NOLOCK) ON P.Cust_PK = C.Cust_PK
LEFT OUTER JOIN dbo.tblTerms (NOLOCK) ON c.Term_PK = dbo.tblTerms.Term_PK
LEFT OUTER JOIN dbo.tblEmployee CS (NOLOCK) ON C.Cust_SalesPerson = CS.Employ_PK
LEFT OUTER JOIN dbo.tblContacts SP (NOLOCK) on P.Pj_DesignerNum =SP.Con_PK
LEFT OUTER JOIN tblContactsAddresses SPA WITH(NOLOCK) ON SP.con_pk = SPA.Con_PK AND TypeIndex='Bill To'
LEFT OUTER JOIN tblContacts BT WITH (NOLOCK) ON P.pj_attnCon_PK =BT.Con_PK
LEFT OUTER JOIN tblContacts BL WITH (NOLOCK) ON P.Pj_Building_Con_PK =BL.Con_PK
LEFT OUTER JOIN dbo.tblEmployee AS PM WITH (NOLOCK) ON P.Pj_AccountManager = PM.Employ_PK
LEFT OUTER JOIN dbo.tblEmployee AS EST WITH (NOLOCK) ON P.Pj_SalesPerson = EST.Employ_PK
LEFT OUTER JOIN dbo.tblEmployee AS CT WITH (NOLOCK) ON P.Pj_Contact = CT.Employ_PK
LEFT OUTER JOIN dbo.tblEmployee HWD WITH (NOLOCK) ON P.Pj_Coordinator = HWD.Employ_PK
LEFT OUTER JOIN dbo.tblEmployee HME WITH(NOLOCK) ON P.Pj_HMEngineer = HME.Employ_PK
LEFT OUTER JOIN dbo.tblEmployee FUA WITH(NOLOCK) ON P.Pj_FollowUpAdmin = FUA.Employ_PK
LEFT OUTER JOIN (SELECT PJ_PK, MIN(Con_PK) AS PjR_ConPK From tblProjectsResources WITH(NOLOCK) WHERE PjR_Role=120  GROUP BY  PJ_PK) PHS ON P.Pj_PK = PHS.Pj_PK
LEFT OUTER JOIN tblContacts PHSC WITH(NOLOCK) ON PHS.PjR_ConPK=PHSC.Con_PK
WHERE P.TenantPK=SYSTEM_USER AND Pj_PK = 12345
GO

Problem description
The view above is just an example. But it happens on the simplest of queries. I have a simple form on Symfony 4.3.6 which is using Doctrine on Ubuntu 18.04. I am just migrating everything from freeTDS to msphpsql since they are the official drivers for MSSQL. The problem is that randomly, when users try to open a form, it takes exactly 1 minute to execute a select query. This only happens once in maybe 30-40 select statements. But its annoying to the users. There is no pattern so far that I have been able to detect. Hence for the lack of words, I am going to say its random. I was expecting maybe that could have been because of the code
-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
**set transaction isolation level read committed**

The above piece of code is run by the Driver/Doctrine/Symfony
The code set transaction isolation level read committed might be the source of my problem(not sure). The problem is I don't know how to even change this setting. Any guidance will be much appreciated.
Expected behavior and actual behavior
Expected behavior
Query should take less than 1 second to execute.
Actual behavior
Query should take exactly 1 minute to execute.
Repro code or steps to reproduce
Run a select statement.

@dipens I would suggest running SQL Server Profiler to find out what might be taking so long on the server side. If you can't find anything with the profiler, it might be on the client side - try running a simple PHP script with multiple SELECTs and without Symfony or any other frameworks and see if the problem persists. If it does, try those queries using sqlcmd only.

I tried that.
Its the following query that's taking 1 minute.
-- network protocol: TCP/IP
set quoted_identifier on
set arithabort off
set numeric_roundabort off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set cursor_close_on_commit off
set implicit_transactions off
set language us_english
set dateformat mdy
set datefirst 7
set transaction isolation level read committed

Weird thing is, it takes exactly 1 minute.

This query shouldn't take more than a second but surprisingly it takes more than a minute. I have attached the log as well.

RowNumber
EventClass
TextData
ApplicationName
NTUserName
LoginName
CPU
Reads
Writes
Duration
ClientProcessID
SPID
StartTime
EndTime
BinaryData

687
14
-- network protocol: TCP/IP set quoted_identifier on set arithabort off set numeric_roundabort off set ansi_warnings on set ansi_padding on set ansi_nulls on set concat_null_yields_null on set cursor_close_on_commit off set implicit_transactions off set language us_english set dateformat mdy set datefirst 7 set transaction isolation level read committed
apache2
NULL
tgrp
NULL
NULL
NULL
NULL
4757
76
2019-11-07 15:40:48
NULL
NULL

962
15
NULL
apache2
NULL
tgrp
0
0
0
60196000
4757
76
2019-11-07 15:40:48
2019-11-07 15:41:48
NULL

As you can see, the duration for the query that started at 2019-11-07 15:40:48 ended at 2019-11-07 15:41:48 and it took exactly 1 minute to execute this. The duration is also listed.

I am not yet able to reproduce this. I notice that you are using ODBC driver 13 on Ubuntu 18.04, but ODBC driver 17 is required for Ubuntu 18.04 support. Can you try upgrading your ODBC driver, following the instructions here? If that is not possible, please tell us how you installed ODBC driver 13 so we can recreate your environment.

Sorry I must be going blind. The version is in fact 17.

The transaction isolation level is set in the DSN, not in the option array. Construct the DSN and connect like so:
$dsn = "sqlsrv:server=myserver;TransactionIsolation=".PDO::SQLSRV_TXN_READ_UNCOMMITTED.";";
$dbh = new PDO($dsn, $user, $password,array(PDO::ATTR_TIMEOUT => 3600));

Note that PDO::SQLSRV_TXN_READ_UNCOMMITTED is a PHP constant while $dsn is a string, so it's concatenated for inclusion. Also note that the keyword is TransactionIsolation, and PDO::SQLSRV_TXN_READ_UNCOMMITTED is one of its possible values.

Thank you. It seems at least I can connect with the options I need. But now I get

Login timeout expired

intermittently. I have checked #190 . I am using the IP address of the server to connect and not the named instance. I am also providing the port number, username and password accurately.
I don't know what I am doing wrong here.

How intermittently does it happen? There was an issue in ODBC driver 13 that caused intermittent timeouts, but it has been fixed. Do you by any chance have both version 13 and 17 of the ODBC driver on your system?

Couldn't find a pattern. Sometimes it did not happen at all. Once it happened at ~210 queries or 15 seconds. I did notice it happening when too many queries were run at the same time.
I think I only have 17 installed. Here is my config from /etc/odbcinst.ini.
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.4.so.2.1
UsageCount=1
[ServerName]
Driver = FreeTDS
Server = ServerName.DomainName.local
Port = 1433
TDS_Version = 7.2

Do you still have the original problem, that a particular SELECT query takes exactly one minute? Also, how many queries seem to be running when you get the Login timeout expired message?

Yes I still have the original problem. Its not an particular query. It happens on a lot of queries.
Sorry I really tried to calculate but I could not find a specific pattern. Sometimes it runs over 200 queries without any problems. Sometimes, I can't even get past more than 20.

These types of intermittent network issues are very difficult to track down, but there are a few things we can try.

Try running a bunch of SELECT queries with sqlcmd and see if the problem(s) continue
If possible, try a different SQL Server instance
If you have access to a Windows client, try these queries in Management Studio
Capture a network trace with Wireshark

Try running a bunch of SELECT queries with sqlcmd and see if the problem(s) continue

Does not happen. Queries execute without any delay.

If possible, try a different SQL Server instance

This possibly might be our answer. We tried it with a different instance and the problem did not happen. We tried it with the same old SQL server but a different database. It choked up the entire DB including the production DB. We are thinking there is some config we have done on our old SQL server that's causing this. Is there any chance you know what config options we are missing on our Server?

If you have access to a Windows client, try these queries in Management Studio

No delays.

Capture a network trace with Wireshark

Didn't try this option yet.

Is the different instance the same version of SQL Server as the problematic one?

Yes. They both have similar specs and version.

So it's likely some kind of configuration issue on that particular instance, but I'm not sure yet what it might be. Have you tried with both sqlsrv and pdo_sqlsrv?

Yes I tried it. I got the same results.

The best thing to do then is capture a network trace with Wireshark and attach it here. I wonder also if the server might simply be getting overloaded/running out of memory? Unlikely but possible.

capture-output.pcap.
Sorry I am not familiar with WireShark so I tried my best to analyze and go through the traffic. I did manage to capture the issue in a Wireshark trace file. Some info that you will probably need.

Client Machine IP address: 192.168.216.131
Ubuntu Server IP: 192.168.212.207
SQL Server IP: 192.168.212.50

Let me know if I can provide you with more info.
I tried running the query with no others users on the server and I still ran into it. The server is pretty new so I doubt its overloading or running out of memory. Let's see if this capture files helps you.

The capture is very useful to show what is happening, although specifying on which machine the capture was taken would've been even better. The query that appears to take 1 minute starts at frame 4876 and spans 4 packets. The sequence of events is
4876>seq 3471 ack 2988 len 4112 - 1st packet of query
4877>seq 7583 ack 2988 len 4112 - 2nd packet of query
4878<seq 2988 ack 7583 len 0 - server acks 1st packet
4879>seq 11695 ack 2988 len 5792 - 3rd packet of query
4880>seq 17487 ack 2988 len 2017 - 4th and final packet of query
4881<seq 2988 ack 10479 len 0 - server acknowledges most of 2nd packet
4882<seq 2988 ack 11695 len 0 - server acknowledges rest of 2nd packet
4883<seq 2988 ack 11695 len 16 - MARS packet (not important for now, but appears to be lost)
4884>seq 19504 ack 2988 len 0 - client does not acknowledge packet above
4885<seq 3004 ack 11695 len 0 - server acks 11695 again, appears to have not received 4879 yet
4886>seq 19504 ack 2988 len 0 - client still does not see 4883
4887<seq 3004 ack 11695 len 0 - server asks for packet 4879 again...
4888<seq 3004 ack 11695 len 0 - ...and again...
4889<seq 3004 ack 11695 len 0 - ...and again...
4890<seq 3004 ack 13143 len 0 - server finally saw first part of 3rd packet...
4891<seq 3004 ack 19504 len 0 - ...and then the rest of it and the 4th packet
[server has received whole query and starts processing it]
4892<(window update, not important for now)
4893<seq 3004 ack 19504 len 16 - MARS packet (not important for now)
4894>seq 19504 ack 2988 len 0 - client still has not received 4883
4895<seq 3020 ack 19504 len 1448 - server starts sending result of query...
4896>seq 19504 ack 2988 len 0 - ...while client continues asking for 4883
4897<seq 4468 ack 19504 len 1448 - server continues sending result of query
4898>seq 19504 ack 2988 len 0 - client asks again for 4883
4899<seq 5916 ack 19504 len 1216 - server continues sending result of query
4900>seq 19504 ack 2988 len 0 - client asks again for 4883
4901<seq 7132 ack 19504 len 1448 - server continues sending result of query
4902>seq 19504 ack 2988 len 0 - client still hasn't received 4883 yet
4903<seq 8580 ack 19504 len 1448 - server continues sending result of query
4904>seq 19504 ack 2988 len 0 - client still hasn't received 4883 yet
4905<seq 10028 ack 19504 len 1216 - server continues sending result of query
4906>seq 19504 ack 2988 len 0 - client still hasn't received 4883 yet
4907<seq *2988* ack 19504 len 16 - server finally retransmits 4883...
4908>seq 19504 ack 2988 len 0 - ...but client has not seen it yet
4909<seq 11244 ack 19504 len 1448 - server continues with query
4910>seq 19504 ack 2988 len 0 - client still hasn't received 4883 yet
4911<seq 12692 ack 19504 len 880 - server sends final packet of results...
4912>seq 19504 ack 2988 len 0 - ...but client is still waiting for 4883
4936>seq *11695* ack 2988 len 1448 - client finally received 4885 ?
4937<seq 13572 ack 19504 len 0 - server tells client it already received up to 19504
[30 seconds elapse...]
5218>seq *19503* ack 2988 len 0 - client sends keep-alive
5219<seq 13572 ack 19504 len 0 - server's response to keep-alive
[30 seconds elapse...]
5431<seq *2988* ack 19504 len 16 - server retransmits 4883 again
5432<seq *3004* ack 19504 len 1432 - server retransmits 4893 and beginning of query results
5433>seq 19504 ack 4436 len 0 - client finally acknowledges their reception
5434<seq 4436 ack 19504 len 1448 - server continues retransmission
5435<seq 5884 ack 19504 len 1448 - ...and continues...
5436>seq 19504 ack 7332 len 0 - client continues acknowledgements
5437<seq 7332 ack 19504 len 1448
5438<seq 8780 ack 19504 len 1448
5439>seq 19504 ack 10228 len 0
5440<seq 10228 ack 19504 len 1448
5441<seq 11676 ack 19504 len 1448
5442>seq 19504 ack 13124 len 0
5443>seq 19504 ack 13124 len 16
5444<seq 13124 ack 19520 len 0
5445<seq 13124 ack 19520 len 448 - server finishes retransmission of query results
5446>seq 19520 ack 13572 len 61 - client sends sp_unprepare call

In other words, it appears you have a networking issue. Packets are getting lost/delayed and this causes TCP retransmissions, which happen after a certain timeout. I notice that the frame size from the client has some large ones (>1448, the standard Ethernet size) and that the client  appears to be a VMware VM; this thread may have more information on working around packet loss:
https://communities.vmware.com/thread/529014
You can also try to disable "jumbo frames" functionality in the client OS, because I suspect those excessively large packets may be contributing to the packet loss.

Ok so this was happening on this particular instance of SQL Server 2012. We did the following to fix it.
The old SQL Server 2012 was installed on Windows Server 2008. We reinstalled the SQL Server on Windows Server 2012 and this seemed to fix this issue. Still no idea as to what actually was the issue. But reinstalling seems to have fixed it.

authors: david-puglielli dipens v-chojas

repo: microsoft/msphpsql


text:
src/tabs/workspace/components/TimePicker.tsx:164:33

ERROR in src/tabs/workspace/components/TimePicker.tsx:164:33
TS2554: Expected 2 arguments, but got 4.
162 |     ): void => {
163 |       if (onChange) {

164 |         onChange(event, option, index, inputValue);
|                                 ^^^^^^^^^^^^^^^^^
165 |       }
166 |     },
167 |     [

ERROR in src/tabs/workspace/components/TimePicker.tsx:126:7
TS2345: Argument of type 'Date | undefined' is not assignable to parameter of type 'string | string[] | undefined'.
Type 'Date' is not assignable to type 'string | string[] | undefined'.
Type 'Date' is missing the following properties from type 'string[]': length, pop, push, concat, and 28 more.
124 |       timeRange,
125 |       noRoundTimeRange,

126 |       defaultValue,
|       ^^^^^^^^^^^^
127 |       value,
128 |     );
129 |

repo: microsoft/mwcci-converge


text:
[New-BCContainer] LicenseFile parameter value always shown in output

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!
Describe the issue
Hi,
I have a Pipeline running in Azure DevOps that uses the New-BCContainer command.
The pipeline uses a Library containing a licenseFile secret variable like this:

I store in this variable the blob url to an azure container containing my license file.
The problem is that the license url value is shown in the output of my pipeline when New-BCContainer is executed

I've tried to convert it to a securestring before passing it to the licenseFile parameter but I have an error saying:
cannot find path 'c:\agent(...).System.security.SecureString'
And if I "unsecure" my licenseFile url before using:
$unsecureLicenseFile = ([System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureLicenseFile)))
The result is the same: the ouput will show my blob url.
Before NEw-BCContainer executes, if I Write-Host my $licenseFile variable, the output shows me ***: this is what I expect to see when New-BCContainer Writes "using license (...) " to the host:

How can I set the -licenseFile parameter and not showing its value in the pipeline output ?
Thanks for your help.
Scripts used to create container and cause the issue
New-BCContainer -artifactUrl $artifactUrl     -doNotCheckHealth
-updateHosts     -licenseFile $licenseFile
-containerName $containerName     -alwaysPull
-auth "UserPassword"     -Credential $credential
Full output of scripts
licenseFile = ***
BcContainerHelper version 1.0.18
using artifact url https://bcartifacts.azureedge.net/sandbox/17.5.22499.22982/base
User 'admin' will be created with 'admin' as *** for this container
BUILD ENV = AzureDevOps
BcContainerHelper is version 1.0.18
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2019 Datacenter - ltsc2019
Docker Client Version is 19.03.5
Docker Server Version is 19.03.5
Removing container build
Removing build from host hosts file
Removing build-* from host hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\build
Fetching all docker images
Pulling image mcr.microsoft.com/businesscentral:10.0.17763.1757
10.0.17763.1757: Pulling from businesscentral
Using image mcr.microsoft.com/businesscentral:10.0.17763.1757
Disabling Health Check (always report healthy)
Creating Container build
Version: 17.5.22499.22982-W1
Style: sandbox
Multitenant: Yes
Platform: 17.0.22463.22964
Generic Tag: 1.0.1.4
Container OS Version: 10.0.17763.1757 (ltsc2019)
Host OS Version: 10.0.17763.1757 (ltsc2019)
Using hyperV isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file https://blablabla.flf
Downloading C:\ProgramData\BcContainerHelper\Extensions\build\my\license.flf
Additional Parameters:
--volume "C:\Agent:C:\Agent"
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\17.5.22499.22982\base\Demo Database NAV (17-0).bak
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
...

Screenshots
If applicable, add screenshots to help explain your problem.
Additional context

does it happen all the time?
did it use to work?

You license file should never be a public URL - you should use a secure URL (like a SAS token).
New-BcContainer will strip all parameters ?accesstoken=hkjadhakjshdjkahd off the URL and only show the public part.
In general this happens with all URLs (also URLs to apps being installed etc.)

My bad, I was using anonymous read access as access level instead of private ... So even if the url was correctly truncated as you mentionned, I was still able to download it.
So yes, no matter if the first part of the url is shown in the output if we can't use it..!
Thanks for your help!

authors: JulienDecottignies freddydk

repo: microsoft/navcontainerhelper


text:
Another PS7 Error? Could not load type 'System.Management.Automation.PSSnapIn' from assembly

Here we go again.
With reference to issue https://github.com/microsoft/navcontainerhelper/issues/3527, the same script is now failing when using BC v24.1 and BCCH 6.0.18. Building the container works fine, it fails when I'm using Invoce-ScriptInBcContainer, where I'm trying to Import-Module SQLPS.
Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=7.4.2.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Same scripts works fine for v23 and earlier.  I can also see the same error reported in issue https://github.com/microsoft/navcontainerhelper/issues/3541.
Based on the version (7.4.2.500) I assume it has something to do with the PowerShell version?
So, let me start by asking once again. When should we be using PowerShell 5 vs 7?
When should we be specifying PWSH when invoking scripts in the container, and when not?

Let me start by answering once again then:-)
BC24 and above runs PS7 inside the container by default. All versions before BC24 runs PS5.1.
As you probably know by now, all cmdlets in BC24 and above are PS7 with a bridge between PS5.1 and PS7.
Yes - you can run everything in PS5.1 inside the container (still), but performance will be much slower than running PS7.
Therefore, I have changed most scripts in BcContainerHelper to be able to run in PS7 - for the places, where the script was unable to run PS7 - I have used -usePsSession:$false -usePwsh:$false when invoking the script.
If you have your own scripts, you will need to do the same (or run PS5.1 always by setting $bcContainerHelperConfig.usePwshForBc24 = $false) - this will make everything run PS5.1 and you can continue as before with degraded performance however.
I cannot do magic - SQLPS doesn't exist in PS7 - only the SqlServer module, and that isn't compatible. I have installed the SqlServer module in PS7 by default and added some aliases to get some common scripts to run.
So,... - you are on your own here - if you run PS5.1 - your scripts probably works. If you want to run PS7 for performance - you need to modify your scripts to make them run.
Sorry - but this is the best I can do.

I am always open for good ideas, which can make life easier for everybody - feel free to suggest stuff - but not to make me load SQLPS on PS7 - that cannot be done.

I am always open for good ideas, which can make life easier for everybody - feel free to suggest stuff - but not to make me load SQLPS on PS7 - that cannot be done.

It can be done. But you must use PowerShell remoting to accomplish that (Import-Module -UseWindowsPowerShell):
This is bad:
PS C:\Users\ernjus> Invoke-ScriptInBcContainer -containerName $ContainerName -scriptblock { Import-Module -Name SQLPS; Invoke-Sqlcmd -ServerInstance 'docker.softera.lt' -Query 'SELECT 1' -Username 'containeruser' -Password 'Password1.' }
Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=7.4.2.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Container Free Physical Memory: 13.3Gb
Disk C: Free 124Gb from 127Gb

Services in container bc123:
Exception: C:\Users\ernjus\OneDrive - Softera Baltic UAB\Documents\PowerShell\Modules\BcContainerHelper\6.0.18\ContainerHandling\Invoke-ScriptInNavContainer.ps1:301
Line |
 301 |                          throw $errorMessage
     |                          ~~~~~~~~~~~~~~~~~~~
     | Could not load type 'System.Management.Automation.PSSnapIn' from assembly 'System.Management.Automation, Version=7.4.2.500, Culture=neutral,
     | PublicKeyToken=31bf3856ad364e35'.

This is ok:
PS C:\Users\ernjus> Invoke-ScriptInBcContainer -containerName $ContainerName -scriptblock { Import-Module -Name SQLPS -UseWindowsPowerShell; Invoke-Sqlcmd -
ServerInstance 'docker.softera.lt' -Query 'SELECT 1' -Username 'containeruser' -Password 'Password1.' }

RunspaceId                           Column1
----------                           -------
0b40cdc5-eb64-474c-b386-a40b131e43f6       1

The main downside is performance hit because then PowerShell needs a few seconds to create PowerShell 5 session and load the module there.

There is nothing forcing you to use Invoke-ScriptInBcContainer.
The benefit of that is that it works using docker exec or sessions and auto-loads modules.
If you know what you are doing - create a PSSession and use Invoke-Command instead.
I decided against the -useWindowsPowershell mostly because it sounds like a giant hack - but maybe it isn't.
Kind of like the bridge - any swapping back and forth between PS5 and PS7 must be slow - so I decided to face the issues - enable PS7 for BC24 and fix everything I encountered.
Problem for me was that it took most of 4-6 weeks.

authors: epernst ernestasjuska freddydk


text:
BlockFusion correctness check

implement BlockFusion correctness check with profiler #110
-fblockfusion_check_correctness=true can enable this check and blockfusion will fallback to original execution when failure detected
this check may cost much time, so it is disabled by default

/azp run

repo: microsoft/nnfusion


text:
when searchspace type set loguniform, could the _value min not set too small?

Describe the issue:
I have an expriment run some time,expriment could  stop
I find that when the expriment stops, after ps -aux , COMMAND col  appear some "[bash] < defunct >",Parent process don't deal with this Zombie process?
or
search space i use {"_type":"loguniform","_value":[0.000001,0.001]}
Is it that  _value min value too small when numerical calculation log,  log go wrong ?(i guss too small _value will regard as 0?)
when I set _type to uniform; expriment run normally.
Environment:

NNI version: 2.0
Training service (local|remote|pai|aml|etc):
Client OS:
Server OS (for remote mode only):
Python version: 3.6
PyTorch/TensorFlow version: PyTorch1.2
Is conda/virtualenv/ venv used?:
Is running in Docker?: Yes

How to reproduce it?:

I found this maybe because I run this expriment on dorcker. I later run it well on a real machine .

Would you like to share us the version of docker image? I will try it in docker ASAP.

Would you like to share us the version of docker image? I will try it in docker ASAP.

docker will not be shared because it is not pulled  common docker hub.
but i can provide the linux version and kernel version , other key  lib info:
Linux version 4.9.99 (gcc version 6.3.0 (GCC) ) #1 SMP Mon Oct 21 14:47:51 CST 2019
Ubuntu 18.04.3 LTS
other key libs:
torch 1.2  (cuda 10.0)
torchvision 0.4.0
tensorboard 1.14.0
nni 2.0 and 2.4 i tried
scipy 1.2.1

Thank you. And I wonder if you run the experiment with a config file like '*.yaml'? If you do, please share me a copy with that : )

Thank you. And I wonder if you run the experiment with a config file like '*.yaml'? If you do, please share me a copy with that : )
config.yml , as below:

experimentName: xxxx
trialConcurrency: 2
maxExecDuration: 1d
maxTrialDuration: 1h    ## nni=2.4
maxTrialNum: 1000
#choice: local, remote, pai, kubeflow
trainingServicePlatform: local
searchSpacePath: search_space.json
# logDir: xxxxx/temp/nni-experiments/
#choice: true, false
useAnnotation: false
tuner:
  #choice: TPE, Random, Anneal, Evolution
  builtinTunerName: TPE
  classArgs:
    #choice: maximize, minimize
    optimize_mode: minimize
assessor:
  builtinAssessorName: Medianstop
  classArgs:
    optimize_mode: minimize
trial:
  command: python train.py
  codeDir: .
  gpuNum: 1
localConfig:
  gpuIndices: "0"
  maxTrialNumPerGpu: 2
  useActiveGpu: true

I ran the experiment in docker with almost the same environment(GCC 8.4.0 && some latest dependencies), because some previous versions were hard to found. And it worked normally. So I would like to suggest you turning to the log at ./nni-experiments/*/log/dispatcher.log and see what happened. Anyway, I would report this to my team in case of any potential scheduling issues : )

I ran the experiment in docker with almost the same environment(GCC 8.4.0 && some latest dependencies), because some previous versions were hard to found. And it worked normally. So I would like to suggest you turning to the log at ./nni-experiments/*/log/dispatcher.log and see what happened. Anyway, I would report this to my team in case of any potential scheduling issues : )

thank you very much,  I will check the log as you say. if I find some reason, I will exchange the message with u.

I ran the experiment in docker with almost the same environment(GCC 8.4.0 && some latest dependencies), because some previous versions were hard to found. And it worked normally. So I would like to suggest you turning to the log at ./nni-experiments/*/log/dispatcher.log and see what happened. Anyway, I would report this to my team in case of any potential scheduling issues : )

I check the log as you say, log record a INFO message:
INFO (hyperopt.utils/MainThread) Failed to load dill, try installing dill via "pip install dill" for enhanced pickling support
INFO (hyperopt.fmin/MainThread) Failed to load dill, try installing dill via "pip install dill" for enhanced pickling support

I pip install dill then run "nnictl xxx",it is okay likely..
Is it  the reason ?
if  Yes ,dill could be added to requirements.txt

I ran the experiment in docker with almost the same environment(GCC 8.4.0 && some latest dependencies), because some previous versions were hard to found. And it worked normally. So I would like to suggest you turning to the log at ./nni-experiments/*/log/dispatcher.log and see what happened. Anyway, I would report this to my team in case of any potential scheduling issues : )

I think about a way of trying to cheat that crontab a task "ps -aux|grep -v grep|grep defunct |awk '{print $2}'|xargs -n1 -I {} kill -s 9 {}". when this zombie pid appear,kill it because I think these zombie pid appear so that nni regard as this zombie task run continue.
But when I try to kill the zombie pid,it failed because  it's the subprocess from present process of "nni_node".

Did you notice the time stamp between dispatcher.log and nnimanager.log? And a normal exit should come up with the words like "terminated" and "task stopped"

d a normal exit should come up with the word

in dispatcher.log and nnimanager.log，I didn't find the words "terminated" and "task stopped". my nni version is 2.4 .
But,
in nnimanager.log ,I found "INFO (NNIManager) Trial job OJlVS status changed from WAITING to RUNNING" but did not find "Trial job OJlVS status changed from RUNNING to EARLY_STOPPED" or "Trial job OJlVS status changed from RUNNING to SUCCEEDED" that will be in log if the task run well.

It may crush while processing. A possible solution is to use ps -a and find PID with python then kill it.
Could you show the full contents of these two logs? Because I couldn't reproduce your issue, I'd like to try to find some reasons.

[2021-09-26 21:46:43] INFO (NNIManager) NNIManager received command from dispatcher: KI, "LTg1n"
[2021-09-26 21:46:43] INFO (NNIManager) cancelTrialJob: "LTg1n"
[2021-09-26 21:46:46] INFO (NNIManager) Trial job LTg1n status changed from RUNNING to EARLY_STOPPED

In order to save on computing resources, NNI supports an early stopping policy and has an interface called **Assessor** to do this job.

Assessor receives the intermediate result from a trial and decides whether the trial should be killed using a specific algorithm. Once the trial experiment meets the early stopping conditions (which means Assessor is pessimistic about the final results), the assessor will kill the trial and the status of the trial will be `EARLY_STOPPED`.

The sentences are from docs/en_US/builtin_assessor.rst.
All above, there may be something unexpected with your docker, like versions or configs, etc. Maybe a latest environment will help : )

[2021-09-26 21:46:43] INFO (NNIManager) NNIManager received command from dispatcher: KI, "LTg1n"
[2021-09-26 21:46:43] INFO (NNIManager) cancelTrialJob: "LTg1n"
[2021-09-26 21:46:46] INFO (NNIManager) Trial job LTg1n status changed from RUNNING to EARLY_STOPPED

In order to save on computing resources, NNI supports an early stopping policy and has an interface called **Assessor** to do this job.

Assessor receives the intermediate result from a trial and decides whether the trial should be killed using a specific algorithm. Once the trial experiment meets the early stopping conditions (which means Assessor is pessimistic about the final results), the assessor will kill the trial and the status of the trial will be `EARLY_STOPPED`.

The sentences are from docs/en_US/builtin_assessor.rst.
All above, there may be something unexpected with your docker, like versions or configs, etc. Maybe a latest environment will help : )

I understand the early_stopped policy.my meaning of before description "INFO (NNIManager) Trial job OJlVS status changed from WAITING to RUNNING" is that the task of OJlVS log in nnimanager.log only show state is RUNING ,not SUCCEED or EARLY_STOPPED if run right.
"INFO (NNIManager) Trial job OJlVS status changed from WAITING to RUNNING" is the end line of nnimanager.log

authors: DavideHe Fiascolsy

repo: microsoft/nni


text:
How to inject fault simulation in NAS flow

I'm trying use Pytorch FI in my search flow to get a tolerance network.
But I have no ideas how to inject faults in NNI NAS flow.
I can't find a way that I could get every trial architecture and inject some bit-flip faults in model before training.
Thanks!

I read the document here: https://www.pytorchfi.dev , but unfortunately I didn't really understand what they are trying to do.
Could you explain a little more about what you want here, to some guy with almost zero background about PyTorch FI.

In real hardware, the network will have a wrong detection output when having IC defect or adversarial attacks.
So for the analysis of models robust, training resilient models, we can use the Pytorch FI.
Pytorch FI can let us set some wrong computation in the layers.( ex. We can chose batch, layers, channels, height, width to set wrong value )
Then we can use Pytorch FI to do fault-injection to simulate the condition that having IC defect or adversarial attacks.
refrence: https://github.com/pytorchfi/pytorchfi

So are you trying to analyze the robustness of a searched model, or are you trying to search for a robust model?

I am trying to search for a robust model, so I need inject faults in NNI NAS flow.
I need find a way that I could get every single trial architecture and inject some bit-flip faults in model before training.
It will be like,
generate architecture in search space -> inject faults in this architecture -> train -> model accuracy estimation -> next trial new generate architecture in search space -> ...

I think you can inject faults in the evaluator by customizing evaluator.
Your performance evaluation of an architecture becomes: what's the model test accuracy when faults are injected into the architecture.


text:
How to export preprocessing as its own model?

Hi, I have the following preprocessing code that I would like to add to my model. However I would like to first run an image through it and inspect the final output
inputs = [create_named_value("input", onnx.TensorProto.UINT8, ["h", "w", 3])]
onnx_opset = 17
pipeline = PrePostProcessor(inputs, onnx_opset)
pipeline.add_pre_processing(
    [
        ChannelsLastToChannelsFirst(name="RGBImageCHW"),  # HWC to CHW
        Resize(1280, layout="CHW", name='resize', policy='not_smaller'),  # Uses BILINEAR currently
        LetterBox(target_shape=(1280, 1280), fill_value=114, name='pad', layout='CHW'),
        ImageBytesToFloat(name='uint8_to_01'),  # Convert to float in range 0..1 by dividing uint8 values by 255
        Normalize([(123.675, 58.395), (116.28, 57.12), (103.53, 57.375)], name='normalize', layout="CHW"),  # (mean, stddev) for each channel
        Unsqueeze([0], name='unsqueeze'),  # add batch, CHW --> 1CHW
    ]
)

How can I export this pipeline as an onnx model? Or just simply run a out = preproc(image) through this pipeline?

Adding Debug() in between helped me to check the outputs.
pipeline.add_pre_processing(
    [
        Debug(),
        Resize((1280,1280), layout="HWC", name='resize', policy='not_larger'),  # Uses BILINEAR currently
        Debug(),
        LetterBox(target_shape=(1280, 1280), fill_value=114, name='pad', layout='HWC'),
        Debug(),
        Normalize([(123.675, 58.395), (116.28, 57.12), (103.53, 57.375)], name='normalize', layout="HWC"),  # (mean, stddev) for each channel
        Debug(),
        ChannelsLastToChannelsFirst(name="RGBImageCHW"),  # HWC to CHW
        Debug(),
        Unsqueeze([0], name='unsqueeze'),  # add batch, CHW --> 1CHW
        Debug(),
    ]
)

I can then check the outputs with:
ort_inputs = {ort_session.get_inputs()[0].name: image}
out = ort_session.run(None, ort_inputs)
dets, labels, input_debug, resized_d, pad_d, norm_d, transposed_d, expand_d = out

where dets, labels are my original outputs.

repo: microsoft/onnxruntime-extensions

license: mit

license_source: bigquery


text:
[torchlib] Fix implementation for clamp_max / clamp_min

Update clamp_max and clamp_min. Remove support for size-0 inputs to simplify the implementations. Fixed registration to make the operators discoverable.

Do we not need to support size 0 input? I feel like it's in the test for a reason?

There are tests because the pytorch operator supports that, but in practice I don't see that being meaningful because it's just doing an expand. We can come back to it when it becomes an issue.

repo: microsoft/onnxscript


text:
[CI]: Update container images

moved pctasks-frontend to an aux server
shrink container images a bit

Trying to fix the CI failures at https://github.com/microsoft/planetary-computer-tasks/actions/runs/5579847626/jobs/10195946932#step:11:419, where we seem to be running out of disk space.
--- ErrImagePull: rpc error: code = Unknown desc = failed to pull and unpack image "localhost:5001/pctasks-ingest:latest": failed to extract layer sha256:d32bc1b36f4802dd6c638c4501c6eb836f140b71383c0d5e87db50115060811a: write /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/285/fs/opt/az/lib/python3.10/site-packages/azure/synapse/artifacts/models/__pycache__/_models_py3.cpython-310.pyc: no space left on device: unknown

[419](https://github.com/microsoft/planetary-computer-tasks/actions/runs/5579847626/jobs/10195946932#step:11:420)

https://github.com/microsoft/planetary-computer-tasks/pull/238/commits/3403573cf46b5f5a11d5b205da53d92baf80de4e fixes an issue where local dev files like .mypy_cache might have been copied in to the container image. I don't know if this affected the images on CI (probably not) but it made my local image ~200 MB smaller)
https://github.com/microsoft/planetary-computer-tasks/pull/238/commits/e9ef5f81e890afc0651112f743ce39209dee1411 disables the pip cache, which saves ~20MB.

The next big target is the task-* images. Currently, pctasks-task-base is >2.5GB.
See the diff below for a way to get it down to ~370MB.

diff --git a/Dockerfile.task_base b/Dockerfile.task_base
index c60bbeb..2cffc3b 100644
--- a/Dockerfile.task_base
+++ b/Dockerfile.task_base
@@ -1,4 +1,4 @@
-FROM ubuntu:20.04
+FROM python:3.9-slim

 # Setup timezone info
 ENV TZ=UTC
@@ -9,31 +9,6 @@ ENV PIP_NO_CACHE_DIR=1

 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

-RUN apt-get update && apt-get install -y software-properties-common
-
-RUN add-apt-repository ppa:ubuntugis/ppa && \
-     apt-get update && \
-     apt-get install -y build-essential python3-dev python3-pip \
-     jq unzip ca-certificates wget curl git && \
-     apt-get autoremove && apt-get autoclean && apt-get clean
-
-RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10
-
-# See https://github.com/mapbox/rasterio/issues/1289
-ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
-
-# Install Python 3.8
-RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" \
-   && bash "Mambaforge-$(uname)-$(uname -m).sh" -b -p /opt/conda \
-   && rm -rf "Mambaforge-$(uname)-$(uname -m).sh"
-
-ENV PATH /opt/conda/bin:$PATH
-ENV LD_LIBRARY_PATH /opt/conda/lib/:$LD_LIBRARY_PATH
-
-RUN mamba install -y -c conda-forge python=3.8 gdal pip setuptools cython numpy
-
-RUN python -m pip install --upgrade pip
-
 # Install common packages
 COPY requirements-task-base.txt /tmp/requirements.txt
 RUN python -m pip install --no-build-isolation -r /tmp/requirements.txt
diff --git a/requirements-task-base.txt b/requirements-task-base.txt
index 3de345b..39fe26a 100644
--- a/requirements-task-base.txt
+++ b/requirements-task-base.txt
@@ -1,2 +1,2 @@
 pystac[validation]==1.*
-rasterio==1.3.0 --no-binary=rasterio
\ No newline at end of file
+rasterio==1.3.0
\ No newline at end of file

This removes a bunch of "cruft" from the task-base Dockerfile. But we need to confirm whether any of that cruft is actually load bearing.

Which base image do we need? Do we need ubuntu or can we use some other image?
Do we need conda / mamba?
Do we need to build rasterio from source?

CI passed, so I'll punt on the questions from the previous comment.

repo: microsoft/planetary-computer-tasks


text:
chore: update nugets in .Tests and .TestingHarnessTest

Chore, update nugets in Tests and TestHarness.
Should have no impact on main dependencies of generated nugets.
Added necessary changes after nuget update
Fixes https://github.com/microsoft/playwright-dotnet/issues/2557

Depends on:
https://github.com/microsoft/playwright-dotnet/pull/2593
https://github.com/microsoft/playwright-dotnet/pull/2591

Closing for now since its stale.

repo: microsoft/playwright-dotnet


text:
[BUG]: "Admin | Sync Flow Issues

Describe the bug
Since installing the CoE kit, I get daily E-mails titled, "Admin | Sync Flow Errors".
Body:  Some of the Sync Flows in the CoE Starter Kit have failed. See below and navigate to the Flow Instance URL to find out more details:
FLOW:  Admin | Sync Template v2 (Flows)
FLOW:  Admin | Sync Template v2 (Apps)
Environment (both Flows) Wilbur-Ellis Company (default) (Upgrade)
URL:
PowerApps-CoE North Americaeae39ec0-484e-412d-98de-f79c02a7ce77/flows/27068e3c-6c42-15f7-c068-d5bed4007dc2/runs/08585873935108147158179802583CU53
URL:
PowerApps-CoE North Americaeae39ec0-484e-412d-98de-f79c02a7ce77/flows/269dd05e-c86b-dad9-3c01-384e41235ea0/runs/08585873935104954239986203574CU18
Component (please tell us which flow or app you are experiencing issues with):

Solution [e.g. Core, Nurture]
Version [e.g. 1.29]
App or Flow [e.g. Sync Template (v2)]

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

closing out issues without action items on us

authors: JeneferM-MSFT NickPettijohn

repo: microsoft/powerapps-tools


text:
Error using in codespace or wsl

I use the pac command in VS Code(with extension installed) in a CodeSpace, the command failed.

Use on the url,  failed with below
Error: Unable to open a web page using xdg-open, gnome-open, or kfmclient tools. See inner exception for details. Possible causes for this error are: tools are not installed or they cannot open a URL. Make sure you can open a web page by invoking from a terminal: xdg-open https://www.bing.com
Failed to locate a utility to launch the default web browser.

Use url + correct username/password, always got auth failed, do we need to install additional package on linux?
Error: AADSTS50126: Error validating credentials due to invalid username or password.
Trace ID: f927415e-9ca9-4d21-8cb8-835ed52bda00
Correlation ID: 0a88d6ef-34bc-415b-a7d0-b46258423b0c
Timestamp: 2021-11-02 09:58:35Z

WSL:
By default, most Linux distro images used in WSL do not have any GUI tools installed, including the ability to launch web browsers for the interactive Auth flows.  It looks like we haven't yet documented that anywhere, but the Error: Unable to open a web page using xdg-open, gnome-open, or kfmclient tools message indicates the missing prereq for those flows.  For the default Ubuntu image used by WSL, this can be handled by running sudo apt install xdg-utils, which then handles the request to open the web browser for the auth flow.
CodeSpaces, SSH, and other non-WSL Remoting:
Currently, the VS Code extension and the underlying PAC process cannot handle the interactive auth flow, even if that system has the bits to handle launching the browser window for authentication.  The underlying MSAL auth library launches the browser and runs a small web server on localhost:[RandomPort] for the AAD login flow to redirect to after successful authentication.  Unfortunately, the localhost running the VS Code Extension and PAC is the remote machine, not your local machine hosting the web browser, so the redirect will not hit correct machine, preventing the completion of the Auth flow.
We're looking into solutions for those remote scenarios, but do not have anything concrete yet.

Thanks, yes, using the WSL locally will work. So even if we are specifying the username/password in the pac command, it will still using the this Auth flow which will not work on remote scenario right, such as Codespace.
pac auth create [--name] [--kind] [--url] [--username] [--password] [--applicationId] [--clientSecret] [--tenant] [--cloud]

Thanks, yes, using the WSL locally will work. So even if we are specifying the username/password in the pac command, it will still using the this Auth flow which will not work on remote scenario right, such as Codespace.
pac auth create [--name] [--kind] [--url] [--username] [--password] [--applicationId] [--clientSecret] [--tenant] [--cloud]

@feng-huang correct, when running pac CLI on GH CodeSpaces, it is running remotely, which makes the interactive authN form impossible.
The only way to authenticate is via the explicit username/password parameters. But if your PowerPlatform credentials required ConditionalAccess verification like 2FA/MFA etc., that will still not succeed, since AAD will (correctly) insist you to verify the additional MFA.
Then your option is to use the SPN/appID approach, similar to other headless/non-interactive environments as on Github Actions workflow runners and Azure DevOps build agents.
Yes, this is indeed cumbersome, but the lack of interactive login flows is a current limitation of the remote execution model that GH Codespaces has.
https://docs.microsoft.com/en-us/power-platform/alm/devops-build-tools#configure-service-connections-using-a-service-principal

With the release of PAC v1.12.2 and the VS Code Extension v0.2.35, PAC now supports Device Code login.
This supports interactive login for MFA or ADFS Federated tenants on remote installations of PAC such as GH CodeSpaces.
To use, just call pac auth create with the --deviceCode switch, without a username + password or applicationId parameters, and you will be given a Device Code and login URL to pull up in a browser such as:

Complete the auth flow in the browser, and the PAC CLI will create the auth profile.

authors: davidjenni feng-huang tehcrashxor

repo: microsoft/powerplatform-vscode


text:
Changes to Anonymizer packages/imports + added repr to classes.

Change Description

Refactored the Presidio Anonymizer package structure for simpler use. For example, instead of
from presidio_anonymizer.entities.engine.operator_config import OperatorConfig
use
from presidio_anonymizer.entities import OperatorConfig among others.

Updated the anonymizer documentation

Black code formatting

Added __repr__ to classes for better developer experience in interactive settings.

Note: this PR turned out to be long but most of the changes are related to changes in imports + black formatting changes across the entire anonymizer package.

Issue reference
This PR fixes issue #753
Checklist

[X] I have reviewed the contribution guidelines
[X] I have signed the CLA
[X] My code includes unit tests
[X] All unit tests and lint checks pass locally
[X] My PR contains documentation updates / additions if required

/azp run

@navalev docs tests are failing due to a mismatch between pypi version and this proposed version. Should we consider using the local version when testing docs?

@navalev docs tests are failing due to a mismatch between pypi version and this proposed version. Should we consider using the local version when testing docs?

the docs test pipeline should be revisited, it works against the published version, hence failing on major changes. I will handle this in a seperate PR.

repo: microsoft/presidio


text:
[BUG] Incompatibility with promptflow_vectordb

Describe the bug
Flow created through Azure Machine Learning Studio Prompt Flow. Runs fine in the cloud. When downloaded and run locally, fails with the following:
Flow test failed with ResolveToolError: Tool load failed in 'query': (ToolLoadError) Failed to load package tool 'Vector Index Lookup': (ModuleNotFoundError) No module named 'promptflow.runtime'
How To Reproduce the bug

Create a flow that uses tool: promptflow_vectordb.tool.vector_index_lookup.VectorIndexLookup.search
Run it

Expected behavior
The flow should run successfully, just as it runs successfully in the Azure Machine Learning Studio.
Running Information(please complete the following information):

Promptflow Package Version using pf -v: 0.1.0b7.post1
Operating System: macOS Ventura 13.5.2
Python Version using python --version: 3.9.18
promptflow_vectordb Version: 0.1.2

You @lsegdaniel  can have this package installed (hope that you can solve the problem) pip install promptflow-vectordb. I passed this problem but encounter another problem related to az-login

You @lsegdaniel can have this package installed (hope that you can solve the problem) pip install promptflow-vectordb. I passed this problem but encounter another problem related to az-login

Sorry @jimmy-nhk I don't follow. I already have promptflow_vectordb installed, and don't get a login issue (though I do need to use az login).

I am able to repro this entirely with Azure ML Studio as follows:

Create a chat-with-index flow by selecting Vector Index and then Create (under promptflow)
One the ingestion pipeline finishes, go to the Notebooks view and locate the directory that was created for your flow.
Open up a shell and active a python 3.10 environment.  Install promptflow following the instructions at aka.ms/promptflow.
Execute the flow via pf flow test.  The error will pop up after you type your query.

pip install promptflow_vectordb does not fix the problem, although it does change the error.
Without pip install promptflow_vectordb:
Flow test failed with PackageToolNotFoundError: Package tool 'promptflow_vectordb.tool.vector_index_lookup.VectorIndexLookup.search' is not found in the current environment. All available package tools are: ['promptflow.tools.embedding.embedding'].
With pip install promptflow_vectordb:
Flow test failed with ResolveToolError: Tool load failed in 'search_question_from_indexed_docs': (ToolLoadError) Failed to load package tool 'Vector Index Lookup': (ModuleNotFoundError) No module named 'promptflow.runtime'

I found the root cause, though the fix is fairly involved.
This tool uses Python code that is part of the Promptflow runtime installed when running in Azure ML but that is not part of Promptflow itself.  Specifically, this code is used to access vector index connection information directly from the user's Azure ML workspace.  The fix is to create a first-class Promptflow connection type for these connections which would then automatically read from the workspace when running in Azure ML and use Yaml files when running locally.

I found the root cause, though the fix is fairly involved.
This tool uses Python code that is part of the Promptflow runtime installed when running in Azure ML but that is not part of Promptflow itself. Specifically, this code is used to access vector index connection information directly from the user's Azure ML workspace. The fix is to create a first-class Promptflow connection type for these connections which would then automatically read from the workspace when running in Azure ML and use Yaml files when running locally.

Are there any references for this workaround, I'm not sure how to "Yaml files when running locally."

Update: we have an updated index lookup tool with a lot more features that will replace the tool discussed here and also fixes this issue.  Still waiting on a precise ETA for the release but it will be soon.

I don't think you are actually waiting for my input on this but, if you are, can you please clarify what additional input you need?

Are there any updates on this?

I am hitting this in ML Studio:

Tool load failed in 'search_question_from_indexed_docs': (ToolLoadError) Failed to load package tool 'Vector Index Lookup': (FileNotFoundError) [Errno 2] No such file or directory: '/tmp/tmpi9orug93/MLIndex'

Has there been an update on this? @dans-msft mentioned there was a fix in the works without an ETA of soon, but that was almost 2 months ago, has there been any word since?

@juliapoloSC, the replacement for Vector Index Lookup is already available: https://learn.microsoft.com/en-us/azure/ai-studio/how-to/prompt-flow-tools/index-lookup-tool. To get up and running in vs code, you'll need to install promptflow-vectordb[azure] and pymongo in your python environment.

@EdwardPrentice, this seems like an unrelated issue - could you open a new issue for this, please?

This particular issue is solved by the new index lookup tool described above.

authors: Adarsh-Ramanathan EdwardPrentice dans-msft jakeatmsft jimmy-nhk juliapoloSC lsegdaniel nsaul3c

repo: microsoft/promptflow


text:
Unset variables

Could you add a block to unset variables?
Currently we can destroy sprites, but leaving their associated variable floating around in the background occasionally causes issues, with code continuing to run that shouldn't do.
Thank you!

Not sure I understand the issue. Can you add a repro?
You can unset in the code by adding unset yourself? sprite = null

Sorry - I know how to unset variables in Python/JavaScript, what I had been hoping for was an equivalent in the block-based programming, as the students I'm teaching are not yet making the move to Python.
Your suggestion is helpful, as there is a 'null' block in jwunderl's arcade-sprite-util; it would be great if that (and a number of other things from that excellent extension!) could some day make their way into the standard blocks for Arcade.
Thank you!

Ok makes sense. Thank you!

authors: abchatra dcgs-sbu

repo: microsoft/pxt-arcade


text:
parse new format first

Fix for https://github.com/microsoft/pxt-arcade/issues/3020#issuecomment-771888706
Try to parse cards HTML as UL/OL tree; and bail out to JSON if failing.

Would be good to cherry pick this one into arcade.

repo: microsoft/pxt


text:
[DRAFT] Resizable sim / tutorial panel

Dumping this as a draft for now as I just spent an hour or two friday getting it to a demoable state and I have other things I gotta work on, will return and finish before next release :)
https://arcade.makecode.com/app/b8dfbcc37519503e713131cd7cf4a0fa3be60a6b-1ca2b8259a
todos:

design

[ ] check reflow layout of sim frame / tutorial frame content in and see
[ ] make it prettier
[ ] make it discoverable

[ ] also support horizontal layout, for testing I only implemented it for the desktop (/ widescreen) view
[ ] think on min / max widths
[ ] remove collapse button on desktop, make it so dragging all the way (< 1/2 or 1/3 min width) 'collapses' and show expand tab
[ ] probably should actually pass the size up instead of just query selector / setting the style on the div but it works fine
[ ] don't just use pageX, use width / dx
[ ] also draggable tutorial top bar for < tablet size
[ ] (maybe throttle resize a for perf)
[ ] do something when resizing adds or removes a scrollbar -- either allocate space for them ahead of time so it never flickers or disable scrollbar when cursor-resize class is set / resize is in progress

This was fleshed out and reimplemented in https://github.com/microsoft/pxt/pull/9533


text:
Unreachable mark but it is reachable

pylance v2021.11.2
python v3.9,6
os windows10 20H2 19042.1348

Thanks for the bug report. This will be fixed in the next release. In the meantime, you can work around the problem by providing a return type annotation for your function:
def tree(len) -> None:
    ...

This issue has been fixed in version 2021.12.0, which we've just released. You can find the changelog here:  CHANGELOG.md

Getting same problem on VSC: Version: 1.63.2, Pylance v2022.1.0 and macOS.
Happens after instantiating DjangoModelFactory object 🤷♂

Getting same problem on VSC: Version: 1.63.2, Pylance v2022.1.0 and macOS.
Happens after instantiating factory.base.Factory object from factoryboy 🤷♂
[edit] I guess it's because this method in BaseFactory class
def __new__(cls, *args, **kwargs):
    """Would be called if trying to instantiate the class."""
    raise errors.FactoryError('You cannot instantiate BaseFactory')

If I comment it out, all code becomes reachable again.

Hey @zigomir
Same setup here, same problem. Pylance marks my code as unreachable after instantiating a factoryboy object 🤷
It is important to note that the same code was working fine two weeks ago, before I left the office on annual leave.

from api.models import Token
from datetime import datetime
from django.contrib.auth.models import User
from factory.django import DjangoModelFactory

class UserFactory(DjangoModelFactory):
    """
    User Factory to be used on tests.
    """

    password = ""
    is_superuser = False
    username = "test_user"
    first_name = "Test"
    last_name = "User"
    email = "test_user@test.com"
    is_staff = True
    is_active = True
    date_joined = datetime.utcnow()

    class Meta:
        model = User
        django_get_or_create = ("username", "email", "is_active")

class TokenFactory(DjangoModelFactory):
    """
    Token Factory to be used on our tests
    """

    user = UserFactory()
    name = "test_user_token"
    identifier = "2e42a19593f047e080285e49864b0fb6"
    secret = "6ff2dc141c0841e2a43c25be9ae9b097"

    class Meta:
        model = Token
        django_get_or_create = ("user", "name", "identifier")

@adrianosmarinho, the problem you're seeing is this issue, which will be fixed in the next release.

I am also encountering this issue, here is a sample of my code.
 Environment data

Language Server version: 2022.7.40
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda):
python.analysis.indexing: null
python.analysis.typeCheckingMode: off

 Code Snippet
os.chdir(r'C:\Users\example')
path = r'C:\
![snip](https://user-images.githubusercontent.com/78053758/180894864-fe103358-28bf-477f-919d-b19946a7e869.png)
Users\example'
today = str(date.today())
filename = os.path.join(path, 'example_'+ today + '.txt')

ob=Screenshot_Clipping.Screenshot()
chrome_options = Options()
chrome_options.add_argument("--start-maximized")
driver = webdriver.Chrome(options=chrome_options)

driver.get('https://www.google.com/search?q=aardvark')
WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, '//*[@id="fsl"]/a[1]')))
html = driver.page_source
img_url=ob.full_Screenshot(driver, save_path=r'C:\Users\example', image_name='screenshot.png')
print(img_url)

time.sleep(random.randint(2,5))
driver.quit()

with open(filename, 'w', encoding="utf-8") as f:
    f.write(html)

The code after driver.quit() is marked as unreachable, even though it very much is.

@adchang21, could you provide a self-contained minimal code sample? The sample above references symbols that are presumably imported from somewhere. Am I correct in assuming that you are using the selenium library? If so, are you using the latest version? There is a known bug in earlier versions of selenium that results in this behavior. Try pip install selenium --upgrade and see if that fixes your issue.

Upgrading selenium fixed it, thank you!

@adchang21, could you provide a self-contained minimal code sample? The sample above references symbols that are presumably imported from somewhere. Am I correct in assuming that you are using the selenium library? If so, are you using the latest version? There is a known bug in earlier versions of selenium that results in this behavior. Try pip install selenium --upgrade and see if that fixes your issue.

upgraded to version 4.3.0 but it said code unreachable
import rqdatac
rqdatac.init()
code below will treated as unreacable
print("a")

@adchang21, it looks like the issue you're hitting is not related to selenium. Your code snippet above references a module called rqdatac. Am I correct in assuming that's a reference to the rqdatac package? If so, which version are you using? The latest version is 2.9.55. When I install that version, I'm not able to repro unreachable code. I'm guessing that you have an older version installed. Please try updating with pip install rqdatac --upgrade.

This issue is closed. If you got here because you are seeing code that is marked as unreachable by pylance, it is most likely an issue in a library or type stub, not a bug in pylance. If you want help diagnosing the problem, please use the discussion tab.
If you think that it is potentially a bug in pylance, please open a new bug report. Do not use this closed issue. And as with all bug reports, please include a self-contained minimal code example and specify which versions of third-party libraries the code sample imports.

authors: adchang21 adrianosmarinho bschnurr erictraut rwayan simm4256 zigomir

repo: microsoft/pylance-release


text:
How to inform reportGeneralTypeIssues of TypeAliases?

I have some type aliases which pylance gives me TypeIssues. How do I inform pylance of these types?

@erictraut thank you for responding.
I have a file in a package I installed with pip install -e .
# types.py
from typing import (
    TypeAlias, List,
    Sequence, Literal,
    Tuple, NamedTuple,
    Union, get_args
)

Series: TypeAlias = pd.Series

ndarray: TypeAlias = np.ndarray

SeriesLike: TypeAlias = Union[list, Series, ndarray, Tensor]

and then
# utils.py
from .types import ndarray
def is_np(arr_q:ndarray) -> bool:
    return isinstance(arr_q, ndarray)

which gives me the squiggle for ndarray.
This is the simplest I can make the example and get the warning.

I presume that you also have import statements that define np, pd, and Tensor? Those are undefined in your self-contained sample above.
I'm not able to repro an error based on the same you provided above. Are you able to repro the problem with a fresh virtual environment and a clean project? I suspect that you have something stale installed in your environment, perhaps an old stub library, that is causing the problem.
Also, you mentioned that you're using an editable install. I'm not sure which package you're referring to here? Is it one of the packages in your minimal, self-contained sample? There are issues that you may want to be aware of with editable installs.

hmmm my environment is
name: my_env
channels:
  - conda-forge
dependencies:
  - python>=3.10
  - numpy
  - pandas

I have an __init__.py and  setup.py file as well
# my_project
__init__.py
setup.py
types.py
utils.py
env.yml

You said "which gives me the squiggle for ndarray". Which "ndarray" is being flagged? (Your sample includes ndarray in three places — once in an import statement, once in a type annotation, and a third time as an argument for isinstance.) What is the diagnostic message?

@erictraut, ah sorry for not being clear.
from .types import ndarray
def is_np(arr_q:ndarray) -> bool:             # <---- squiggle
    return isinstance(arr_q, ndarray)         # <---- squiggle

And what is the diagnostic message you're receiving for each of these lines? You mentioned that they were associated with the reportGeneralTypeIssues diagnostic rule, but that's kind of a catch-all rule for many diagnostic messages.

That is the message for each of them.  Pylance just doesn't know what they are.

That is the message for each of them. Pylance just doesn't know what they are.

@dsm-72, what is the associated diagnostic message?
For example, for x: int = "str" I get the following diagnostic which is a reportGeneralTypeIssues diagnostic too, but reportGeneralTypeIssues diagnostics can have many other possible messages.
Expression of type "Literal['str']" cannot be assigned to declared type "int"
  "Literal['str']" is incompatible with "int" (reportGeneralTypeIssues)

reportGeneralTypeIssues is a class of diagnostics, not a specific error. For example, below are two reportGeneralTypeIssues diagnostics. Note that the description of the actual problem in the two cases is very different. We need to know what that descriptive text is in the case(s) that you are hitting.
Expression of type "Literal['str']" cannot be assigned to declared type "int"
  "Literal['str']" is incompatible with "int" (reportGeneralTypeIssues)

Argument of type "Literal[10]" cannot be assigned to parameter "__value" of type "None" in function "send"
  Type cannot be assigned to type "None" (reportGeneralTypeIssues)

Closing issue with no response. If you can respond with the asked for information, please reopen this issue.
Thanks.

authors: debonte dsm-72 erictraut rchiodo


text:
build error: suggest explicit braces to avoid ambiguous ‘else’

I get a compile error:
/home/huahang/src/rdsn/src/core/src/clientlet.test.cpp: In lambda function:
/home/huahang/src/rdsn/src/core/src/clientlet.test.cpp:117:16: error: suggest explicit braces to avoid ambiguous ‘else’ [-Werror=dangling-else]
if (ERR_OK == ec)

@huahang , thank you very much for the feedback. Which C++ compiler and version are you using?

Fixed by PR #223 .

authors: huahang linmajia

repo: microsoft/rDSN


text:
DeviceInfo

https://github.com/react-native-community/react-native-device-info

I started working on this here: https://github.com/react-native-community/react-native-device-info/pull/1057
Aiming to get it merged by the end of next week

authors: safaiyeh tom-un

repo: microsoft/react-native-macos


text:
UWP native code docs

Add a doc about RNW apps as UWP apps
Fixes #264

@stevewhims FYI

This a great addition - thanks doing it!

repo: microsoft/react-native-windows-samples