text:
[Bug] CTRL+F / Find does not work for offscreen content

Reproducible in vscode.dev or in VS Code Desktop?

[x] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

[ ] Not reproducible in the monaco editor playground

Monaco Editor Playground Link
The existing code in this existing sample demonstrates the issue:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#example-extending-language-services-configure-javascript-defaults
Monaco Editor Playground Code
The existing code in this existing sample demonstrates the issue:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#example-extending-language-services-configure-javascript-defaults

Reproduction Steps

Visit
https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#example-extending-language-services-configure-javascript-defaults
Press CTRL+F (or find in page, etc)
Type 'jscode' (no quotes)

It seems that anything off screen isn't considered for built-in browser search.  My React app has embedded Monaco editors too and I found this same bug.  I don't think each app that embeds Monaco should have to hook into the browser find-in-page and try to do custom code.
Actual (Problematic) Behavior
Actual:
Only finds 1 instance of 'jscode'
Actual screenshot:

Expected Behavior
Expected:
Should find 2 instances 'jscode'.  If I scroll just a bit lower down and repeat, it finds both:

Additional Context
Please refer to this blog post that has some commentary on find-in-page support these days:
https://textslashplain.com/2024/07/15/browser-features-find-in-page/
I noticed it pointed out https://developer.mozilla.org/en-US/docs/Web/CSS/content-visibility as one way to address this.  Not sure if Monaco can make use of that?

Why is this a bug?
As far as I understand, the Monaco Editor typically renders only about 30 lines of code to the DOM tree, depending on the size of the editor container. Consequently, the browser cannot search all the results because the full text is stored as a JavaScript string (or piece tree specifically). Only the portion of the text that is rendered to the DOM tree can be searched by the browser.

@qirong77 It's a bug in the sense that the browser search is incomplete / inaccurate and it doesn't make sense for individual apps that embed Monaco to all have to separately fix/support search within Monaco.
Is your thinking that users can press CTRL+F within Monaco if that's where they expect the text to be that they're looking for?  If so, I would say that works for more advanced users and only in some situations.  Additionally, some apps may embed multiple Monaco editors on a single page and it might not be obvious even to an advanced user which editor may have the text they're searching for.

@qirong77 It's a bug in the sense that the browser search is incomplete / inaccurate and it doesn't make sense for individual apps that embed Monaco to all have to separately fix/support search within Monaco.
Is your thinking that users can press CTRL+F within Monaco if that's where they expect the text to be that they're looking for? If so, I would say that works for more advanced users and only in some situations. Additionally, some apps may embed multiple Monaco editors on a single page and it might not be obvious even to an advanced user which editor may have the text they're searching for.

I got you , Monaco editors are designed to work  with vscode, which operates with just one instance of the Monaco editor. Therefore, this issue may be beyond their usual scope of responsibilities, I guess.
Additionally, there's a known bug that many users, including us, encounter: having multiple editors with different themes on a single page, which still remains unfixed. 😂


text:
Error when PHP load thread safe drivers.

PHP Driver version or file name
php_pdo_sqlsrv_73_ts.so
php_sqlsrv_73_ts.so
Client operating system
MacOS Mojave - Version 10.14.4
PHP version
7.3.3
Microsoft ODBC Driver version
Release v5.6.1
Problem description
With thread safe version I have an error when PHP load the drivers. All works correctly with the "NTS" version.
PHP log file :
[09-May-2019 08:49:23 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_73_ts.so' (tried: /Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_pdo_sqlsrv_73_ts.so (dlopen(/Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_pdo_sqlsrv_73_ts.so, 9): Symbol not found: _executor_globals_id
  Referenced from: /Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_pdo_sqlsrv_73_ts.so
  Expected in: flat namespace

[09-May-2019 08:49:23 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_sqlsrv_73_ts.so' (tried: /Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_sqlsrv_73_ts.so (dlopen(/Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_sqlsrv_73_ts.so, 9): Symbol not found: _ts_allocate_id
  Referenced from: /Applications/MAMP/bin/php/php7.3.3/lib/php/extensions/no-debug-non-zts-20180731/php_sqlsrv_73_ts.so
  Expected in: flat namespace

@niquenen If you are using the thread safe drivers, you need a thread safe build of PHP (you can't use both thread safe and non-thread safe drivers with the same PHP build). If you downloaded PHP via homebrew, you will get the non-thread safe version of PHP, so you will need the NTS drivers.
If you want to use the thread safe drivers instead, you will need to compile PHP from source using the --enable-maintainer-zts configure option.

source: gharchive/issue

authors: david-puglielli niquenen

repo: microsoft/msphpsql

license: MIT

license_type: permissive

license_source: github-api


text:
cannot sort by Default metric in the Trial jobs tab

In the Trial jobs tab, when I click the (sort by) Default metric button, the results are always sorted by the column Trial No.

In Edge, the results are actually sorted by Trial No.
In Chrome, the results are confused.

@kepsail Thanks for reporting this bug. I'll fix it soon.

In Edge, the results are actually sorted by Trial No.
In Chrome, the results are confused.

The results are not sorted by Trial No. when you sorted by default metric column. Because webui sorted default metric column by trial's final metric but some trial hadn't final metric. It caused the confuse. I'll sort default metric by final/Iatest intermediate metric.

authors: kepsail lvybriage

repo: microsoft/nni


text:
Problem with using ProxylessNAS in example from nni guide

Hello!
I started with the example provided in https://nni.readthedocs.io/en/latest/NAS/NasGuide.html and chose ProxylessNAS as trainer. However I have an error in mutator.py
object of type 'InputChoice' has no len()
When I removed all stuff with InputChoice there is a dimension mismatch appeared in first linear layer.
class Net(nn.Module):
	def __init__(self):
		super(Net, self).__init__()
		self.conv1 = mutables.LayerChoice([
			nn.Conv2d(1, 32, 3, 1),
			nn.Conv2d(1, 32, 5, 3)
		])
		self.conv2 = nn.Conv2d(32, 64, 3, 1)
		self.dropout1 = nn.Dropout2d(0.25)
		self.dropout2 = nn.Dropout2d(0.5)
		self.fc1 = nn.Linear(9216, 128)
		self.fc2 = nn.Linear(128, 10)

	def forward(self, x):
		x = self.conv1(x)
		x = F.relu(x)
		x = self.conv2(x)
		x = F.relu(x)
		x = F.max_pool2d(x, 2)
		x = self.dropout1(x)
		x = torch.flatten(x, 1)
		x = self.fc1(x)
		x = F.relu(x)
		x = self.dropout2(x)
		x = self.fc2(x)
		output = F.log_softmax(x, dim=1)
		return output

As far as I know ProxylessNAS does not support InputChoice. We will fix the doc.
The shape of fc1 is affected by input data. You can print the shape and change 9216 to correct value.

But for the different LayerChoise there will be different tensor size, ho it is possible to initialize LinearLayer dynamically depending on chosen layer?

Generally LayerChoice should only contain layers with identical output shape. This is not about shape inference. LayerChoice must have constant output shape as long as the following layer is trainable.
To satisfy this constraint, first you can use padding anywhere to make the image size constant. Then if the channel number varies, you can group each candidate layer with an extra reshaping op, typically an 1x1 conv layer. Besides standard layers you can use custom modules in LayerChoice as well.

Thank you that's answering my question

authors: anadb liuzhe-lz


text:
Multicard oneshot nas dataloader

Description
Multicard oneshot nas dataloader
Checklist

[ ] test case
[ ] doc

How to test

Reopened in #4603.

Blocked by #4552.

Tests require PL 1.6. Upgrade is in #4814.

source: gharchive/pull-request

authors: Frandium matluster ultmaster


text:
Upgrade to eBPF core 0.17.0

Description
The 0.17.0 release of eBPF brings with it fixes we'll need to be able to marshal long command line strings (in a future PR), and just keeps the extensions current with the latest release of the core.
Testing
Locally ran the tests that run inside Visual Studio.  The pipeline will run the rest.
Documentation
Minimal docs changes, just updated contributing instructions on which version of eBPF to install.
Installation
No

Strange, the build is broken in CI, but locally I don't see the same errors.  Looking into it.

repo: microsoft/ntosebpfext


text:
Bump Hyper to 0.14.25

Addressing CVE-2022-31394/https://github.com/advisories/GHSA-x477-xp89-wc9r

Codecov Report

Merging #3008 (3a2fdcd) into main (4dcc49c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #3008   +/-   ##
=======================================
  Coverage   29.02%   29.02%
=======================================
  Files         304      304
  Lines       36326    36326
=======================================
  Hits        10545    10545
  Misses      25781    25781

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: Porges codecov-commenter

repo: microsoft/onefuzz


text:
Test PR

(deleting PR after tests)

Codecov Report

Merging #3054 (1d801fa) into main (49240ba) will decrease coverage by 2.47%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3054      +/-   ##
==========================================
- Coverage   31.42%   28.95%   -2.47%
==========================================
  Files         306      126     -180
  Lines       36625    13749   -22876
==========================================
- Hits        11508     3981    -7527
+ Misses      25117     9768   -15349

see 180 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: AdamL-Microsoft codecov-commenter


text:
Forcefully shut down the runtime before existing the main task

Summary of the Pull Request
The default behavior or the runtime is wait for all spawned work to be done before exiting. This was causing the task to hang when  exiting.
This change adds a force shutdown at the end of the main function of the task.
closes #3377

Does that mean the cancellation from select! happens in the background? And that prior to this PR, we wait for the cancellation to complete when we drop the runtime?

This is not necessarily a problem with select!. The tokio docs says it waits on all the spawned work. Select will cancel everything related the task  itself  But something was spawned inside that task of it becomes an independent branch that is not waited on.


text:
Increasing Azure App Function Timeout to 12 Hours

Summary of the Pull Request
What is this about?
While we work on a potential redesign of the azure app functions TimerWorkers and TimerTasks we are increasing the function timeout.
PR Checklist

[ ] Applies to work item: #xxx
[ ] CLA signed. If not, go over here and sign the CLI.
[ ] Tests added/passed
[ ] Requires documentation to be updated
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Info on Pull Request
What does this include?
Validation Steps Performed
How does someone test & validate?

Codecov Report

Merging #3599 (4731241) into main (957f1fb) will decrease coverage by 11.12%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main    #3599       +/-   ##
===========================================
- Coverage   39.97%   28.86%   -11.12%
===========================================
  Files         303      136      -167
  Lines       37698    14788    -22910
  Branches     1725     1725
===========================================
- Hits        15071     4269    -10802
+ Misses      22305    10198    -12107
+ Partials      322      321        -1

see 168 files with indirect coverage changes

Is there a way to restrict this to certain functions? We have some that should finish in seconds, so ideally we don't want their maximum runtime to be 12 hrs.

Is there a way to restrict this to certain functions? We have some that should finish in seconds, so ideally we don't want their maximum runtime to be 12 hrs.

Not that I'm aware of. I don't think it's necessary, though, as we will only have this a short time and have a good way of keeping an eye on timer run length via data dashboards.

authors: Porges codecov-commenter nharper285


text:
Deployment issue

Organization Name:
Advantech

Short summary about the issue/question:
The announced deployed method seems to be unable to deploy openpai version on v1.4.1.
https://openpai.readthedocs.io/en/latest/manual/cluster-admin/installation-guide.html#installation-from-scratch
https://github.com/microsoft/pai/blob/v1.3.0/contrib/kubespray/quick-start-kubespray.sh
Brief what process you are following:

Checkout v1.4.1 openpai
Create worker.csv, master.csv and config
Deploy k8s via command:
/bin/bash quick-start-kubespray.sh -m /path/to/master.csv -w /path/to/worker.csv -c /path/to/config
The deploy script have some error upon fetching ~/pai/contrib/kubespray/config/config.yaml
Clone OpenPAI source code from github to /home/ubuntu/pai-deploy Cloning into '/home/ubuntu/pai-deploy/pai'... fatal: Remote branch pai-1.5.y not found in upstream origin
Should we configure ~/pai/contrib/kubespray/config/config.yaml and ~/pai/contrib/kubespray/config/layout.yaml instead?

How to reproduce it:
Just follow the steps listed above.

OpenPAI Environment:

OpenPAI version:
v1.4.1

@JosephKang Thanks for raising this issue.
For v1.4.1, please make sure that the following versions are the same:

the version you specified in path/to/config, including branch_name and docker_image_name
the branch of the pai source code you are using locally
the document version

~/pai/contrib/kubespray/config/config.yaml & ~/pai/contrib/kubespray/config/layout.yaml are only involved in the upcoming v1.5.0 version (very soon).  The deploy process will be refined in v1.5.0.

@JosephKang Thanks for raising this issue.
For v1.4.1, please make sure that the following versions are the same:

the version you specified in path/to/config, including branch_name and docker_image_name
the branch of the pai source code you are using locally
the document version

~/pai/contrib/kubespray/config/config.yaml & ~/pai/contrib/kubespray/config/layout.yaml are only involved in the upcoming v1.5.0 version (very soon).  The deploy process will be refined in v1.5.0.

@suiguoxin
It seems that ~/pai/contrib/kubespray/config/config.yaml and ~/pai/contrib/kubespray/config/layout.yaml configurations are involved in v1.3.0 and  v1.4.1.

https://github.com/microsoft/pai/blob/v1.4.1/contrib/kubespray/quick-start-kubespray.sh
https://github.com/microsoft/pai/blob/v1.4.1/contrib/kubespray/quick-start-service.sh

Should I use the two configurations directly for the for v1.4.1 deployment?

@JosephKang Thanks for raising this issue.
For v1.4.1, please make sure that the following versions are the same:

the version you specified in path/to/config, including branch_name and docker_image_name
the branch of the pai source code you are using locally
the document version, including readthedocs link and github markdown files

~/pai/contrib/kubespray/config/config.yaml & ~/pai/contrib/kubespray/config/layout.yaml are only involved in the upcoming v1.5.0 version (very soon). The deploy process will be refined in v1.5.0.

@suiguoxin
It seems that ~/pai/contrib/kubespray/config/config.yaml and ~/pai/contrib/kubespray/config/layout.yaml configurations are involved in v1.3.0 and  v1.4.1.

https://github.com/microsoft/pai/blob/v1.4.1/contrib/kubespray/quick-start-kubespray.sh
https://github.com/microsoft/pai/blob/v1.4.1/contrib/kubespray/quick-start-service.sh

Should I use the two configurations directly for the for v1.4.1 deployment?

@JosephKang Thanks for raising this issue.
For v1.4.1, please make sure that the following versions are the same:

the version you specified in path/to/config, including branch_name and docker_image_name
the branch of the pai source code you are using locally
the document version, including readthedocs link and github markdown files

~/pai/contrib/kubespray/config/config.yaml & ~/pai/contrib/kubespray/config/layout.yaml are only involved in the upcoming v1.5.0 version (very soon). The deploy process will be refined in v1.5.0.

@JosephKang  There is potentially an issue with github webportal, we will look into it. Currently please refer to pai-1.4.y branch instead of v1.4.1 tag for v1.4.1 doc.

@JosephKang  There is potentially an issue with github webportal, we will look into it. Currently please refer to pai-1.4.y branch instead of v1.4.1 tag for v1.4.1 doc.

@JosephKang The tag issue is fixed by removing accidently created branch. You can use the doc with tags : v1.4.1 tag safely now.

@JosephKang The tag issue is fixed by removing accidently created branch. You can use the doc with tags : v1.4.1 tag safely now.

@suiguoxin
Thanks. It seems that https://github.com/microsoft/pai/tree/v1.4.1 is synced with the current document and can be deployed successfully.

@suiguoxin
Thanks. It seems that https://github.com/microsoft/pai/tree/v1.4.1 is synced with the current document and can be deployed successfully.

authors: JosephKang suiguoxin

repo: microsoft/pai


text:
Support stop framework api in k8s rest server

Support stop framework api in k8s rest server.

Coverage decreased (-0.06%) to 50.587% when pulling 3a98fb392b194b67b557efc29e1ce381a4afbaa2 on xiongyf/stop-framework into f5ed5e596a45ff71e2771b2222fb74d9a9cee603 on feature/pure-k8s.

authors: abuccts coveralls


text:
[Webportal] Support Job Priority in job-list

Support UX of Job Priority #5417

Coverage decreased (-0.2%) to 33.681% when pulling 21e86504adeba324c1af94382fc6540ee918450f on yiyi/webportal/job-list-priority into 66255428703d0e798f5fba247d8706c23f1f01eb on master.

authors: coveralls yiyione


text:
Unable to Open Some Traces

Opening some traces fails and the PerfView UI just acts as if the trace hasn't been opened.  Under the debugger, an exception is thrown:
'An attempt was made to move the file pointer before the beginning of the file.

 	mscorlib.dll!System.IO.__Error.WinIOError(int errorCode, string maybeFullPath)	Unknown
 	mscorlib.dll!System.IO.FileStream.SeekCore(long offset, System.IO.SeekOrigin origin)	Unknown
 	mscorlib.dll!System.IO.FileStream.Seek(long offset, System.IO.SeekOrigin origin)	Unknown
>	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.IOStreamStreamReader.Fill(int minimum) Line 778	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.MemoryStreamReader.ReadInt32() Line 88	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.MemoryStreamReader.ReadLabel() Line 153	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.Deserializer.ResolveForwardReference(FastSerialization.ForwardReference reference, bool preserveCurrent) Line 1516	C#
 	Microsoft.Diagnostics.Tracing.TraceEvent.dll!Microsoft.Diagnostics.Tracing.Etlx.TraceLog.FastSerialization.IFastSerializable.FromStream(FastSerialization.Deserializer deserializer) Line 3599	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.Deserializer.ReadObjectDefinition(FastSerialization.Tags tag, FastSerialization.StreamLabel objectLabel) Line 1905	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.Deserializer.ReadObjectDefintion() Line 1826	C#
 	Microsoft.Diagnostics.FastSerialization.dll!FastSerialization.Deserializer.GetEntryObject() Line 1109	C#
 	Microsoft.Diagnostics.Tracing.TraceEvent.dll!Microsoft.Diagnostics.Tracing.Etlx.TraceLog.InitializeFromFile(string etlxFilePath) Line 3354	C#
 	PerfView.exe!PerfView.ETLPerfViewData.GetTraceLog(System.IO.TextWriter log, System.Action<bool, int, int> onLostEvents) Line 7230	C#
 	PerfView.exe!PerfView.ETLPerfViewData.GetTraceLog(System.IO.TextWriter log, System.Action<bool, int, int> onLostEvents) Line 7244	C#
 	PerfView.exe!PerfView.ETLPerfViewData.OpenImpl(System.Windows.Window parentWindow, PerfView.StatusBar worker) Line 6731	C#
 	PerfView.exe!PerfView.PerfViewFile.Open.AnonymousMethod__0() Line 504	C#
 	PerfView.exe!PerfView.StatusBar.StartWork.AnonymousMethod__0() Line 254	C#
 	mscorlib.dll!System.Threading.Tasks.Task.InnerInvoke()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.Execute()	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)	Unknown
 	mscorlib.dll!System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()	Unknown
 	mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()	Unknown
 	mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()	Unknown

The exception is thrown here: https://github.com/microsoft/perfview/blob/master/src/FastSerialization/StreamReaderWriter.cs#L778
Per git bisect, this is caused by #952.  @noahfalk, can you please take a look?

Fixed via #963.

repo: microsoft/perfview


text:
[BUG]: Admin | Sync Template v3 (Flows) Flow run failed

Describe the bug
Admin | Sync Template v3 fails to complete with Error
Action 'Get_Flow_from_CoE' failed
Component (please tell us which flow or app you are experiencing issues with):

Solution Core
Version 1.98
Admin | Sync Template v3 (Flows

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

Additional context
Add any other context about the problem here.

Hello, that is an expected failure for flows that are new to the CoE and is caught by the next step to set a variable indicating such.
Can you please let me know, does the flow fail? If so, you will need to find the step lower down that fails without being caught

I still get one failure

Hello I'm afraid we cannot help without further information. You will need to go into that failure and find the uncaught error. As stated above, the one you show in your initial picture is expected and caught.

{
"host": {
"connectionReferenceName": "shared_commondataserviceforapps_2",
"operationId": "GetItem"
},
"parameters": {
"entityName": "admin_flows",
"recordId": "5da87d93-4c4a-43ee-b89a-a3d36f5adb49",
"$select": "admin_flowid,admin_flowmodifiedon"
},
"retryPolicy": {
"type": "Exponential",
"interval": "PT10S",
"count": 10
}
}
{
"statusCode": 404,
"headers": {
"x-ms-service-request-id": "e59e5956-bdbe-4715-b4ac-4a3c4d9efc75,915dd12f-1afb-445d-8058-c97a0b598b85",
"Cache-Control": "no-cache",
"Set-Cookie": "ARRAffinity=944858cc0f365a2b5b8b636309e51a82092caa99e583726aeea965ec20588528; domain=org97.crm4.dynamics.com; path=/; secure; HttpOnly,ReqClientId=9751eeca-8857-4239-8bc4-eaeda979d2d9; expires=Fri, 20-Mar-2071 09:07:04 GMT; path=/; secure; HttpOnly; samesite=none,ARRAffinity=944858cc0f365a2b5b8b636309e51a82092caa99e583726aeea965ec20588528; domain=org97.crm4.dynamics.com; path=/; secure; HttpOnly",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"REQ_ID": "915dd12f-1afb-445d-8058-c97a0b598b85,915dd12f-1afb-445d-8058-c97a0b598b85",
"AuthActivityId": "0ad848c3-fc72-469d-9c4a-f9970fa099c1",
"x-ms-ratelimit-burst-remaining-xrm-requests": "5895",
"x-ms-ratelimit-time-remaining-xrm-requests": "1,193.70",
"OData-Version": "4.0",
"X-Source": "02026915218312616111631718917225521133106158922369716810612168160321751952177937165,1342817997190109247116232173255250154591482276912810820617101187441182342031661271088854",
"Public": "OPTIONS,GET,HEAD,POST",
"Timing-Allow-Origin": "*",
"Date": "Sat, 20 Mar 2021 09:07:03 GMT",
"Content-Length": "1126",
"Allow": "OPTIONS,GET,HEAD,POST",
"Content-Type": "application/json; odata.metadata=full",
"Expires": "-1"
},
"body": {
"error": {
"code": "0x80040217",
"message": "admin_flow With Id = 5da87d93-4c4a-43ee-b89a-a3d36f5adb49 Does Not Exist",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey": "Plugin/Microsoft.Crm.ObjectModel.CustomBusinessEntityService",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey": "c7618408-1b87-eb11-b1ac-000d3ada49f7",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey": "1",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey": "63e8a06c-4bd2-4b79-a8a2-a3c73b7e8b1d",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "ClientError",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMesageName": "ObjectDoesNotExist",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": "404",
"@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3A80040217&client=platform",
"@Microsoft.PowerApps.CDS.InnerError.Message": "admin_flow With Id = 5da87d93-4c4a-43ee-b89a-a3d36f5adb49 Does Not Exist"
}
}
}

Hi Please see attached and message above for more informaiton

Hello. Can you see if this repros on rerun? If so, then you have a product bug. Here is where you are in the flow
You asked the product to return all flows in the envt, and now you are saying return-this-flow that was returned from this set.
Either it happened to be deleted while the flow was running (and hence will pass on rerun) or you have hit a product bug. They have seen these before. You would need to create a ticket and work with support on that.
Sorry we cant be of more help on that.

authors: JeneferM-MSFT tkudya

repo: microsoft/powerapps-tools


text:
[Feature]: Fluent Icon (1.0.19) ability to set padding and icon position

**Is this request for a new component, or additional functionality for an existing component? **
Fluent Icon (1.0.19) (Icon Type = Action Button)
**Have you validated that your desired feature or component is not already in the [backlog]
Yes
Describe the component and functionality you would like to see in the starter kit
I would like to be able to set the padding of the icon to control the distance of the icon and text from the edge of the action button. I would also like to be able to set the position of the icon relative to the text. For example I have a Next button with the arrow icon on the left of the text. I would like to be able to position the arrow to the right of the text.

Just saw this after posting a related Icon issue...
https://github.com/microsoft/powercat-code-components/issues/155
Totally agree with adding the ability to position the button to the left or right of the button text.

authors: ArtKarp justatheory

repo: microsoft/powercat-creator-kit


text:
Power Platform Import Solution Task From Azure Dev Ops triggers two solutions deploy in CRM

Power Platform Import Solution Task From Azure Dev Ops triggers an Import into CRM solution. But about an hour later into the Import there is another entry in the solution history of CRM for the same solution. This causes the ADO task to fail.
As seen in the below image there are two entries. The second fails as the first one is still in progress.

We have the same issue. It has been happening consistently the last couple of weeks. Right before the actual import succeeds a new import is started, which causes the PipeLine to fail.
And also the actual error message is not being shown in the logs of the pipeline.

Hi @davidjenni . Thanks for the update. Unfortunately this update did not resolve the issue for us. We also have an active support ticket (2211070050001559) to which I attached the log files.

authors: WaseemAhmedBekaert beumah

repo: microsoft/powerplatform-build-tools


text:
Add evaluation code for DICOM image de-identification

Is your feature request related to a problem? Please describe.
When experimenting with the DicomImageRedactorEngine, it would be great to be able to automatically evaluate the performance. Metrics such as precision and recall (with the identified PHI) could be very helpful.
Describe the solution you'd like
Add new functionality to DicomImageRedactorEngine or create a new class to host all code necessary to automate evaluation of DICOM image de-identification.
A template for the ground-truth file should also be provided.
Describe alternatives you've considered
Evaluation can be done manually, but it is tedious and not scalable.

Currently working on addressing this. Will create a PR when ready.

Need to merge in a PR to address a limitation with ImagePiiVerifyEngine before creating PR for DicomImagePiiVerifyEngine.

repo: microsoft/presidio


text:
Alternate messaging

Current header messaging is "One hour, millions of kids, limitless possibilities.  Pick a game and step right up!"
Since our primary audience is students/kids, I might suggest something that is more descriptive of what they will be doing on this page.
Suggestion: "Code a fun Carnival Game in less than an hour!  Step right up and choose one of the three activities below!"

Alex should work on this with Catherine.  I don't see her in this repo so I can't tag her.

authors: Jaqster kiki-lee

repo: microsoft/pxt-arcade


text:
Fix optional config settings

Fixes the nesting of optional config.
Optional config is required to make sure switches in the project settings are reflecting the state of Bluetooth.

@pelikhan can you review this and merge if possible?
This will make sure that the switch in the project settings of our calliope target will be turned on, when jacdac is loaded:

release pushed.

authors: Amerlander pelikhan

repo: microsoft/pxt-jacdac


text:
For Protractorpicker, you cannot specify the maximum and minimum values

I would like to specify maximum and minimum values for Protractorpicker. It doesn't work now.

repo: microsoft/pxt


text:
Add CodeQL security scanning

Hi, I'm a PM on the GitHub security team. This repository is eligible to try the new GitHub Advanced Security code scanning beta.
Code scanning runs a static analysis tool called CodeQL which scans your code at build time to find any potential security issues. We've tuned the set of queries to be only the most severe, most precise issues. We'll show alerts in the security tab, and we'll show alerts for any net new vulnerabilities on pull requests as well. We've tried to make this super developer friendly, but we'd love your feedback as we work through the beta.
If you're interested in trying it out, you can merge this pull request to set up the Actions workflow. You can also get this set up yourself in any additional repositories in this organization by following these instructions

The analysis build here is hitting an out-of-memory error, so I am working on seeing if we can unblock it.


text:
Methods wrapped in @lru_cache show type errors

Environment data

Language Server version: v2021.11.2
OS and version: CentOS 7
Python version (& distribution if applicable, e.g. Anaconda): 3.7.4

Expected behaviour
Methods without or with optional arguments wrapped in a @functools.lru_cache decorator should not show type errors when calling them through an instance of the object.
Actual behaviour
Since one of the last updates, Pylance reports "Argument missing for parameter "self"" even when running in basic type checking mode.

See the example code in the Code Snippet section below
Logs

Pylance trace output

[Info  - 9:27:34 AM] Pylance language server 2021.11.2 (pyright b27108d5) starting
[Info  - 9:27:34 AM] Server root directory: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist
[Info  - 9:27:34 AM] No configuration file found.
[Info  - 9:27:34 AM] No pyproject.toml file found.
[Info  - 9:27:34 AM] Setting pythonPath for service "demo": "/tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/bin/python3"
[Warn  - 9:27:34 AM] stubPath /home/jonase/demo/typings is not a valid directory.
[Info  - 9:27:34 AM] Assuming Python version 3.7
[Info  - 9:27:34 AM] Assuming Python platform Linux
Search paths for /home/jonase/demo
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib
  /home/jonase/demo
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /home/jonase/demo/typings
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stubs/...
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/bundled/stubs
  /tools/cpkg/site-specific/xdr/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/lib-dynload
  /home/jonase/.local/lib/python3.7/site-packages
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 9:27:35 AM] Searching for source files
[Info  - 9:27:35 AM] Found 1 source file
[Info  - 9:27:35 AM] Background analysis(1) root directory: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist
[Info  - 9:27:35 AM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setImportResolver
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
[FG] parsing: /home/jonase/demo/lru-cache-self-missing.py (27ms)
[FG] parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (89ms)
[FG] binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi (50ms)
[FG] binding: /home/jonase/demo/lru-cache-self-missing.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/jonase/demo/lru-cache-self-missing.py ...
[BG(1)]   parsing: /home/jonase/demo/lru-cache-self-missing.py (29ms)
[BG(1)]   parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (99ms)
[BG(1)]   binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi (40ms)
[BG(1)]   binding: /home/jonase/demo/lru-cache-self-missing.py (1ms)
[BG(1)]   checking: /home/jonase/demo/lru-cache-self-missing.py ...
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 2ms] (29ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing.pyi (18ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 1ms] (13ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 1ms] (3ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 1ms] (3ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/abc.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/functools.pyi [fs read 2ms] (6ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/functools.pyi (2ms)
[BG(1)]   checking: /home/jonase/demo/lru-cache-self-missing.py (123ms)
[BG(1)] analyzing: /home/jonase/demo/lru-cache-self-missing.py (295ms)
Background analysis message: resumeAnalysis[Info  - 9:27:34 AM] Pylance language server 2021.11.2 (pyright b27108d5) starting
[Info  - 9:27:34 AM] Server root directory: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist
[Info  - 9:27:34 AM] No configuration file found.
[Info  - 9:27:34 AM] No pyproject.toml file found.
[Info  - 9:27:34 AM] Setting pythonPath for service "demo": "/tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/bin/python3"
[Warn  - 9:27:34 AM] stubPath /home/jonase/demo/typings is not a valid directory.
[Info  - 9:27:34 AM] Assuming Python version 3.7
[Info  - 9:27:34 AM] Assuming Python platform Linux
Search paths for /home/jonase/demo
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib
  /home/jonase/demo
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /home/jonase/demo/typings
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stubs/...
  /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/bundled/stubs
  /tools/cpkg/site-specific/xdr/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/site-packages
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7
  /tools/cpkg/.packages/x86_64/RHEL7.2/python/3.7.4/lib/python3.7/lib-dynload
  /home/jonase/.local/lib/python3.7/site-packages
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Warn  - 9:27:35 AM] Exception received when installing file system watcher: TypeError [ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]: The feature watch recursively is unavailable on the current platform, which is being used to run Node.js
[Info  - 9:27:35 AM] Searching for source files
[Info  - 9:27:35 AM] Found 1 source file
[Info  - 9:27:35 AM] Background analysis(1) root directory: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist
[Info  - 9:27:35 AM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setImportResolver
Background analysis message: ensurePartialStubPackages
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
[FG] parsing: /home/jonase/demo/lru-cache-self-missing.py (27ms)
[FG] parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (89ms)
[FG] binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi (50ms)
[FG] binding: /home/jonase/demo/lru-cache-self-missing.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/jonase/demo/lru-cache-self-missing.py ...
[BG(1)]   parsing: /home/jonase/demo/lru-cache-self-missing.py (29ms)
[BG(1)]   parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (99ms)
[BG(1)]   binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/builtins.pyi (40ms)
[BG(1)]   binding: /home/jonase/demo/lru-cache-self-missing.py (1ms)
[BG(1)]   checking: /home/jonase/demo/lru-cache-self-missing.py ...
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 2ms] (29ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing.pyi (18ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 1ms] (13ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 1ms] (3ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/typing_extensions.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 1ms] (3ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/abc.pyi (1ms)
[BG(1)]     parsing: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/functools.pyi [fs read 2ms] (6ms)
[BG(1)]     binding: /home/jonase/.vscode-server/extensions/ms-python.vscode-pylance-2021.11.2/dist/typeshed-fallback/stdlib/functools.pyi (2ms)
[BG(1)]   checking: /home/jonase/demo/lru-cache-self-missing.py (123ms)
[BG(1)] analyzing: /home/jonase/demo/lru-cache-self-missing.py (295ms)
Background analysis message: resumeAnalysis

Code Snippet / Additional information
The following code should not show type errors when running with basic type check:
import functools

class Config:
    @functools.lru_cache(maxsize=None)
    def foo(self):
        return "foo"

if __name__ == "__main__":
    Config().foo()

This is due to a recent change to the typeshed stub file for functools. It looks like the typeshed maintainers may revert the change. See https://github.com/python/typeshed/issues/6347 for additional details.

The change that caused this regression has been reverted in typeshed, and I've incorporated the fix. So this problem should be addressed in the next release of pylance.

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

authors: bschnurr erictraut jonasehrlich

repo: microsoft/pylance-release


text:
Pylance infers types of zip objects wrongly / needlessly unspecific

 Environment data

Language Server version: 2021.12.0
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda): Python 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 15:37:01) [MSC v.1916 64 bit (AMD64)] on win32
python.analysis.indexing: undefined
python.analysis.typeCheckingMode: basic

 Expected behaviour
I have a number of pairs (tuples) all of the same known type -- say tuple[int, str] -- that I pass as arguments to the zip function. Since this function merges elements from all tuples together, the type of the output is precisely known -- it should be tuple[tuple[int, ...], tuple[str, ...]]:
ints_and_strs = tuple((i, str(i)) for i in range(5))

zipped = tuple(zip(*ints_and_strs))

ints, strs = zip(*ints_and_strs)

Here, zipped has type tuple[tuple[int, ...], tuple[str, ...]], ints has type tuple[int, ...] and strs has type tuple[str, ...].
 Actual behaviour
The inferred type of the zip is tuple[tuple[int | str], ...] (i.e. a tuple of union types), which is less specific than expected. By the type inference rules for tuples, the inferred type of a tuple's element should be as specific as possible.
ints_and_strs = tuple((i, str(i)) for i in range(5))

# Expected types are tuple[int, ...] and tuple[str, ...]
# Inferred types are both tuple[int | str]
ints, strs = zip(*ints_and_strs)

If the zip object is unpacked, the inferred types are not imprecise but actually wrong: the inferred types of ints and strs in the code example above are both tuple[int | str] (tuples of length 1) when the actual tuples are clearly of length 5.
This seems to be an issue only in the case that the arguments to zip each have elements of several different types -- it works if the arguments to zip are homogeneous tuples:
tuple_of_ints = tuple(range(5))  # inferred type: tuple[int, ...]
tuple_of_strs = tuple(str(i) for i in range(5))  # inferred type: tuple[str, ...]

y = tuple(zip(tuple_of_ints, tuple_of_strs))  # inferred type is tuple[tuple[int, str], ...] -- correct

 Code Snippet / Additional information
ints_and_strs = tuple((i, str(i)) for i in range(5))  # inferred type is tuple[tuple[int, str], ...] -- correct

# Expected type of `zipped`: tuple[tuple[int, ...], tuple[str, ...]]
zipped = tuple(zip(*ints_and_strs))  # inferred type is tuple[tuple[int | str], ...] -- incorrect

# Expected types should be tuple[int, ...] and tuple[str, ...]
# Inferred types are both tuple[int | str], which is wrong
ints, strs = zip(*ints_and_strs)

# It's unrelated to the * operator: the following does not work either
t0 = ints_and_strs[0]  # inferred type is tuple[int, str] -- correct
t1 = ints_and_strs[1]  # inferred type is tuple[int, str] -- correct

fixed_zipped = tuple(zip(t0, t1))  # inferred type is again tuple[tuple[int|str, int|str], ...]

The "type inference rules for tuples" apply only to tuple statements such as (1, ) or (x, y, z). Your sample doesn't contain any tuple statements, so these inference rules don't apply here. Your sample uses function calls (to the tuple constructor, the zip call, etc.), so Pylance is applying the normal type rules for functions. These rules are dictated by PEP 484.
If you select zip and choose Go To Definition, you will see how it is defined in builtins.pyi. It uses Iterable parameter types. The type tuple[int, str] is a subtype of Iterable[int | str]. That's why you're seeing these results. The positional nature tuple elements is lost because of the Iterable.
Unfortunately, I don't see much that can be done here. Perhaps the zip type definitions in the typeshed stub could be expanded to include overloads specifically for tuples, but that's something you'd need to discuss with the maintainers of typeshed.

I see your point, thank you for the detailed explanation.
To me at least it is far from obvious how a zip overload for generic tuples would be expressed in the current typing syntax (and adding different overloads for several tuple types and numbers of arguments to zip seems very wasteful). This feels like it would be better solved by an extension to the type inference logic itself.
For posterity: explicitly typecasting e.g. ints = typing.cast(tuple[int, ...], ints) makes both pylance and me happy:)

authors: erictraut from-nowhere


text:
Pylance typing error for type union of str and dict in list

 Environment data

Language Server version: 2022.6.10
OS and version: darwin arm64
Python version (and distribution if applicable, e.g. Anaconda): Python 3.10.5, miniconda
python.analysis.indexing: false (setting to true gives a lot more output in the log file, but does not change the problem)
python.analysis.typeCheckingMode: basic

 Code Snippet

x: list[str | dict]

x2 = ["a"]

x = x2

 Repro Steps

Ensure that the Pylance server is running and checking the code snippet.
 Expected behavior
No Pylance typing problems.
Also because the following code does not give any typing problems:
x: list[str | dict]

x = ["a"]

 Actual behavior
Pylance gives a reportGeneralTypeIssues error:
Expression of type "list[str]" cannot be assigned to declared type "list[str | dict[Unknown, Unknown]]"
  TypeVar "_T@list" is invariant
    Type "str" cannot be assigned to type "str | dict[Unknown, Unknown]"
      "str" is incompatible with "dict[Unknown, Unknown]"
 Logs

[Info  - 4:38:49 PM] (20766) Pylance language server 2022.6.10 (pyright bbc42826) starting
[Info  - 4:38:49 PM] (20766) Server root directory: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist
Notebook support: Legacy
[Info  - 4:38:49 PM] (20766) No configuration file found.
[Info  - 4:38:49 PM] (20766) No pyproject.toml file found.
[Info  - 4:38:49 PM] (20766) Setting pythonPath for service "xtst": "/Users/dvbeek/opt/miniconda3/bin/python"
[Warn  - 4:38:49 PM] (20766) stubPath /Users/dvbeek/xtst/typings is not a valid directory.
[Info  - 4:38:49 PM] (20766) Assuming Python version 3.10
[Info  - 4:38:49 PM] (20766) Assuming Python platform Darwin
[Info  - 4:38:50 PM] (20766) Search paths for /Users/dvbeek/xtst
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/xtst
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/xtst/typings
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stubs/...
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/bundled/stubs
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/opt/miniconda3/lib/python3.10
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/opt/miniconda3/lib/python3.10/lib-dynload
[Info  - 4:38:50 PM] (20766)   /Users/dvbeek/opt/miniconda3/lib/python3.10/site-packages
[Info  - 4:38:50 PM] (20766) Adding fs watcher for library directories:
 /Users/dvbeek/opt/miniconda3/lib/python3.10
/Users/dvbeek/opt/miniconda3/lib/python3.10/lib-dynload
/Users/dvbeek/opt/miniconda3/lib/python3.10/site-packages
[Info  - 4:38:50 PM] (20766) Adding fs watcher for directories:
 /Users/dvbeek/xtst
[Info  - 4:38:50 PM] (20766) Searching for source files
[Info  - 4:38:50 PM] (20766) Found 1 source file
(20766) [IDX(FG)] index libraries /Users/dvbeek/xtst (index) ...
(20766) [IDX(FG)]   read stdlib indices (8ms)
(20766) [IDX(FG)] index libraries /Users/dvbeek/xtst (index) [succeed] (9ms)
[Info  - 4:38:50 PM] (20766) Background analysis(1) root directory: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist
[Info  - 4:38:50 PM] (20766) Background analysis(1) started
(20766) Background analysis message: setConfigOptions
(20766) Background analysis message: setImportResolver
(20766) Background analysis message: ensurePartialStubPackages
(20766) Background analysis message: setTrackedFiles
(20766) Background analysis message: markAllFilesDirty
(20766) Background analysis message: setFileOpened
(20766) Background analysis message: getSemanticTokens full
(20766) [BG(1)] getSemanticTokens full at /Users/dvbeek/xtst/tst.py ...
(20766) [BG(1)]   parsing: /Users/dvbeek/xtst/tst.py (8ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (36ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/builtins.pyi (15ms)
(20766) [BG(1)]   binding: /Users/dvbeek/xtst/tst.py (1ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/typing_extensions.pyi [fs read 1ms] (3ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/typing_extensions.pyi (1ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (10ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/typing.pyi (3ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 1ms] (4ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/types.pyi [fs read 0ms] (3ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/types.pyi (2ms)
(20766) [BG(1)]   parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (0ms)
(20766) [BG(1)]   binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/abc.pyi (1ms)
(20766) [BG(1)] getSemanticTokens full at /Users/dvbeek/xtst/tst.py (103ms)
(20766) Background analysis message: analyze
(20766) [BG(1)] analyzing: /Users/dvbeek/xtst/tst.py ...
(20766) [BG(1)]   checking: /Users/dvbeek/xtst/tst.py (3ms)
(20766) [BG(1)] analyzing: /Users/dvbeek/xtst/tst.py (3ms)
(20766) Background analysis message: resumeAnalysis
(20766) [FG] parsing: /Users/dvbeek/xtst/tst.py (9ms)
(20766) [FG] parsing: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (38ms)
(20766) [FG] binding: /Users/dvbeek/.vscode/extensions/ms-python.vscode-pylance-2022.6.10/dist/typeshed-fallback/stdlib/builtins.pyi (17ms)
(20766) [FG] binding: /Users/dvbeek/xtst/tst.py (0ms)

Please reopen if the suggestion above does not resolve the issue.

For additional details, you might find this pyright documentation to be helpful. (Pyright is the type checker upon which Pylance is built.)

Thanks for the extremely useful tip! I have only read the first part, but now really understand the rationale behind the fact that list[T] is invariant. Extremely well explained and lots of useful info.

authors: davbeek erictraut judej


text:
Better Keyboard Shortcut support

Proposal: Better Keyboard Shortcut support

Summary

Although supportKeyboard allows for implementing handling of keyboard shortcuts on a React Native Windows app, it seems that the XAML platform has good support for handling keyboard shortcuts through UIElement's KeyboardAccelerators property. We could potentially use it to expose a KeyboardShortcut prop (and similarly an AccessKey prop) on a Touchable, or use XAML's commanding system to have React Native support implementing keyboard shortcuts directly. This would save each app from implementing their own shortcut handling system by using supportKeyboard.
Motivation

Keyboard shortcuts are important to expose so that people can efficiently traverse an app. We also find supporting shortcuts important for keyboard accessibility of the app. The React Native Windows platform has a way to implement keyboard shortcuts by using the supportKeyboard API, but using supportKeyboard for implementing keyboard shortcuts puts a lot of onus on the app developer to make their own keyboard shortcut handling system and to get it right. Each app developer would have to figure out the best place to listen for key events, how to determine when shortcuts were pressed, how to know if a command should be handled based on app state, and implement that system themselves. The platform could make this system easier to implement by removing the need to do those things, and would also encourage keyboard shortcut implementation if it's made a prop on a particular component.
Another point to consider is that supportKeyboard relies on PreviewKeyDown and PreviewKeyUp, which fires based on focus placement, while keyboard shortcuts tend to be global (i.e. if you press the right keys, the event fires regardless of where focus is), which is a difference in behavior of the systems. While it’s possible to make it look like shortcuts are global if by using supportKeyboard, the developer may have to take extra steps managing focus or building native modules and having to explore and consider several solutions to make it happen because supportKeyboard relies on focus. If we hooked into the platform’s system directly, we could avoid these issues and differences in model.
This change should be considered for Windows first, as Windows is the first React Native platform that is heavily keyboard-focused.
Basic example
For example it might look like:
<TouchableHighlight
…
keyboardShortcut={keys: ‘[‘Control’, ‘N’], isEnabled: this.props.newEventButtonEnabled}
onPress={this.props.onNewEventButtonPressed}
…
/>

If the keyboard shortcut is invoked, it could fire the onPress callback
Open Questions

Does it make sense to support keyboard shortcuts specifically given that supportKeyboard can be used to implement keyboard shortcuts?
How would we handle key differences on different endpoints?
Is UIElement's KeyboardAccelerators property the best API to use for implementing this on Windows?

We believe shortcut keys can be enabled through key events and will be providing a sample to show how that is accomplished.
We are punting on the below features for now:

AccessKey/KeyTips - UI affordances for what the shortcut key is
KeyboardAccelerator

Any chance that sample exists yet?
We're working on a new app that will ideally heavily embrace shortcuts, at this stage I'm guessing we'll need to write a native module?
For example, we don't expect the user to be focused on an element for this to work, but instead will react based on active window.

authors: harinikmsft jbcullis rurikoaraki

repo: microsoft/react-native-windows-samples


text:
maabdin/imputation

This PR includes the following additions of the maabdin/imputation branch:

2 new imputation methods: IterativeDataImputer and KNNDataImputer (in addition to the existing BasicImputer pre-implemented).

IterativeDataImputer:

Description: This method imputes missing data of a feature using the other features. It uses a round-robin method of modeling each feature with missing values to be imputed as a function of the other features. This subclass uses the sklearn.impute.IterativeImputer class in the background.
Includes the capability of imputing categorical data by using encoding/decoding through the enable_encoder boolean param.
Added components: main class, doc-string/readthedocs documentation, module tutorial notebook and pytests.

KNNDataImputer:

Description: This method imputes missing data of a feature using k-nearest neighbours. A feature's missing values are imputed using the mean value from k-nearest neighbors in the dataset. Two samples are close if the features that neither is missing are close. This subclass uses the sklearn.impute.KNNImputer class in the background.
Includes the capability of imputing categorical data by using encoding/decoding through the enable_encoder boolean param.
Added components: main class, doc-string/readthedocs documentation, module tutorial notebook and pytests.

Updated all 3 imputers to automatically detect columns to impute (when col_impute=None) not only at fit time but also at transform time, as the dataset used at either instances could be different.

Other minor code changes to accommodate these additions.

I ran Pytest with your latest commit and got 2 errors, as shown in the images below:

authors: marah-abdin mrfmendonca


text:
Add UI test for output label name in counterfactual flyout

Description
Adding UI test for the code change in https://github.com/microsoft/responsible-ai-toolbox/pull/1353.
Areas changed

npm packages changed:

[ ] responsibleai/causality
[ ] responsibleai/core-ui
[ ] responsibleai/counterfactuals
[ ] responsibleai/dataset-explorer
[ ] responsibleai/fairness
[ ] responsibleai/interpret
[ ] responsibleai/localization
[ ] responsibleai/mlchartlib
[ ] responsibleai/model-assessment

Python packages changed:

[ ] erroranalysis
[ ] raiutils
[ ] raiwidgets
[ ] rai_core_flask
[ ] responsibleai

Tests

[ ] No new tests required.
[x] New tests for the added feature are part of this PR.
[ ] I validated the changes manually.

Screenshots (if appropriate):
Documentation:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Codecov Report

Merging #1358 (ebdbb7f) into main (af01ef4) will increase coverage by 10.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             main     #1358       +/-   ##
============================================
+ Coverage   89.94%   100.00%   +10.05%
============================================
  Files          80         8       -72
  Lines        3461        64     -3397
============================================
- Hits         3113        64     -3049
+ Misses        348         0      -348

Flag
Coverage Δ

unittests
100.00% <ø> (+10.05%)
:arrow_up:

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

Impacted Files
Coverage Δ

responsibleai/responsibleai/_managers/__init__.py

...erroranalysis/_internal/error_analyzer/__init__.py

...bleai/responsibleai/_managers/explainer_manager.py

...core_flask/rai_core_flask/environments/__init__.py

erroranalysis/erroranalysis/analyzer/__init__.py

responsibleai/responsibleai/_data_validations.py

...i_core_flask/environments/public_vm_environment.py

...onsibleai/responsibleai/managers/causal_manager.py

...ponsibleai/responsibleai/_tools/causal/__init__.py

...is/erroranalysis/_internal/surrogate_error_tree.py

... and 62 more

Continue to review full report at Codecov.

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

authors: codecov-commenter gaugup

repo: microsoft/responsible-ai-toolbox


text:
disable zoom

Signed-off-by: Ke Xu xuke@microsoft.com

built this PR locally, the labels seems to be broken:

also the tree seems really small, the text is hard to see.  Maybe in error analysis app we should keep zoom, and only disable in model assessment dashboard?

repo: microsoft/responsible-ai-widgets


text:
[align-deps] Update react-native-svg min versions

Referencing react-native-svg's supported versions, updating some values here.
I'm on RN 0.72 for example and react-native-svg 15.4.0 works fine for me, but align-deps tells me I need to be using ^13.14.0

@microsoft-github-policy-service agree

Maybe I was wrong. Having some Android build issues on CI after upgrading react-native-svg. Will revisit if necessary.

repo: microsoft/rnx-kit


text:
Deploying the infra-as-code template requires the OpenAI resource to be in the same resource group as the App Service

Is your feature request related to this sample app, or to an Azure service, such as Azure OpenAI or Azure AI Search?
Feature related to Deploy to a new web app... from Azure OpenAI Studio (oai.azure.com)
Is your feature request related to a problem? Please describe.
The template currently requires the Azure OpenAI resource to be in the same resource group as the App Service.
Describe the solution you'd like
Request is for the template to support using an existing Azure OpenAI resource that's in a different resource group.
Additional context
To be clear, this is what I tried to do:

Existing OpenAI resource in a different RG
Create an RG for AI Search. This RG contains the storage and AI search service
Deploy to a new web app in this AI Search RG
Got this error, so I assume the template currently requires the OpenAI service to be in the same RG

Workaround:

Create a temporary Azure OpenAI resource in the same RG and use that.
Change the App Service environment variables to point to the existing Azure OpenAI service
Delete the temporary Azure OpenAI resource

repo: microsoft/sample-app-aoai-chatGPT


text:
Introduce Workflow Knowledge to Plugins

Today, plugins are collections of functions that perform atomic actions. This design is beneficial as it exposes the Large Language Model (LLM) to a variety of specific actions it can perform. However, when these atomic actions are highly domain-specific, the LLM may not be fully aware of the typical sequence in which these actions should be executed.
Example Scenario
Consider a plugin designed to manage database entries with the following functions:

Add_Entry
Update_Entry
Delete_Entry
Open_Transaction
Close_Transaction

To add an entry to a database, the typical sequence of functions would be:

Open_Transaction
Add_Entry
Close_Transaction

Currently, if you ask the LLM to add an entry to the database, it might directly call the Add_Entry function without executing the necessary Open_Transaction and Close_Transaction steps. This indicates that the LLM lacks awareness of the domain-specific workflow that should be followed when interacting with a database.
Proposed Solution
From a plugin authoring perspective, there should be a way for plugin authors to specify workflows that involve the functions they have defined. This would enable the LLM to understand and execute the correct sequence of actions for domain-specific tasks.
Benefits

Improved Accuracy: Ensures that the LLM follows the correct sequence of actions for domain-specific tasks.
Enhanced Usability: Allows plugin authors to define and enforce workflows, making it easier for users to perform complex operations without needing to understand the underlying sequence of functions.
Flexibility: Provides a framework for handling domain-specific workflows, which can be applied to various use cases beyond just database operations.

Notes
While the database example provided could be implemented such that the Add_Entry function internally handles transaction management, the larger point is about the concept of "workflows." This feature would be beneficial across different domains where specific sequences of actions are necessary.
By introducing workflow knowledge to plugins, we can significantly enhance the capability and usability of LLMs in performing complex, domain-specific tasks.

Thanks. That sounds good. If you would like, I can also walk through our
use case to provide another perspective.
I am also interested in the multi-approach.
Thanks for not considering this.
Regards,
Omkar
On Fri, Jul 19, 2024 at 11:47 AM Matthew Bolaños @.***>
wrote:

We just discussed this internally, and we realize that there is likely a
need for a plugin author to generate a system prompt that can then be
injected into an agent. We'll be doing some design activities on our side
to figure out the best way of solving this.
We believe that this might be better solved with multi-agent
patterns, so we're going to tag it as such and follow back up once we've
validated our hypothesis.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/semantic-kernel/issues/7333#issuecomment-2239492628,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI6FSMUXK2AQB75CUKNFSFTZNEYJPAVCNFSM6AAAAABLBCSH56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZGQ4TENRSHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Oh boy, autocorrect messed up the reply.
I meant, Thanks for considering this feature request for design discussion!
Haha. :)
Regards,
Omkar
On Fri, Jul 19, 2024 at 1:29 PM Omkar Waghmare @.***> wrote:

Thanks. That sounds good. If you would like, I can also walk through our
use case to provide another perspective.
I am also interested in the multi-approach.
Thanks for not considering this.
Regards,
Omkar
On Fri, Jul 19, 2024 at 11:47 AM Matthew Bolaños @.***>
wrote:

We just discussed this internally, and we realize that there is likely a
need for a plugin author to generate a system prompt that can then be
injected into an agent. We'll be doing some design activities on our side
to figure out the best way of solving this.
We believe that this might be better solved with multi-agent
patterns, so we're going to tag it as such and follow back up once we've
validated our hypothesis.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/semantic-kernel/issues/7333#issuecomment-2239492628,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI6FSMUXK2AQB75CUKNFSFTZNEYJPAVCNFSM6AAAAABLBCSH56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZGQ4TENRSHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

repo: microsoft/semantic-kernel


text:
Python: Action Planner implementation

Motivation and Context

This PR is a first draft for implementation of ActionPlanner in Python. I try to follow the C# implementation as much as possible.
Fixes: #1917
Description

I have implemented ActionPlanner in the python/semantic_kernel/planning/action_planner directory. The implementation is in a file called action_planner.py and the prompt used by the planner (a replica of the prompt used in C#) is found in skprompt.txt in the same directory.
The functions good_examples, edge_case_examples and list_of_functions are used by the prompt to populate examples and list of available functions in the kernel.
After creating the plan, I parse the JSON generated by the planner by using regex matching to extract out pure JSON as implemented in #1496
Based on whether or not the planner was able to identify a function, I create a Plan instance and return it.

Here is some example code for using the planner
import logging
import semantic_kernel as sk
from semantic_kernel.planning import ActionPlanner
from semantic_kernel.connectors.ai.open_ai import (
	OpenAIChatCompletion,
	OpenAITextCompletion
)
from semantic_kernel.core_skills import (
	MathSkill,
	FileIOSkill,
	TimeSkill,
	TextSkill
)

async def main():
	kernel = sk.Kernel()
	api_key, org_id = sk.openai_settings_from_dot_env()

	kernel.add_text_completion_service("dv", OpenAITextCompletion("text-davinci-003", api_key, org_id))
	kernel.import_skill(MathSkill(), "math")
	kernel.import_skill(FileIOSkill(), "fileIO")
	kernel.import_skill(TimeSkill(), "time")
	kernel.import_skill(TextSkill(), "text")

	planner = ActionPlanner(kernel)
	ask = "What is the sum of 110 and 990?"
	plan = await planner.create_plan_async(goal=ask)
	result = await plan.invoke_async()
	print(result.result)

if __name__ == "__main__":
	import asyncio
	asyncio.run(main())

Queries

In the C# implementation, when populating the function parameters in the plan object, the plan.parameters variable is updated with the function parameters. When I did the same in python, these parameters weren't being passed onto the function in invoke_async method of the plan instance. The parameters are only being passed when I update them in the plan.state variable. This code is in line 121 of action_planner.py. What is the right way to do this?
Some skills / plugins require one of the inputs to be passed as the input variable and not in the context. How should this be handled in the planner?

OR

Issues that I faced

The text-davinci-002 text-completion model regularly output incorrectly formatted JSON with commas missing. For example{""plan"":{
""rationale"": ""The list contains a function that allows for writing to files, so the plan is to use that function to write the desired content to the file 'output.txt'."",
""function"": ""fileIO.writeAsync"",
""parameters"": {
""input"": null,
""content"": ""A brief history of computer science""
""path"": ""output.txt""
}}}

Pending Items

[ ] Create unit tests
[ ] Send the function parameters to the planner in list of available functions with/without input parameter.

Contribution Checklist

[x] The code builds clean without any errors or warnings
[x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
[ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
[ ] All unit tests pass, and I have added new tests where possible
[x] I didn't break anyone :smile:

With https://github.com/microsoft/semantic-kernel/pull/1907 merged in, we'll make sure to review this in detail this week!

@awharrison-28

Removed changes to launch.json
Added example to python/samples/kernel-syntax-examples
I was not passing arguments correctly while creating a Plan object, fixed that.
the new line at the end of python/semantic_kernel/core_skills/text_skill.py is from running pre-commit 😅

hi @Sailesh-2209 I added the planning_exception.py file from https://github.com/microsoft/semantic-kernel/pull/1916 to this for consistency and raised these exceptions where errors were logged or ValueExceptions raised. Could you take a look and see if you agree? I think it'd be good to add some basic unit tests to ensure that the methods run as expected (don't worry about integration tests, the syntax example is good for now).

The exceptions LGTM! I didn't find the time to add the tests today, will do it tomorrow.

@Sailesh-2209 https://github.com/microsoft/semantic-kernel/pull/1916 went in today, so you can likely reuse some of the unit test structures and fakes for sequential planner :)

@awharrison-28 I've started writing the unit tests. I will need some more time to finish it up. Hopefully it will be done by tomorrow.


text:
.Net: GoogleAI/VertexAI connector (mostly Gemini models)

Motivation and Context

https://github.com/microsoft/semantic-kernel/issues/4334
Description

Implementation of Google Gemini connector.
The Connector still needs implement function calls, but text generation and chat are already working.
Contribution Checklist

[x] The code builds clean without any errors or warnings
[x] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[x] All unit tests pass, and I have added new tests where possible
[x] I didn't break anyone :smile:

TODO

TextGenerationService

[x] Get text

[x] Create examples

[x] Stream text

[x] Create examples

[x] Add DI extensions
[x] Provide metada from reponse
[ ] Function calling (working currently here branch Functions)

[ ] Create examples

ChatCompletionService

[x] Get text

[x] Create examples

[x] Stream text

[x] Create examples

[x] Add DI extensions
[x] Provide metada from reponse
[ ] Function calling (working currently here branch Functions)
[ ] Pass images with prompt (postponed, gemini api currently doesn't support chat with vision model)

Others

[x] Embeddings
[x] Counting tokens (added without public service)
[x] Vertex AI implementation
[ ] Logging/Telemetry

Notes:

Token count in metadata is provided only for VertexAI, for GoogleAI is zero,
VertexAI has work-around solution in code due to lacks in preview version of vertex ai api.
Gemini chat completion currently doesn't support system message (exception is thrown)

Tested models:

GoogleAI

gemini-pro (text/chat generation/stream)
embedding-001 (embeddings)

VertexAI

gemini-pro (text/chat generation/stream)
textembedding-gecko (embeddings)

I think the connector should be called Vertex AI, as Gemini Pro is just an endpoint under the Vertex AI. Since we might also need to create an image generation endpoint which calls their model.
By the way, I'd be glad to assist.

I will consider it, curious to see what the SK crew has to say about it.
Btw. i just implemented a gemini implementation based on google cloud (vertex ai)

I've stopped working on this brunch until review. Now I'm focused on gemini/functions branch.

Hi @Krzysztof318
I pulled your branch and tried to build it but ran into the following compile errors. Maybe, I need to do some other stuff first.
I upgraded the GoogleVertexAI connector to .NET8 and made it use the Semantic Kernel packages instead of project references.
Error	CS0122	'JsonOptionsCache' is inaccessible due to its protection level	Connectors.GoogleVertexAI
Same error for other classes like HttpClientProvider, HttpHeaderValues, HttpRequest and Verify
Thanks,
Ash

Hi @Krzysztof318
I pulled your branch and tried to build it but ran into the following compile errors. Maybe, I need to do some other stuff first.
I upgraded the GoogleVertexAI connector to .NET8 and made it use the Semantic Kernel packages instead of project references.
Error CS0122 'JsonOptionsCache' is inaccessible due to its protection level Connectors.GoogleVertexAI
Same error for other classes like HttpClientProvider, HttpHeaderValues, HttpRequest and Verify
Thanks, Ash

Hi, I have not tested build with .net8 yet.  Hold off on upgrade to net8 until merge PRs #4421 and #4387. After merge this two PR I will upgrade project to net8 and c#12.
If you clone repo as is, it should build with no problem.
I'm not sure what did you do exactly but maybe you removed from Connectors.GoogleVertexAI.csproj this part:
<!-- IMPORT NUGET PACKAGE SHARED PROPERTIES -->
<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props"/>
<Import Project="$(RepoRoot)/dotnet/src/InternalUtilities/src/InternalUtilities.props"/>

This would explain the error you got.

Thanks @Krzysztof318 for the quick answer.
I got it to work :-)  after adjusting for the fact that Gemini does NOT accept system chat messages.
Great project. Thanks for building it. Off to look for an Amazon Bedrock connector.
Thanks,
Ash

@AshD

I got it to work :-) after adjusting for the fact that Gemini does NOT accept system chat messages.

I totally forgot about this, I added this to notes right now.
System message not supported exception is temporaly, I have idea for work-around this limitation in gemini.

@AshD If no one has started the amazon connector by then I can take care of it, but for now I am waiting for the new ADR to be created.

Hi @Krzysztof318  - I hacked a implementation for the Amazon connector using the Amazon AWS SDK. The code is pretty terrible but I can send it to you privately to use as a starter. The good news is that it works!

@AshD Thanks but I don't need it. I've had a preliminary look at the AWS SDK documentation and already have a rough outline of the project :)

@Krzysztof318 Feature Branch was created to accommodate your great Gemini connector contribution, please, make small PRs as you progresses in the code changes and we can review it quickly.
Suggest adding bits by bits from this PR as we can review them separately.
Thanks

@RogerBarreto thanks :) For new commits it's great news but what with this PR? It's will difficult to split its now.

@RogerBarreto
First split PR #4407

State of connector progress https://github.com/microsoft/semantic-kernel/issues/4680
First spit PR https://github.com/microsoft/semantic-kernel/pull/4407

authors: AshD Krzysztof318 RogerBarreto


text:
Python: Remove jinja2 built in helpers from custom helpers. Introduce messages custom func helper.

Motivation and Context
Jinja2 has a lot of built-in global functions, filters, and test methods. There's no need to have the overlap between those built-ins and the custom helpers we had defined.

Description
This PR:

Removes the overlap custom methods we had added so that one can use the built-in jinja2 filters, tests, and others.
Add some unit tests to exercise those built-ins, mainly to show how they can be used.
Introduces a messages custom helper function for handlebars and jinja2 which pretty prints the current chat_history.

Contribution Checklist

[X] The code builds clean without any errors or warnings
[X] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[X] All unit tests pass, and I have added new tests where possible
[X] I didn't break anyone :smile:

Python 3.8 Test Coverage Report • FileStmtsMissCoverMissingsemantic_kernel/prompt_template/utils   jinja2_system_helpers.py81298%37, 42TOTAL540799482%
Python 3.8 Unit Test Overview

Tests
Skipped
Failures
Errors
Time

1217
11 :zzz:
0 :x:
0 :fire:
26.835s :stopwatch:


text:
Fix GCC 9 error.

GCC has some aggressive warnings that can be imprecise for checking array bounds access.  This commit converts an assert to an assume to remove the warning.
I do not have GCC 9 to test this, but it follows a similar pattern to we have seen with other versions of GCC.  Should address #108.

@schrodingerzhu would you be able to test if this fixes the issues you observed in #108. I don't currently have access to the version of GCC 9.0 on my dev machine.

I have now reproduced #108 and can confirm this fixes it.

I confirm the fix.

repo: microsoft/snmalloc


text:
Simplify asserts introduced in #512.

Note that the second one was incorrect.

On second thoughts I think they are equivalent, but simpler is probably better.

Could simplify to a single static assert with ==, but the current gives more descriptive error messages

Yes, originally we just had the equality but needed the more detailed error message for debugging!


text:
Incorrect Syntax - SQL query

Describe the bug
Incorrect syntax near the keyword 'FROM'.
What happened?
Link: https://microsoftlearning.github.io/mslearn-fabric/Instructions/Labs/01-lakehouse.html
Part: Update SQL table
Step: 3
Issue:
Started running query at line 2
Incorrect syntax near the keyword 'FROM'.
Msg 156, Level 15, State 1, [Code line 2](javascript:void(0))
What did you expect to happen?
The query should have run and produced/fetched required data in the first go; required several attempts.
How would you reproduce the bug?
Link: https://microsoftlearning.github.io/mslearn-fabric/Instructions/Labs/01-lakehouse.html
Part: Update SQL table
Run the steps, error gets thrown after step 3 is tried.
Did this happen via Desktop and/or Smartphone?
No response
Operating System
Windows 11
What browsers are you seeing the problem on?
No response
Version
No response
Device
No response
What is your current role?
None
What technical topic is this bug related to?
No response
Relevant log output
Persona: Data Engineer

Logs:
Started running query at line 2
Incorrect syntax near the keyword 'FROM'.
Msg 156, Level 15, State 1, Code line 2

@Arpiiitaaa, can you re-test; I am able to query.

repo: microsoft/studentambassadors


text:
[Bug]: Teams Chef Bot Sample crashes when local debugging

Language
Javascript/Typescript
Version
latest
Description
Local debug cannot start and shows the following error:
[nodemon] 3.0.3
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): src***
[nodemon] watching extensions: ts,json
[nodemon] starting node --inspect=9239 -r ts-node/register ./src/index.ts
Debugger listening on ws://127.0.0.1:9239/xxxx
For help, see: https://nodejs.org/en/docs/inspector
TypeError: Cannot read properties of undefined (reading 'trim')
at new OpenAIModel (node_modules@microsoft\teams-ai\src\models\OpenAIModel.ts:192:55)
at Object. (\src\index.ts:84:15)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module.m._compile (node_modules\ts-node\src\index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Object.require.extensions. [as .ts] (node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Function.Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
[nodemon] app crashed - waiting for file changes before starting...
Reproduction Steps
1. Download sample in Teams Toolkit sample gallery.
2. Fill in OpenAI key.
3. Press 'F5' to start local debugging.

Hi @tecton,
Are you using a sample from Teams Toolkit? If so, please file the issue with them here instead

Hi @lilyydu,
The root cause of this bug is that azureApiKey is passed to the constructor of OpenAIModellink. While in teams-ai library, it checks 'azureApiKey' in options. In this case, azureApiKey is undefined but still executes the 'trim()' function.

Hi @tecton,
The trim is only called if the azureApiKey or azureADTokenProvider exists. If you are using OAI instead, you will need to provide the appropriate keys, and comment this section out.

Hi @lilyydu,
Yes, I mean there's a bug that trim() is called even if azureApiKey doesn't exist. I'm using OpenAI instead of Azure Open AI service, but the sample shows the error: Cannot read properties of undefined (reading 'trim'). Could you please help to fix it?

@lilyydu Commenting out Azure related lines is working. I'll create a PR to update README.

authors: lilyydu tecton

repo: microsoft/teams-ai


text:
Rename TextAttribute::IsBold to TextAttribute::IsIntense

Description of the new feature/enhancement
When we added support for controlling the rendering of the SGR 1 attribute, we referred to it as "intense", so we have options like IntenseIsBold and IntenseIsBright. However, internally we refer to SGR 1 as "bold", with the TextAttribute methods SetBold and IsBold. This results in awkward expressions like this:
https://github.com/microsoft/terminal/blob/e3aa9ff7a84cdef801591913b002a8a904168e22/src/renderer/dx/DxRenderer.cpp#L1965
It's not a big deal, but I think the code would make a lot more sense as:
useBoldFont = textAttributes.IsIntense() && renderSettings.GetRenderMode(RenderSettings::Mode::IntenseIsBold);

Similarly, when handling the IntenseIsBright mode, instead of this:
https://github.com/microsoft/terminal/blob/f605adc994c7c7cf06b0c83169b54ead62238f23/src/renderer/base/RenderSettings.cpp#L183
we'd have this:
brightenFg = attr.IsIntense() && GetRenderMode(Mode::IntenseIsBright);

Proposed technical implementation details (optional)
Rename the Bold option in the ExtendedAttributes enum to Intense, the SetBold and IsBold methods in the TextAttribute class to SetIntense and IsIntense. There will probably also be a few more variables and methods in other places that needed to be updated to match.

I find "bold" a lot easier to grasp than the more abstract term "intense", since nowadays CRT displays are kinda rare and we don't have the capability to make cathode rays more "intense". But I still find this suggestion good, because it makes things more consistent.

I find "bold" a lot easier to grasp than the more abstract term "intense"

Yeah, me too, but that is the terminology that was ultimately decided on, and I've kind of got used to it now. Whatever term we use, though, I would like it to be consistent.

Yea I'm 100% for this. Clear up the ambiguity. At least "intense" makes a person think "what does intense mean?" which will lead them to IntenseIsBright, IntenseIsBold. Go for it ☺

authors: j4james lhecker zadjii-msft

repo: microsoft/terminal


text:
Terminal Crashes with side-by-side windows in same tab after resize

Windows Terminal version
1.15.2713.0
Windows build number
10.0.22623.0
Other Software
Using Windows SSH client
Steps to reproduce

Open Terminal to default PowerShell tab
Click profiles dropdown and select a tab that runs: SSH user@hostname
Click dropdown again and alt-click on the same profile. It opens side-by-side.
Resize the window.

Crashes.
Expected Behavior
No crash :)
Actual Behavior
It crashes upon dragging the corner and resizing.

This looks like an issue on my machine. I looked at the crash message and see this:
Faulting application name: WindowsTerminal.exe, version: 1.15.2209.28003, time stamp: 0x6334cd9b
Faulting module name: NahimicOSD.dll, version: 2.2.23.0, time stamp: 0x61b7fd89
Exception code: 0xc0000005
Fault offset: 0x00000000000169a2
Faulting process id: 0x0x9304
Faulting application start time: 0x0x1D8DCD793C7D50A
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.15.2713.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\ProgramData\A-Volute\A-Volute.28054DF1F58B4\Modules\ScheduledModules\x64\NahimicOSD.dll
Report Id: c1433188-ca40-43db-bde9-6f9abc722e69
Faulting package full name: Microsoft.WindowsTerminal_1.15.2713.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App
Will also submit feedback.

Hey, we've actually seen crashes with A-Volute before! They are injecting a DLL into every application, and it seems like it is not stable.
I've gotta close this one out since it's not on our end; the best way to get support is unfortunately to go bother A-Volute. We've also done the same :smile: so we're approaching it from both angles.


text:
Windows changing "Default Terminal Application" automatically without asking.

Windows Terminal version
1.17.11461.0
Windows build number
10.0.22621.1848
Other Software
No response
Steps to reproduce
Change the Default Terminal Application in Windows terminal settings to Windows Console Host because Terminal does not support basic features from conhost yet. All my scripts are breaking and is affecting my personal and professional life.
Expected Behavior
The settings will stay unless the user changed it.
Actual Behavior
Continuing to use the computer normally and without even updating windows, without even restarting, Terminal reset the Default terminal application value to Let Windows decide.

Did you click the "Save" button after changing the default terminal?

Did you click the "Save" button after changing the default terminal?

Let me explain the timeline. Yes. I changed and saved it almost a month ago. It's been running in console host all this time.
Yesterday I opened my script it was still running in console host. Then I closed it.
But when I opened it again after a few minutes, it opened in Terminal. I was stumped and I immediately checked the settings, sure enough it defaulted to Let Windows decide.
There were no updates, no restarts, I didn't have anything else running. It was running in console host a few minutes ago and now it opened in Terminal.

The settings will stay unless the user changed it.

Hmm. We've made no changes to overwrite any user preferences here. However, if Windows detects that the terminal it should be launching no longer exists (like, it was uninstalled or the registration was damaged,) it will default to Let Windows Decide.
The registry entries in HKCU\Console\%%Startup are only modified when you Save in Terminal or dismiss the console properties dialog by pressing OK.
This is quite strange!

Indeed it is. So far this has happened on only one laptop. It is possible it got corrupted in someway. It's just strange when it was working fine just a couple of minutes ago.

I wonder if there's any way for you to run some sort of script that would listen for reg key writes, to try and find out what process is changing the HKCU\Console\%%Startup values. If you haven't hit "Save" (in the terminal), or "Ok" (in the console properties), then I don't think there's anything else that would reset that.
Unless there's something with dynamic profiles deciding to write out the settings file (and writing the defterm setting additionally). But that would also imply that the Terminal determined that the selected "default terminal app" still didn't exist, and reset it to "let windows decide".
What's the output of reg query HKCU\Console\%%Startup before and after this bug occurs/? Maybe there's a bad value in there that we're incorrectly believing is "an uninstalled app", instead of conhost.

I have since changed it back to console host and it has stayed that way till now. It hasn't happened again yet. It cou
I wanted to know if this was something intentional by Microsoft or if there are plans to replace conhost entirely and replace with terminal.

(if you do see this happen again, I'd love to see what it got changed to! This is certainly curious, but without a way to really repro this on demand, I'm not sure how to investigate more)

Additionally, if there are specific features you are missing from the console host that you'd like to see in Windows Terminal, we'd love to hear back from you.

The important feature for a lot of us is the ability to change window size and buffer. We can't currently change these on Terminal. A lot of scripts and command line programs use it, there were multiple issues about it already. They were all marked as duplicates of #5094.
#4062, #5079, #5651, #5753, #2630, #6392, #40, #6832, #7082, #7232, #7466, #7623, #7605, #8581, #8673, #9113, #11033, #12929, #13232, #13392, #13375, #13441, #13564, #13006, #13911, #13940, #14487, #14568, #14622, #15297 (I had these saved in a note some time ago.)
Since it's already clear Terminal is not going to support it, we are hoping console host would stay as an option for us. Glad to hear it will be .

(if you do see this happen again, I'd love to see what it got changed to! This is certainly curious, but without a way to really repro this on demand, I'm not sure how to investigate more)

Curious about that as well :) hopefully it was a one time thing, corrupted entries maybe.

Since it's already clear Terminal is not going to support it

Well, that's not really true now. We've got bits of a plan to have Terminal support this at least in a limited fashion (when there's only a single pane). Just need some time to do the engineering work (or for someone to help contribute the fix 😉)

While messing around on Windows 10 I came across an 'automatic' reset of the Let Windows Decide setting.  I don't know if this relates to what triggered the initial report.  Tested on Win10 21H2 and 22H2 (the latter with or without Windows Terminal installed). Don't have a Win11 system to test on. I have a console-using application with a Desktop shortcut. Right clicking the shortcut and selecting Properties shows a Properties dialog with all of the Console specific tabs.  The Options tab has the option 'Use legacy console'.  To reproduce:
1 - open Settings/developers and set default terminal option to Windows Console Host.
2 - close the settings window (reopening and checking verifies it has stayed 'set')
3 - Access the Properties menu by right clicking on the shortcut
4 - Navigate to Options, and toggle (either select or deselect) the use Legacy console option.
5 - close the Properties dialog.
6 - reopen developer Settings.  Note that terminal option has been reset to Let Windows Decide.
Repeated this on systems with and without Windows Terminal installed.  On windows 10 it seems 'let windows decide' still reverts to conhost.exe.  If this also happens on win11, I believe it's expected to chose Windows Terminal.  So it seems this could cause users to have their expected terminal switched unknowingly.  Note that if I go to the properties menu within the open application to set the Legacy property, this change does not happen.  I don't know what's different about accessing the properties from a shortcut vs from within an open application.

authors: DHowett NRJank adithya-s-sekhar lhecker zadjii-msft


text:
powershell.exe starts a new console rather than attaching to current when not elevated

Windows Terminal version
1.20.11381.0
Windows build number
10.0.22631.3593
Other Software
No response
Steps to reproduce
In non-elevated cmd.exe within WT, run: powershell.exe
Note: this repros with conhost
Expected Behavior
powershell.exe uses the current console and starts within cmd.exe
Actual Behavior
powershell.exe is spawned in a new window
Note:  if cmd.exe is elevated, then powershell.exe DOES start within the same console.  This also seems to only repro to domain joined systems and doesn't repro with a clean system in a workgroup so might be related to some GPO?

There's definitely something to the idea that it being domain-joined breaks it.
My home laptop:

my work VM:

Same Windows builds. Different results. Yikes.

I noticed this problem too. It breaks our build process since we run powershell scripts in MSBuild. Now before the execution is completed the build has already moved forwarded which ends up an empty file.

This is related to some bad InTune policies that were rolled out Microsoft-wide. Opening Terminal as an administrator works around. Tickets with Microsoft IT have been raised internally.

This is related to some bad InTune policies that were rolled out Microsoft-wide. Opening Terminal as an administrator works around. Tickets with Microsoft IT have been raised internally.

Could you provide more information about this? Our team and our services have been greatly affected by this issue, thanks!

This is related to some bad InTune policies that were rolled out Microsoft-wide. Opening Terminal as an administrator works around. Tickets with Microsoft IT have been raised internally.

Same issue here. Could you provide more information about this? Our team and our services have been greatly affected by this issue, thanks!

I don't have more information, sorry. Several of my Redmond-based coworkers were hitting this in the past 24 hours and at least two of them have a case number with MSIT. I can't refer you to the case number since Redmond is sleeping now but the issue started showing up after an Intune policy rollout. I recommend opening a case with MSIT as well.

Closing this as it appears to be Microsoft internal policy issue

authors: MichalStrehovsky SteveL-MSFT joon612 yaozhenhua zadjii-msft