text:
No attribute 'rewardplot_with'

Hi,
I have three errors to check my environment.
After I set up the dev environment, I ran the following command:
python cyberbattle/agents/baseline/run.py --training_episode_count 1 --eval_episode_count 1 --iteration_count 10 --rewardplot_width 80  --chain_size=20 --ownership_goal 1.0                                 ✘ 1

1st error. ModuleNotFoundError: No module named 'asciichartpy'
import cyberbattle
>>> Traceback (most recent call last):
  File "/home/XXX/CyberBattleSim/cyberbattle/agents/baseline/run.py", line 20, in <module>
    import asciichartpy
ModuleNotFoundError: No module named 'asciichartpy'

To solve it, I installed 'asciichartpy'.
2nd error. ModuleNotFoundError: No module named 'cyberbattle.agents.baseline'
python cyberbattle/agents/baseline/run.py --training_episode_count 1 --eval_episode_count 1 --iteration_count 10 --rewardplot_width 80  --chain_size=20 --ownership_goal 1.0

>>>

raceback (most recent call last):
  File "/home/XXX/CyberBattleSim/cyberbattle/agents/baseline/run.py", line 22, in <module>
    import cyberbattle._env.cyberbattle_env as cyberbattle_env
  File "<frozen zipimport>", line 259, in load_module
  File "/home/XXX/mambaforge/lib/python3.9/site-packages/loonshot_sim-0.1-py3.9.egg/cyberbattle/__init__.py", line 9, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/home/XXX/mambaforge/lib/python3.9/site-packages/loonshot_sim-0.1-py3.9.egg/cyberbattle/agents/__init__.py", line 9, in <module>
ModuleNotFoundError: No module named 'cyberbattle.agents.baseline'

I stored "__init__.py" in "./cyberbattle/agents/baseline".
3rd error. AttributeError: 'Namespace' object has no attribute 'rewardplot_with'
torch cuda available=False
###### DQL
Learning with: episode_count=1,iteration_count=10,ϵ=0.9,ϵ_min=0.1, ϵ_expdecay=5000,γ=0.015, lr=0.01, replaymemory=10000,
batch=512, target_update=10
  ## Episode: 1/1 'DQL' ϵ=0.9000, γ=0.015, lr=0.01, replaymemory=10000,
batch=512, target_update=10
Episode 1|Iteration 10|reward:    9.0|last_reward_at:    6|Elapsed Time: 0:00:00|####################################################################################################################################################################################################|
  Episode 1 stopped at t=10
  Breakdown [Reward/NoReward (Success rate)]
    explore-local: 1/1 (0.50)
    explore-remote: 0/5 (0.00)
    explore-connect: 0/3 (0.00)
    exploit-local: 0/0 (NaN)
    exploit-remote: 0/0 (NaN)
    exploit-connect: 0/0 (NaN)
  exploit deflected to exploration: 1
            id      status properties              local_attacks              remote_attacks
0        start       owned         []  [ScanExplorerRecentFiles]                          []
1  1_LinuxNode  discovered        NaN                       None  [ProbeWindows, ProbeLinux]
simulation ended
###### Random search
Learning with: episode_count=1,iteration_count=10,ϵ=1.0,ϵ_min=0.0,
  ## Episode: 1/1 'Random search' ϵ=1.0000,
Episode 1|Iteration 10|reward:    0.0|last_reward_at: ----|Elapsed Time: 0:00:00|####################################################################################################################################################################################################|
  Episode 1 stopped at t=10
  Breakdown [Reward/NoReward (Success rate)]
    explore-local: 0/0 (NaN)
    explore-remote: 0/10 (0.00)
    explore-connect: 0/0 (NaN)
    exploit-local: 0/0 (NaN)
    exploit-remote: 0/0 (NaN)
    exploit-connect: 0/0 (NaN)
  exploit deflected to exploration: 0
simulation ended
Episode duration -- DQN=Red, Random=Green
   10.00  ┼
Cumulative rewards -- DQN=Red, Random=Green
Traceback (most recent call last):
  File "/home/XXX/CyberBattleSim/cyberbattle/agents/baseline/run.py", line 120, in <module>
    c = p.averaged_cummulative_rewards(all_runs, args.rewardplot_with)
AttributeError: 'Namespace' object has no attribute 'rewardplot_with'

I'd be grateful if you could give me advice about these issues.
Many thanks

@snowyday Have you tried running the init.sh script to initialize your environment and install the python package dependencies?

Thanks for letting me know. I tried the init.sh.
To clarify this issue, I also tried your Docker, and got AttributeError: 'Namespace' object has no attribute 'rewardplot_with'.
docker build -t cyberbattle:1.1 .
docker run -it -v "$(pwd)":/source --rm cyberbattle:1.1 cyberbattle/agents/baseline/run.py

user ~ ❯❯❯ docker run -it -v "$(pwd)":/source --rm cyberbattle:1.1 cyberbattle/agents/baseline/run.py

torch cuda available=False
###### DQL
Learning with: episode_count=50,iteration_count=9000,ϵ=0.9,ϵ_min=0.1, ϵ_expdecay=5000,γ=0.015, lr=0.01, replaymemory=10000,

batch=512, target_update=10
  ## Episode: 1/50 'DQL' ϵ=0.9000, γ=0.015, lr=0.01, replaymemory=10000,
batch=512, target_update=10
Episode 1|Iteration 9000|reward: 1507.0|last_reward_at:  592|Elapsed Time: 0:12:19|#####################################################################################################|
  Episode 1 stopped at t=9000
  Breakdown [Reward/NoReward (Success rate)]
    explore-local: 6/1432 (0.00)
    explore-remote: 8/2343 (0.00)
    explore-connect: 4/2381 (0.00)
    exploit-local: 3/1983 (0.00)
    exploit-remote: 0/811 (0.00)
    exploit-connect: 1/28 (0.03)
  exploit deflected to exploration: 1936

Intermediate logs were skipped.
Episode 10|Iteration 9000|reward: 1507.0|last_reward_at: 1495|Elapsed Time: 0:00:11|####################################################################################################|
  Episode 10 stopped at t=9000
  Breakdown [Reward/NoReward (Success rate)]
    explore-local: 9/2214 (0.00)
    explore-remote: 8/3409 (0.00)
    explore-connect: 5/3355 (0.00)
    exploit-local: 0/0 (NaN)
    exploit-remote: 0/0 (NaN)
    exploit-connect: 0/0 (NaN)
  exploit deflected to exploration: 0
simulation ended
/root/cyberbattle/agents/baseline/plotting.py:150: RuntimeWarning:

More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).

Episode duration -- DQN=Red, Random=Green
 9000.00  ┼─────────────────────────────────────────────────
Cumulative rewards -- DQN=Red, Random=Green
Traceback (most recent call last):
  File "cyberbattle/agents/baseline/run.py", line 120, in <module>
    c = p.averaged_cummulative_rewards(all_runs, args.rewardplot_with)
AttributeError: 'Namespace' object has no attribute 'rewardplot_with'

@snowyday Did running init.sh fix the first two issues? It should since running this command should installed all the packages you are missing. In particular package asciichartpy is properly defined in /requirements.dev.txt If that's the case then I propose to close this issue. If not, could you please share the output of the init script?
As for 3., this is a typo in the README file. the argument name is rewardplot_width (and not rewardplot_with). The README file was already fixed in #49

@blumu
All issues have been resolved! Thank you for your advice.

authors: blumu snowyday

repo: microsoft/CyberBattleSim


text:
[zero3] ensure only ds params are gathered

Currently GatheredParameters has an issue that if at least one param is ds_param, it assumes that all are ds-params and fails if it's not the case during partitioning. This PR fixes this.
@samyam

This seems to trip some quality measuring tests:
=================================== FAILURES ===================================
______________________ test_tiled_forward[32-32-2-2-True] ______________________
in_splits = 2, out_splits = 2, bias = True, in_f = 32, out_f = 32

    @pytest.mark.parametrize('bias', [False, True])
    @pytest.mark.parametrize('in_splits,out_splits', [(1, 1), (2, 2)])
    @pytest.mark.parametrize('in_f,out_f', [(32, 32), (23, 29), (29, 23)])
    def test_tiled_forward(in_splits, out_splits, bias, in_f, out_f):
        base = torch.nn.Linear(in_f, out_f, bias=bias)
        test = TiledLinear(in_f,
                           out_f,
                           bias=bias,
                           init_linear=copy.deepcopy(base),
                           out_splits=out_splits,
                           in_splits=in_splits)

        inp = torch.rand(in_f)

        base_out = base(copy.deepcopy(inp))
        test_out = test(copy.deepcopy(inp))

>       assert torch.allclose(base_out, test_out, rtol=1e-4)
E       assert False
E        +  where False = <built-in method allclose of type object at 0x7f16350120a0>(tensor([ 1.9688e-01, -2.6864e-01, -3.2670e-01,  6.1141e-01, -1.9374e-01,\n         2.2040e-01,  1.5731e-01, -3.5667e-01...116e-05,  4.4132e-01, -3.2412e-01,  3.8383e-02,  6.5043e-01,\n         6.5703e-01, -2.2130e-01], grad_fn=<AddBackward0>), tensor([ 1.9688e-01, -2.6864e-01, -3.2670e-01,  6.1141e-01, -1.9374e-01,\n         2.2040e-01,  1.5731e-01, -3.5667e-01...6161e-05,  4.4132e-01, -3.2412e-01,  3.8383e-02,  6.5043e-01,\n         6.5703e-01, -2.2130e-01], grad_fn=<CatBackward>), rtol=0.0001)
E        +    where <built-in method allclose of type object at 0x7f16350120a0> = torch.allclose

tests/unit/test_zero_tiled.py:73: AssertionError

source: gharchive/pull-request

repo: microsoft/DeepSpeed

license_type: permissive

license_source: github-api


text:
[zero] _apply_to_tensors_only handle torch.Tensor subclasses

In a complex code base I run into this warning:

[WARNING] [parameter_offload.py:55:_apply_to_tensors_only] A module has unknown inputs or outputs type (<class 'torch.nn.parameter.Parameter'>) and the tensors embedded in it cannot be detected. The ZeRO-3 hooks designed to trigger before or after backward pass of the module relies on knowing the input and output tensors and therefore may not get triggered properly.

But torch.nn.parameter.Parameter is a subclass of torch.Tensor.
This PR fixes this by replacing the exact check for torch.Tensor with a more flexible check that includes its subclasses as well.
Thank you!
@tjruwase

the megatron CI failure seems to be related to a wrong numpy version - unrelated to this PR

Funny enough, I added similar code in an old PR w. @awan-10: https://github.com/microsoft/DeepSpeed/pull/2127/commits/0ec57a41f90b0c62d43b25845c2b1a2016cc20ec. The CI logs won't load anymore but I recall it was removed it due to a test failing for a strange reason we didn't understand at the time (https://github.com/microsoft/DeepSpeed/pull/2127/commits/7ef1ca8583c3d5a36431985777347db754355b6f). If all the tests pass now then that's wonderful :)

@jeffra, in:
elif isinstance(outputs, (torch.Tensor, torch.nn.parameter.Parameter)):

if i'm not mistaken torch.nn.parameter.Parameter will never be reached because it's a subclass of torch.Tensor so the first check will always succeed for an output type of either of the 2.

@jeffra, in 0ec57a4:
elif isinstance(outputs, (torch.Tensor, torch.nn.parameter.Parameter)):

if i'm not mistaken torch.nn.parameter.Parameter will never be reached because it's a subclass of torch.Tensor so the first check will always succeed for an output type of either of the 2.

I agree, I believe my old commit and yours will do the same thing. But the current code in master will only match on Tensor and not Parameter. I recall something strange happened previously when including Parameters, but hopefully it’s resolved now since it’s been almost 6mo

and if there is a problem, should it not assert and not warn and do nothing? it's so so difficult to notice these warnings - there are so many logs.

and if there is a problem with the model, should it not assert and not warn and do nothing? it's so so difficult to notice these warnings - there are so many logs.
My personal opinion is that warnings should be completely eliminated in modern software - at least in the DL software with tens of thousands of logs. If there is a problem assert, if there is no problem move along.
Also this particular warning doesn't tell user much about what to do to solve it. The wording makes sense to the designer of the deepspeed code but is not very actionable for the user reading it. IMHO. As you can see I tried to fix the warning rather than try to understand why it was triggered as I have no idea what the problem is.

It appears the test failed. I agree with you I think warnings are way too easy to get ignored and in this case also agree it's not even clear what the user should do. I think seeing as the test fails there's a bug in z3 here but not sure exactly why this triggers it.

it's FAILED unit/runtime/zero/test_zero_context.py::test_ext_param_return
 def test_ext_param_return():
        setup_serial_env()

        net = DanglingExt()

        args = SimpleNamespace(local_rank=0)
        engine, optim, _, _ = deepspeed.initialize(args=args,
                                                   model=net,
                                                   model_parameters=net.parameters(),
                                                   config=config)

        for _ in range(5):
            input = torch.rand(net.dim).to(engine.device).half()
>           loss = engine(input)

unit/runtime/zero/test_zero_context.py:315:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../unit-test-venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1194: in _call_impl
    return forward_call(*input, **kwargs)
../unit-test-venv/lib/python3.8/site-packages/deepspeed/utils/nvtx.py:11: in wrapped_fn
    return func(*args, **kwargs)
../unit-test-venv/lib/python3.8/site-packages/deepspeed/runtime/engine.py:1833: in forward
    loss = self.module(*inputs, **kwargs)
../unit-test-venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1212: in _call_impl
    result = forward_call(*input, **kwargs)
unit/runtime/zero/test_zero_context.py:293: in forward
    out = self.container(input)
../unit-test-venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1212: in _call_impl
    result = forward_call(*input, **kwargs)
unit/runtime/zero/test_zero_context.py:281: in forward
    act2, bias = self.dangler(act1)
../unit-test-venv/lib/python3.8/site-packages/torch/nn/modules/module.py:1212: in _call_impl
    result = forward_call(*input, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = DanglingAttention(
  in_features=16, out_features=16, bias=True
  (d_linear): DanglingBias(in_features=16, out_features=16, bias=True)
)
input = tensor([ 0.2150, -0.1658,  0.0734, -0.3599, -0.5244, -0.2744,  0.1663, -0.2009,
        -0.1085,  0.1218, -0.0302, -0.... 0.2286, -0.1608,  0.0660],
       device='cuda:0', dtype=torch.float16,
       grad_fn=<PostBackwardFunctionBackward>)

    def forward(self, input):
        out = super().forward(input)
        if self.return_obj:
            out_obj = self.d_linear(out)
            assert out_obj.bias.ds_status == ZeroParamStatus.AVAILABLE
            # forward the external param
            return out_obj.out, out_obj.bias
        else:
            out, bias = self.d_linear(out)
>           assert bias.ds_status == ZeroParamStatus.AVAILABLE
E           AttributeError: 'Tensor' object has no attribute 'ds_status'

Looking into nn.Linear https://pytorch.org/docs/stable/_modules/torch/nn/modules/linear.html#Linear
bias is  nn.Parameter
class Linear(Module):
[...]

    def __init__(self, in_features: int, out_features: int, bias: bool = True,
                 device=None, dtype=None) -> None:
        factory_kwargs = {'device': device, 'dtype': dtype}
        super(Linear, self).__init__()
        self.in_features = in_features
        self.out_features = out_features
        self.weight = Parameter(torch.empty((out_features, in_features), **factory_kwargs))
        if bias:
            self.bias = Parameter(torch.empty(out_features, **factory_kwargs))
        else:
            self.register_parameter('bias', None)

From a cursory look, it seems that the issue is not that the bias did not get converted into a ZeRO parameter, instead the issue seems to be that the bias returned by self.d_linear(out) is not the same object as self.d_linear.bias, and therefore a parameter of the module.
Notice the output of the print statements:
class DanglingAttention(torch.nn.Linear):
    def __init__(self, dim=16, return_obj=False):
      ....

    def forward(self, input):
        out = super().forward(input)
        if self.return_obj:
            out_obj = self.d_linear(out)
            assert out_obj.bias.ds_status == ZeroParamStatus.AVAILABLE
            # forward the external param
            return out_obj.out, out_obj.bias
        else:

          out, bias = self.d_linear(out)
          print(f"Parameter Ids: {[id(p) for p in self.d_linear.parameters()]}")
          print(f"Original vs returned bias id: {(id(self.d_linear.bias), id(bias))}")
          assert self.d_linear.bias.ds_status == ZeroParamStatus.AVAILABLE
          return out, bias

Output:
Parameter Ids: [139751043104336, 139751043104416]
Original vs returned bias id: (139751043104416, 139749617570176)

The assertion fails because bias is not the same as self.d_linear.bias. The latter is part of the module as you can see the id matches one of the parameter IDs of the module and has been converted in a ZeRO3 parameter, but the former has a different id.
Looks like python function might be making a copy of the tensor before returning it.

Thank you for the investigation, @samyam. always awesome to hear your insights!
Once we remove the recursive list/dict handling _apply_to_tensors_only can be reduced to just (pseudo-code):
if outputs is torch.Tensor:
 return functional.apply(module, backward_function, outputs)
else:
 return outputs

and this PR changes it to do that for any subclass of torch.Tensor.
and so you're saying that backward_function mutates the tensor and strips all the deepspeed paritioned tensor metadata from it.
Should it then check if it's a non-partitioned DS tensor instead?

@stas00, @samyam and I deep dived this issue and think we figured out what is going on. Samyam created a new PR from your branch and pushed it here: https://github.com/microsoft/DeepSpeed/pull/2642
It appears that the bias parameter was being registered which is good but that the returned bias was modified (thus new object id) which meant it was lost. We modified the way zero handles this case to stash the original parameter so it can be updated in the external parameters dictionary correctly.

Closing as https://github.com/microsoft/DeepSpeed/pull/2642 is covering this now

authors: jeffra samyam stas00


text:
EnvironmentMapEffect updated to support sphere and dual paraboloid environment maps

EnvironmentMapEffect supports cubic environment maps only with an optional Fresnel effect.
Here I've added support for both spherical environment maps and dual-paraboloid environment maps.

The spherical and dual-paraboloid implementations support the same Fresnel effect controls.

To keep the number of shader permutations down, I only implement per-pixel-lighting for these two new map types.

For simplicity, dual-paraboloid environment maps are 2D texture arrays with 2 entries.

Also converted the bool parameters for NormalMapEffect, EnvironmentMapEffect, and PBREffect into EffectFlags.

The PR for updating the test suite is here

Same changes for EnvioronmentMapEffect made to DX11 in this PR

license: MIT


text:
Fixes/fix click commandbar command

Type of change

[+] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Other (updates to documentation, formatting, etc.)

Description
Updates the selectors in use to find CommandBar buttons.
Actual for Wave 1 and Wave 2
Issues addressed
Resolves #1212. A recent update has caused this functionality to break.
All submissions:

[+] My code follows the code style of this project.
[ ] Do existing samples that are effected by this change still run?
[ ] I have added samples for new functionality.
[ ] I raise detailed error messages when possible.
[ ] My code does not rely on labels that have the option to be hidden.

Which browsers was this tested on?

[+] Chrome
[ ] Firefox
[ ] IE
[ ] Edge

@TYLEROL could you also merge to develop-2021ReleaseWave2 or need a separate pull request?

repo: microsoft/EasyRepro


text:
Testing for @fluid-example packages

Add End to end testing with Jest and Puppeteer.
Use clicker/dice-roller as an example.
Here are a list of remaining packages that doesn't have test.

[ ] @fluid-example/agent-scheduler
[ ] @fluid-example/badge
[ ] @fluid-example/client-ui
[ ] @fluid-example/codemirror
[ ] @fluid-example/draft-js
[ ] @fluid-example/image-collection
[ ] @fluid-example/image-gallery
[ ] @fluid-example/key-value-cache
[ ] @fluid-example/math
[ ] @fluid-example/monaco
[ ] @fluid-example/musica
[ ] @fluid-example/progress-bars
[ ] @fluid-example/prosemirror
[ ] @fluid-example/scribe
[ ] @fluid-example/search-menu
[ ] @fluid-example/simple-fluidobject-embed
[ ] @fluid-example/smde
[ ] @fluid-example/sudoku
[ ] @fluid-example/video-players
[ ] @fluid-example/webflow

Closing, as this issue seems like served its purpose.

source: gharchive/issue

authors: skylerjokiel vladsud

repo: microsoft/FluidFramework


text:
Treat Quorum delete the same as setting undefined

I had originally had delete() removing the entry entirely to clean up after the delete was approved.  However, this can result in somewhat inconsistent consensus resolution -- a "set" with referenceSequenceNumber less than the delete's acceptance would still take effect, because there'd be no trace of the sequence number when the delete was accepted to compare against.  Although the data would still be eventually consistent, I think it's preferable to have consistent resolution.
Side benefit is that it simplifies implementation somewhat, don't need a "delete" op anymore, etc.
To keep the summary from growing with "leftovers" after delete, we can safely omit deleted entries below the MSN, since these entries have no impact on the public API surface as compared to being omitted entirely.

Are there any tests that should be added/updated for these changes?

Are there any tests that should be added/updated for these changes?

Ideally yes - I've added a general test for resolving simultaneous set/delete, but it doesn't exactly test the distinction that this change resolves (passes both before and after this change).  I believe the only way this will get hit is in disconnect/reconnect scenarios (which I haven't added support for yet but is my next work item #10061).  I should be able to add a specific test for this then.

Quorum has "value1" accepted in "key"
Client A tries to set("key", "value2") but disconnects without successfully sending
Client B delete("key"), it is accepted
Client A reconnects and resubmits set("key", "value2").
Although Client A was referencing state prior to the delete, the set gets applied.

authors: ChumpChief Josmithr


text:
Inner Eye gets stuck at Evaluating Prediction Step

Hello!
I am working on the Inner Eye example with the Lung CT dataset and have been having issues in completing the run, which gets stuck in evaluating prediction.
I have attached the log file(generated from the standard output of the Inner eye) as well as the config for the lung segmentation.
(I have been able to execute Inner Eye on our small prostate dataset although the dice still need to be improved upon.- anexample of successful run)
Lung_log_05_25_2021 (1).txt
Below is LungBase.py config
`#  ------------------------------------------------------------------------------------------
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
------------------------------------------------------------------------------------------
from typing import Any, List, Optional
import pandas as pd
from InnerEye.Common.type_annotations import TupleInt3
from InnerEye.ML.config import PhotometricNormalizationMethod, SegmentationModelBase, equally_weighted_classes
from InnerEye.ML.deep_learning_config import OptimizerType
from InnerEye.ML.utils.split_dataset import DatasetSplits
class LungBase(SegmentationModelBase):
"""
Prostate radiotherapy image segmentation model.
"""
def __init__(self,
             ground_truth_ids: List[str],
             ground_truth_ids_display_names: Optional[List[str]] = None,
             colours: Optional[List[TupleInt3]] = None,
             fill_holes: Optional[List[bool]] = None,
             class_weights: Optional[List[float]] = None,
             largest_connected_component_foreground_classes: Optional[List[str]] = None,
             **kwargs: Any) -> None:
    """
    Creates a new instance of the class.
    :param ground_truth_ids: List of ground truth ids.
    :param ground_truth_ids_display_names: Optional list of ground truth id display names. If
    present then must be of the same length as ground_truth_ids.
    :param colours: Optional list of colours. If
    present then must be of the same length as ground_truth_ids.
    :param fill_holes: Optional list of fill hole flags. If
    present then must be of the same length as ground_truth_ids.
    :param class_weights: Optional list of class weights. If
    present then must be of the same length as ground_truth_ids + 1.
    :param kwargs: Additional arguments that will be passed through to the SegmentationModelBase constructor.
    """
    fg_classes = ["spinalcord", "lung_r", "lung_l", "heart", "esophagus"]
    fg_display_names = ["SpinalCord", "Lung_R", "Lung_L", "Heart", "Esophagus"]
    ground_truth_ids_display_names = ground_truth_ids_display_names or [f"zz_{name}" for name in ground_truth_ids]
    colours = colours or [(255, 0, 0)] * len(ground_truth_ids)
    fill_holes = fill_holes or [True] * len(ground_truth_ids)
    class_weights = class_weights or equally_weighted_classes(ground_truth_ids, background_weight=0.02)
    largest_connected_component_foreground_classes = largest_connected_component_foreground_classes or \
                                                     ground_truth_ids
    super().__init__(
        should_validate=False,
        adam_betas=(0.9, 0.999),
        architecture="UNet3D",
        class_weights=class_weights,
        crop_size=(32,224, 224),
        feature_channels=[32],
        ground_truth_ids=fg_classes,
        ground_truth_ids_display_names=fg_display_names,
        colours=[(255, 255, 255)] * len(fg_classes),
        fill_holes=[False] * len(fg_classes),
        image_channels=["ct"],
        inference_batch_size=1,
        inference_stride_size=(32, 224, 224), ## changed from 64,224,224 to 32,224,224 to 16,224,224 to 16,128,128
        kernel_size=3,
        l_rate=1e-3,
        min_l_rate=1e-5,
        l_rate_polynomial_gamma=0.9,
        largest_connected_component_foreground_classes=["lung_r", "lung_l", "heart"],
        level=50,
        momentum=0.9,
        monitoring_interval_seconds=0,
        norm_method=PhotometricNormalizationMethod.CtWindow,
        num_dataload_workers=2,
        num_epochs=10,
        opt_eps=1e-4,
        optimizer_type=OptimizerType.Adam,
        start_epoch=0,
        test_crop_size=(32, 224, 224), ##changed from 128,512,512 to 64,224,224 to 32,224,224
        train_batch_size=2,
        use_mixed_precision=True,
        use_model_parallel=True,
        weight_decay=1e-4,
        window=400,
        posterior_smoothing_mm=(2.0, 2.0, 3.0),
    )
    self.add_and_validate(kwargs)

def get_model_train_test_dataset_splits(self, dataset_df: pd.DataFrame) -> DatasetSplits:
    """
    Return an adjusted split
    """
    return DatasetSplits.from_proportions(dataset_df, proportion_train=0.8, proportion_val=0.05,
                                          proportion_test=0.15,
                                          random_seed=0)

`
Attached the list of packages/versions in conda environment (Miniconda)
conda_env_packges.txt
OS version here
os_version.txt
Finally I am running InnerEye interactively with a GPU on our high performance cluster with these requirements.

Thanks,
Rohan
AB#4179

git show -s
commit 88188c29adef465461aa9a35d8bcdfa10a5e14b8
Author: Anton Schwaighofer antonsc@microsoft.com
Date:   Mon Mar 15 13:33:25 2021 +0000
Upgrade to Pytorch 1.8 (#411)

Updated also `pytorch-lightning` to 1.1.8, and the AzureML libraries to 1.23

Here is the lung class(used to run training) that is derived from LungBase class.The log file will be in the github issue I created.
It's stuck at the evaluation step.
from InnerEye.ML.configs.segmentation.LungBase import LungBase
from pathlib import Path
class Lung(LungBase):
def init(self) -> None:
super().init(
image_channels=["ct"],
ground_truth_ids=["lung_r", "lung_l","spinalcord","heart","esophagus"],
architecture="UNet3D",
local_dataset=Path("[xxxxx]/software/InnerEye-DeepLearning/InnerEye/Lung"),
train_batch_size=2)

repo: microsoft/InnerEye-DeepLearning


text:
Added ability to run segmentation inference module in the test data without or partial ground truth files.

Addressing issue #459: ability to run segmentation model inference on datasets without or partial segmentation files.

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

In the file InnerEye/ML/config.py:

Line 492:80: E501 line too long (113 > 79 characters)
Line 493:80: E501 line too long (81 > 79 characters)
Line 777:80: E501 line too long (92 > 79 characters)

In the file InnerEye/ML/dataset/full_image_dataset.py:

Line 216:80: E501 line too long (82 > 79 characters)
Line 255:80: E501 line too long (118 > 79 characters)
Line 265:80: E501 line too long (88 > 79 characters)
Line 273:80: E501 line too long (110 > 79 characters)
Line 275:80: E501 line too long (107 > 79 characters)
Line 276:80: E501 line too long (107 > 79 characters)
Line 282:80: E501 line too long (116 > 79 characters)
Line 313:80: E501 line too long (99 > 79 characters)
Line 324:80: E501 line too long (116 > 79 characters)
Line 325:80: E501 line too long (85 > 79 characters)
Line 343:80: E501 line too long (120 > 79 characters)
Line 349:80: E501 line too long (115 > 79 characters)
Line 355:80: E501 line too long (109 > 79 characters)
Line 367:80: E501 line too long (93 > 79 characters)
Line 368:80: E501 line too long (107 > 79 characters)
Line 370:80: E501 line too long (107 > 79 characters)
Line 371:80: E501 line too long (114 > 79 characters)

In the file InnerEye/ML/dataset/sample.py:

Line 147:80: E501 line too long (91 > 79 characters)

In the file InnerEye/ML/metrics.py:

Line 234:80: E501 line too long (101 > 79 characters)
Line 237:80: E501 line too long (84 > 79 characters)
Line 247:80: E501 line too long (107 > 79 characters)
Line 249:80: E501 line too long (82 > 79 characters)
Line 250:80: E501 line too long (105 > 79 characters)
Line 252:80: E501 line too long (84 > 79 characters)
Line 263:80: E501 line too long (105 > 79 characters)

In the file InnerEye/ML/model_testing.py:

Line 28:80: E501 line too long (117 > 79 characters)
Line 86:80: E501 line too long (108 > 79 characters)
Line 87:80: E501 line too long (107 > 79 characters)
Line 97:80: E501 line too long (106 > 79 characters)
Line 102:80: E501 line too long (87 > 79 characters)
Line 114:80: E501 line too long (92 > 79 characters)
Line 116:80: E501 line too long (89 > 79 characters)
Line 130:80: E501 line too long (84 > 79 characters)
Line 186:80: E501 line too long (80 > 79 characters)
Line 188:80: E501 line too long (115 > 79 characters)
Line 238:80: E501 line too long (80 > 79 characters)
Line 239:80: E501 line too long (91 > 79 characters)
Line 242:80: E501 line too long (96 > 79 characters)
Line 244:80: E501 line too long (91 > 79 characters)
Line 245:80: E501 line too long (88 > 79 characters)
Line 249:80: E501 line too long (80 > 79 characters)
Line 250:80: E501 line too long (82 > 79 characters)
Line 252:80: E501 line too long (83 > 79 characters)
Line 255:80: E501 line too long (104 > 79 characters)
Line 256:80: E501 line too long (110 > 79 characters)
Line 257:80: E501 line too long (118 > 79 characters)

In the file InnerEye/ML/utils/dataset_util.py:

Line 204:80: E501 line too long (83 > 79 characters)

In the file InnerEye/ML/utils/io_util.py:

Line 415:80: E501 line too long (103 > 79 characters)
Line 416:80: E501 line too long (91 > 79 characters)
Line 423:80: E501 line too long (92 > 79 characters)
Line 436:80: E501 line too long (85 > 79 characters)
Line 439:80: E501 line too long (82 > 79 characters)
Line 441:80: E501 line too long (83 > 79 characters)
Line 444:80: E501 line too long (92 > 79 characters)
Line 448:80: E501 line too long (91 > 79 characters)
Line 449:80: E501 line too long (104 > 79 characters)
Line 450:80: E501 line too long (111 > 79 characters)
Line 523:80: E501 line too long (120 > 79 characters)

In the file InnerEye/ML/utils/metrics_util.py:

Line 39:80: E501 line too long (116 > 79 characters)
Line 66:80: E501 line too long (101 > 79 characters)
Line 72:80: E501 line too long (104 > 79 characters)
Line 81:80: E501 line too long (92 > 79 characters)
Line 90:80: E501 line too long (84 > 79 characters)
Line 91:80: E501 line too long (113 > 79 characters)
Line 121:80: E501 line too long (102 > 79 characters)

In the file Tests/ML/configs/DummyModel.py:

Line 72:80: E501 line too long (95 > 79 characters)
Line 73:80: E501 line too long (93 > 79 characters)
Line 74:80: E501 line too long (91 > 79 characters)

In the file Tests/ML/pipelines/test_inference.py:

Line 27:80: E501 line too long (114 > 79 characters)
Line 210:80: E501 line too long (112 > 79 characters)
Line 218:80: E501 line too long (97 > 79 characters)
Line 219:80: E501 line too long (82 > 79 characters)
Line 220:80: E501 line too long (80 > 79 characters)
Line 239:80: E501 line too long (113 > 79 characters)
Line 259:80: E501 line too long (90 > 79 characters)
Line 264:80: E501 line too long (90 > 79 characters)
Line 265:80: E501 line too long (92 > 79 characters)
Line 272:80: E501 line too long (97 > 79 characters)
Line 278:80: E501 line too long (80 > 79 characters)
Line 311:80: E501 line too long (97 > 79 characters)
Line 312:80: E501 line too long (99 > 79 characters)
Line 315:80: E501 line too long (90 > 79 characters)
Line 321:80: E501 line too long (90 > 79 characters)
Line 326:80: E501 line too long (87 > 79 characters)
Line 329:80: E501 line too long (99 > 79 characters)
Line 330:80: E501 line too long (101 > 79 characters)
Line 332:80: E501 line too long (96 > 79 characters)
Line 338:80: E501 line too long (81 > 79 characters)

In the file Tests/ML/test_model_testing.py:

Line 12:80: E501 line too long (92 > 79 characters)
Line 29:80: E501 line too long (102 > 79 characters)
Line 30:80: E501 line too long (109 > 79 characters)
Line 36:80: E501 line too long (96 > 79 characters)
Line 51:80: E501 line too long (96 > 79 characters)
Line 73:80: E501 line too long (143 > 79 characters)
Line 75:80: E501 line too long (116 > 79 characters)
Line 80:80: E501 line too long (92 > 79 characters)
Line 83:80: E501 line too long (88 > 79 characters)
Line 96:80: E501 line too long (118 > 79 characters)
Line 101:80: E501 line too long (92 > 79 characters)
Line 102:80: E501 line too long (92 > 79 characters)
Line 104:80: E501 line too long (88 > 79 characters)
Line 105:80: E501 line too long (80 > 79 characters)
Line 106:80: E501 line too long (84 > 79 characters)
Line 107:80: E501 line too long (98 > 79 characters)
Line 108:80: E501 line too long (82 > 79 characters)
Line 109:80: E501 line too long (96 > 79 characters)
Line 110:80: E501 line too long (113 > 79 characters)
Line 113:80: E501 line too long (136 > 79 characters)
Line 114:80: E501 line too long (136 > 79 characters)
Line 115:80: E501 line too long (134 > 79 characters)
Line 116:80: E501 line too long (134 > 79 characters)
Line 117:80: E501 line too long (140 > 79 characters)
Line 118:80: E501 line too long (140 > 79 characters)
Line 123:80: E501 line too long (112 > 79 characters)
Line 129:80: E501 line too long (91 > 79 characters)

In the file Tests/ML/util.py:

Line 199:80: E501 line too long (106 > 79 characters)
Line 203:80: E501 line too long (94 > 79 characters)
Line 209:80: E501 line too long (123 > 79 characters)
Line 213:63: W291 trailing whitespace

In the file Tests/ML/utils/test_io_util.py:

Line 88:80: E501 line too long (104 > 79 characters)
Line 93:80: E501 line too long (108 > 79 characters)
Line 97:80: E501 line too long (104 > 79 characters)


text:
Categorical Features in Booster object

Summary
Unable to find the datatypes of features used in lightgbm booster object in python.
Motivation
This would help set the datatypes more easily for validation and prediction datasets
Description
I have been working with lightgbm Booster objects by loading already saved models from filespace.  I want the process of setting the data types of the validation dataset to be more automated. At the current stage, I can't find any attribute or method that helps fetch the categorical features of the booster, but only the names of all features used.  Since if there's a mismatch in categorical features used the model would fail in predicting and raises the specific exception of mismatch, I am hoping this information is already present in the booster object, it would be only logical to expose this information.
References

Hi @MayankKr8, thank you for your interest in LightGBM. This is a known issue and is documented in #2613 and there's an ongoing effort to read the parameters from the saved booster in #4802, you can subscribe to that PR if you're interested in following the progress.

repo: microsoft/LightGBM

license: mit

license_source: bigquery


text:
Adds Test Execution Caching

Adds test execution caching when used with Microsoft.Build.RunVSTest https://github.com/microsoft/MSBuildSdks/pull/473.
If a test project is a cache hit, test execution will be skipped and a message indicating that the test was skipped is logged.
Usage:
MSBuild /restore /graph /m /nr:false /reportfileaccesses /t:"Build;Test" /p:UseMSBuildTestInfrastructure="true"
Sample output

I don't think I understand why the Test target is called out specifically, especially since the Build target isn't called out specifically today.

authors: dfederm novacole

repo: microsoft/MSBuildCache


text:
MRTK3 DictionExample doesn't re-enable keyword recognition after dictation is enabled and disabled again

Describe the bug
MRTK3 DictionExample doesn't re-enable keyword recognition after dictation is enabled
To reproduce
Steps to reproduce the behavior:

Go to MRTK3's DictionExample
Stare at "Start Dictation" button and say "Select"
Dictation service should start
Click "Stop Dictation" button
Stare at "Start Dictation" button and say "Select"
Dictation service does not start (BUG)

Expected behavior
Dictation service should start.

Fixed with

https://github.com/microsoft/MixedRealityToolkit-Unity/pull/11744

repo: microsoft/MixedRealityToolkit-Unity


text:
Fix GazeProvider.GazeTarget being null when hands are active

Overview
Several components like StabilizationPlaneModifier and apps that want to know where user is looking rely on GazeProvider.GazeTarget (and other raycast info) to be filled in even when gaze is not the primary input. The Input System had special-cased gaze provider for this reason, but wasn't actually filling in the hit data if gaze wasn't active.
This change actually fills in the hit data so that the gaze result is not null when hands / other controllers are up.
Breaking Change
If you were relying on GazeProvider.GazeTarget == null to determine if gaze input is active, you should now instead use GazeProvider.Pointer.IsInteractionEnabled.
Changes

Fixes: #5252
Added test to validate fix

/azp run

Thanks! Still lgtm.

/azp run

authors: julenka wiwei


text:
SpatialMesh Editor cleanup fix

Overview
The problem is that WindowsMixedRealitySpatialMeshObserver's CleanupObservedObjects detaches all children from observedObjectParent, if it exists and then destroys all the gameobjects using regular Destroy. This mix causes the errors and since the Editor should use DestroyImmediate anyways, this fixes it for the case of holographic remoting the Hololens and destroying generated meshes.
Changes

Fixes: #4208

since the Editor should use DestroyImmediate anyways

The editor should use DestroyImmediate for destroying things at edit time, but Destroy is preferred at runtime
https://docs.unity3d.com/ScriptReference/Object.DestroyImmediate.html

This function should only be used when writing editor code since the delayed destruction will never be invoked in edit mode. In game code you should use Object.Destroy instead.

since the Editor should use DestroyImmediate anyways

The editor should use DestroyImmediate for destroying things at edit time, but Destroy is preferred at runtime
https://docs.unity3d.com/ScriptReference/Object.DestroyImmediate.html

This function should only be used when writing editor code since the delayed destruction will never be invoked in edit mode. In game code you should use Object.Destroy instead.

haha, yeah I mixed that alright. I'll change the code to not unchilding gameobjects

/azp run

authors: Alexees davidkline-ms keveleigh


text:
Fix case where a specific controller handedness is set but only non-handed interactions exist

Overview
In many cases, handed interactions are overridden to point to the default interactions in classes that don't need different one:
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/ec3ae303cf832bc532edb57083b7edd96eaeb075/Assets/MRTK/Providers/WindowsMixedReality/XR2018/Controllers/BaseWindowsMixedRealitySource.cs#L27-L31
However, this isn't a requirement that we've previously enforced. So, this PR updates the code to double check that the handed interactions aren't null before using them. If they're null, the non-handed default interactions are used.
Changes

Fixes: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/7528

/azp run

:shipit:

authors: davidkline-ms keveleigh


text:
Add license and changelog files to the UPM packages

Per #8734, our packages were missing license and changelog files.
This change adds these files and updates the packaging process to ensure they are included.
Fixes: #8734

/azp run

Why are there .meta files for the markdown things (i.e. CHANGELOG/LICENSE/NOTICE) in the root directory

They were needed to satisfy Unity's requirement of having meta files in the packages. As @keveleigh pointed out, we should have unique metas for each copy. These files are now maintained in the root and copied to the package folders as part of the upm script.

/azp run

/azp run

/azp run

/azp run

/azp run


text:
Sandbox: Flag enum content is not displayed in 'View' mode

Description:
In the Sandbox, objects containing flag enum members do not display corresponding enum content when viewed. Only the label is displayed.
E.g. see FirewallObject flag enum member 'Profiles'
Expected behavior:
Objects in 'View' mode should display all possible enum flag values as checkboxes, defaulting to unchecked.
To Reproduce:
Steps to reproduce the behavior:

Run ASA, open GUI
Click Sandbox page
Select type that contains flag enum input, e.g. FirewallObject
Create the object
Click 'View' tab to view the object, expand its contents
See labels where flag enum inputs are not being populated, for example 'Profiles' label when viewing FirewallObject

Configuration:

ASA Application Version: v2.3.146-beta
OAT Application Version: 718b12bddf671984074aefe98e6789c4dd0c7b95

Modified FlagsInput.razor to still create checkboxes in cases where the flag enum member is null

This is probably the wrong approach.  This should be covered by the set to null checkbox already.

According to official documentation the way to check if a type is nullable is
Nullable.GetUnderlyingType(type) != null
https://docs.microsoft.com/en-us/dotnet/api/system.nullable.getunderlyingtype?view=net-5.0
However, this does not appear to work for Flag Enums, and this method will instead return null.  I've verified this behavior directly in OAT so it is not an ASA issue.  Unfortunately, it doesn't seem viable to de-nullable the Flag Enums in Attack Surface Analyzer as null is a valid value for them (some of the enums are only valid on windows systems and the flags are passed through.)

I've narrowed this problem down to only Enums that start as null.  Enums that are nullable but don't start as null now work.

authors: daalcant gfs

repo: microsoft/OAT


text:
Empty error dialog

from vsdisc:
I enabled the Python workload,
opened a folder with Python files and when I start to debug current document, looks like any of them, I get:

No matter what the problem is, this error could certainly be improved.

(likely cause being no interpreter installed)

Thanks @miloush, could you please add your repro steps?

I enabled the Python workload,

opened a folder with Python files and when I start to debug current document, looks like any of them and got the error.

no global Python installation before on the machine

authors: judej miloush

repo: microsoft/PTVS


text:
After collapsing the combo box using "Esc" key present in "Solution Explorer" search, focus does not remain/rely on the search bar: A11y_Accessibility Testing for Python in VS_Visual Studio_Solution Explorer_Keyboard

https://devdiv.visualstudio.com/DevDiv/_queries/query/?tempQueryId=5dc9c31e-c7b7-4f49-9513-c26952986538

Note: Must be addressed in 60 days to stay compliant.

Environment Details:
Application Name: Accessibility Testing for Python in VS
Edition Windows 11 Enterprise
Version 22H2
OS build 22621.3155
Windows Feature Experience Pack 1000.22684.1000.0
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.9.2
Repro Steps:
Open visual studio.
TAB till Create a new Project and press ENTER key.
Create a "project" dialog will open.
Search "Flask Web" project and select it.
TAB till next button and press ENTER key.
Configure your new project screen will open.
Provide project name.
TAB to create button and press enter.
Project will be created.
TAB till "Solution Explorer" section.
Now observe that after collapsing the combo box present in "Solution Explorer" search, focus does not remain on the search bar.
Actual:
After collapsing the combo box using "Esc" key present in "Solution Explorer" search, focus does not remain on the search bar instead the focus is going to "Solution Flask Web Project 1".
Expected:
After collapsing the combo box using "Esc" key present in "Solution Explorer" search, focus should remain on the search bar and the focus should not go to "Solution Flask Web Project 1".

The bug is in solution explorer, will transfer the work item to corresponding area path.


text:
VS 2022: Interactive window doesn't work properly

This issue has been moved from a ticket on Developer Community.

After opening the interactive window (Extra | Python | Interactive window)  I entered a simple calculation:

3+5
From now on there was no obvious reaction except the processor was busy but provided no result

Original Comments
Feedback Bot on 4/21/2024, 07:45 PM:
(private comment, text removed)

Original Solutions
(no solutions)

Thanks for reporting the issue! I am closing this issue as dupe of https://github.com/microsoft/PTVS/issues/7868, please check the linked issue for progress. Thanks!


text:
Have I Been Pwned (Independent Publisher) v1.3 Plugin

When submitting a connector, please make sure that you follow the requirements below, otherwise your PR might be rejected. We want to make you have a well-built connector, a smooth certification experience, and your users are happy :)
If this is your first time submitting to GitHub and you need some help, please sign up for this session.

[ ] I attest that the connector doesn't exist on the Power Platform today. I've verified by checking the pull requests in GitHub and by searching for the connector on the platform or in the documentation.
[ ] I attest that the connector works and I verified by deploying and testing all the operations.
[ ] I attest that I have added detailed descriptions for all operations and parameters in the swagger file.
[ ] I attest that I have added response schemas to my actions, unless the response schema is dynamic.
[ ] I validated the swagger file, apiDefinition.swagger.json, by running paconn validate command.
[ ] If this is a certified connector, I confirm that apiProperties.json has a valid brand color and doesn't use an invalid brand color, #007ee5 or #ffffff. If this is an independent publisher connector, I confirm that I am not submitting a connector icon.

If you are an Independent Publisher, you must also attest to the following to ensure a smooth publishing process:

[ ] I have named this PR after the pattern of "Connector Name (Independent Publisher)" ex: HubSpot Marketing (Independent Publisher)
[ ] Within this PR markdown file, I have pasted screenshots that show: 3 unique operations (actions/triggers) working within a Flow. This can be in one flow or part of multiple flows. For each one of those flows, I have pasted in screenshots of the Flow succeeding.
[ ] Within this PR markdown file, I have pasted in a screenshot from the Test operations section within the Custom Connector UI.
[ ] If the connector uses OAuth, I have provided detailed steps on how to create an app in the readme.md.

[[certify-connector]]

Hello @troystaylor ,
I hope you are doing well.
Congratulations, the deployment of your connector and documentation page was already completed, We have a short survey on the connector certification process that we would like for you to complete. Your feedback is appreciated and will help us improve the program.
Thank you very much for working with us.

authors: troystaylor vmanoharas

repo: microsoft/PowerPlatformConnectors


text:
[PT-RUN] not finding folders in PT RUN

Microsoft PowerToys version
0.37
Running as admin

[X] Yes

Area(s) with issue?
PowerToys Run
Steps to reproduce
Powertoys RUN don't find my folders even if they are indexed in the windows search
✔ Expected Behavior
finding my folders
❌ Actual Behavior
Don't find them
Other Software
Windows : 10.0.19041.906
PowerToysReport_2021-05-06-00-29-08.zip

After a reboot of the OS and the PT it work again ....
sorry for disturbing you
good luck

repo: microsoft/PowerToys


text:
Something went wrong during updating

Microsoft PowerToys version
0.41.4.0
Running as admin

[X] Yes

Area(s) with issue?
Installer
Steps to reproduce
Version: 0.41.4.0
OS Version: Microsoft Windows NT 10.0.18363.0
IntPtr Length: 8
x64: True
Date: 05.07.2021 08:45:25
Exception:
System.UnauthorizedAccessException: Access to the registry key 'HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID{dd5cacda-7c2e-4997-a62a-04a597b58f76}\LocalServer32' is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternalCore(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
at Microsoft.Toolkit.Uwp.Notifications.DesktopNotificationManagerCompat.RegisterComServer[T](String exePath)
at Microsoft.Toolkit.Uwp.Notifications.DesktopNotificationManagerCompat.RegisterAumidAndComServer[T](String aumid)
at Wox.PublicAPIInstance..ctor(SettingWindowViewModel settingsVM, MainViewModel mainVM, ThemeManager themeManager)
at PowerLauncher.App.<>c__DisplayClass13_0.b__0()
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
✔ Expected Behavior
Updating software
❌ Actual Behavior
"Something went wrong."
Other Software
No response

The error happens already on the stage where newly installed PT Run is launched. On startup, it tries to register toast notification via registry (see PublicAPIInstance ctor) but gets access denied error to HKCU key.
Judging from the callstack, that happened in Microsoft.Toolkit.Uwp library, and 'HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID{dd5cacda-7c2e-4997-a62a-04a597b58f76}\LocalServer32' seems to miss \ after CLSID.
To verify that whether it's an installation issue, @1v4r, could you please open regedit and go to 'HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{dd5cacda-7c2e-4997-a62a-04a597b58f76}\LocalServer32' and check whether you have Allow checked for both Full Control and Read there.
@mykhailopylyp perhaps we've updated Microsoft.Toolkit.Uwp recently which now has this bug?

perhaps we've updated Microsoft.Toolkit.Uwp recently which now has this bug?

We had this issue reported for previous versions so don't think it's a case

Looks like duplicate of https://github.com/microsoft/PowerToys/issues/11216

authors: 1v4r mykhailopylyp yuyoyuppe


text:
FancyZones doesn't work after a reboot.  I need to disable it and enable it every time.

Microsoft PowerToys version
0.47.1
Running as admin

[ ] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
Reboot Windows.  PowerToys is running, and FancyZones is turned on, but its not working.  I have to disable FancyZones and enable it again for it to work
✔ Expected Behavior
FancyZones should work after a reboot of Windows.
❌ Actual Behavior
FancyZones doens't work after a reboot of Windows, even though its on and enabled.
Other Software
Windows build 22000.282, Experience Pack 1000.22000.282.0

Duplicate of #13214

Thanks for reporting this. This issue is a duplicate. We'll track this in #13124 to centralize the discussion thread.


text:
Any keyboard shortcut with WinKey + Alt does not work.

Microsoft PowerToys version
0.51.0
Running as admin

[x] Yes

Area(s) with issue?
Video Conference Mute
Steps to reproduce
Change "Mute camera & microphone" shortcut to Windows + Alt + K on Windows 10, then try it. That K can be any other keys, for example J.
✔ Expected Behavior
The keyboard shortcut should work and the microphone and camera are muted.
❌ Actual Behavior
In fact it didn't.
Other Software
No response

Duplicate of #13214

how is this a dup of #13214?

how is this a dup of #13214?

@crutkas Pasting to a wrong tab, undoed.

Thanks for the feedback but VCM is moving to maintenance only in the 0.67 timeframe. Our team will only directly address critical bugs, security and accessibility issues.
We'll accept community PRs for enhancements.

authors: crutkas franky920920 tommyvct


text:
[FZ Editor] Display scale factor

Description of the new feature / enhancement
We see from time to time confusion on why we show a screen resolution that isn't what a user is expecting.  This is due to DPI / scale factor.
Lets add it in so people know.  https://github.com/microsoft/PowerToys/issues/11751 is a great example
Scenario when this would be used?
clarity to end user
Supporting information
No response

Couldn't agree more. Not just show the scaling factor, but revert to actual pixels too.

You aren’t using actual pixels if it is scaled.

You aren’t using actual pixels if it is scaled.

Sure it does. A window/element just uses more of them. The actual resolution does not change. I suggest to show both: 1920 × 1080 @ 100% or 2736 × 1834 @ 200% for example.
Changing the dpi setting is not the same as changing the screen resolution. With dpi scaling, the number of physical pixels on the screen remains the same. However, scaling is applied to the size and location of UI elements. This scaling can be performed automatically by the DWM for the desktop and for applications that do not explicitly ask not to be scaled.
In effect, when the user sets the scale factor to 120 dpi, a vertical or horizontal inch on the screen becomes bigger by 25 percent. All dimensions are scaled accordingly. The offset of an application window from the top edge and left edge of the screen increases by 25 percent. If application scaling is enabled and the application is not dpi-aware, the size of the window increases in the same proportion, along with the offsets and sizes of all UI elements it contains.

/dup #9406

authors: Jay-o-Way crutkas


text:
PowerToys Run - Cursor

Microsoft PowerToys version
0.55.1
Running as admin

[X] Yes

Area(s) with issue?
PowerToys Run
Steps to reproduce

my shortcut to open PowerToys Run = ctrl + space
cursor  is not in the box to start typing. I need to click on the box.

This doesnt happen everytime, but often. I have to cancel and do it again or click in the box.
✔ Expected Behavior
Should be able to type right after PowerToys Run prompt to me.
❌ Actual Behavior
Does not automatically allow me to start typing what im looking for.
Other Software
No response

This happens if your focus was on taskbar, startmenu, notification area or other shell elements before.
It's a known behavior we unfortunately can't fix.

/dup #13643

authors: crutkas htcfreek vivianid


text:
[PTRun][WindowWalker] Fails for computers where no Virtual Desktops have been created.

Microsoft PowerToys version
0.57.0-pre
Running as admin

[ ] Yes

Area(s) with issue?
PowerToys Run
Steps to reproduce
Start PowerToys Run in computers where no Virtual Desktops have been created yet, there's no registry key for the Virtual Desktops.
Window Walker is running into an error and not starting in these cases.
This is the current state building from main, likely after https://github.com/microsoft/PowerToys/pull/16325
In order to simulate a PC that has never created Virtual desktops, remove these keys from the registry:

CurrentVirtualDesktop from \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\VirtualDesktops
VirtualDesktopIDs from \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops

✔ Expected Behavior
PowerToys Run starts normally.
❌ Actual Behavior
This message is shown:

This gets added to the PowerToys Run logs.
[2022-03-08 19:53:32.5499] [ERROR] [C:\a\_work\1\s\src\modules\launcher\Wox.Plugin\Common\VirtualDesktop\VirtualDesktopHelper.cs::104]
Failed to read the list of existing desktops form registry.

[2022-03-08 19:53:32.5712] [ERROR] [C:\a\_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::177]
-------------------------- Begin exception --------------------------
Message: Can't create instance for <Window Walker> in C:\Program Files\PowerToys\modules\launcher\Plugins\WindowWalker\Microsoft.Plugin.WindowWalker.dll

Exception full name  : System.Reflection.TargetInvocationException
Exception message    : Exception has been thrown by the target of an invocation.
Exception stack trace:
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type)
   at Wox.Plugin.PluginPair.CreatePluginInstance()
Exception source     : System.Private.CoreLib
Exception target site: System.Object CreateInstanceDefaultCtor(Boolean, Boolean)
Exception HResult    : -2146232828

Exception full name  : System.TypeInitializationException
Exception message    : The type initializer for 'Microsoft.Plugin.WindowWalker.Main' threw an exception.
Exception stack trace:
   at Microsoft.Plugin.WindowWalker.Main..ctor()
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
Exception source     : Microsoft.Plugin.WindowWalker
Exception target site: Void .ctor()
Exception HResult    : -2146233036

Exception full name  : System.ArgumentOutOfRangeException
Exception message    : Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
Exception stack trace:
   at Wox.Plugin.Common.VirtualDesktop.Helper.VirtualDesktopHelper.UpdateDesktopList()
   at Wox.Plugin.Common.VirtualDesktop.Helper.VirtualDesktopHelper..ctor(Boolean desktopListUpdate)
   at Microsoft.Plugin.WindowWalker.Main..cctor()
Exception source     : System.Private.CoreLib
Exception target site: Void ThrowArgumentOutOfRange_IndexException()
Exception HResult    : -2146233086
-------------------------- End exception --------------------------

Other Software
No response

@htcfreek , looks like we missed testing in some conditions ;)

Good catch.
I am confused. Is this a special system or did you disabled Virtual Desktops? Based on my testing at least one desktop must exist.
Will look into this tomorrow. Please assign me.

@jaimecbernardo
Can you please upload me the content of the registry values (especially VirtualDesktopIDs) on the machine?
Was this crash happening after or before showing the PT Run window?

Thanks for picking it up.
It's a Windows 10 VM where no new Virtual Desktop has been created yet.
Those machines don't have those keys in registry.
In order to simulate a PC that has never created Virtual desktops, remove these keys from the registry:

CurrentVirtualDesktop from \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\SessionInfo\1\VirtualDesktops
VirtualDesktopIDs from \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops

It's happening before showing the PT Run window.
It's when trying to load the plugins, I think.

The question is what we return if this happens. "No desktop exist" or "desktop one" for each window? 🤔

The question is what we return if this happens. "No desktop exist" or "desktop one" for each window? 🤔

Perhaps empty string for this case.

@jaimecbernardo
Are you sure that the value VirtualDesktopIDs in \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VirtualDesktops really doesn't exist? On my system the explorer crashes if I click on the desktop switcher symbol in task bar and the value is missing.
Or did you disabled virtual desktops with a gpo or something?

Perhaps Windows 11 works differently than Windows 10. This is Windows 10.

I am on windows 10 too. Can you try what happens when you click on this bottun in your task bar:

Perhaps Windows 11 works differently than Windows 10. This is Windows 10.

I am on windows 10 too. Can you try what happens when you click on this bottun in your task bar:

The crash on my system must be a race condition when clicking to fast and often on the button.
If I understand you correct, you don't use virtual desktops? So there isn't a condition where the key is missing unexpectedly?

found a bug on win 11 too.

If I understand you correct, you don't use virtual desktops? So there isn't a condition where the key is missing unexpectedly?

This VM never used Virtual Desktops, so it's expected that the key is missing.

If I understand you correct, you don't use virtual desktops? So there isn't a condition where the key is missing unexpectedly?

This VM never used Virtual Desktops, so it's expected that the key is missing.

I have fond the crash reason and the fix is nearly ready. It crashes when trying to selecting desktop one from the empty desktop list. 😅 I will request your review in the PR.

This is fixed with 0.57.0. Please head over to https://aka.ms/installpowertoys

authors: htcfreek jaimecbernardo


text:
[Settings] Restore position and size

Microsoft PowerToys version
0.0.1
Running as admin

[ ] Yes

Area(s) with issue?
Settings
Steps to reproduce
Restore position and size on startup regression after WinUI3 migration of settings
xref https://github.com/microsoft/PowerToys/issues/3685
✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

#done

authors: Jay-o-Way davidegiacometti


text:
Adding capabilities to PowerToys Run that are present in Wox

Description of the new feature / enhancement
Allow users to make custom "Direct Activation Commands" for handling links.
For example for google scholar are command could be: gs followed by the search term.
This should open the link: scholar.google.com/scholar?q={q} where q is the search term
So if i were to search:
gs goodenough
The following should open
scholar.google.com/scholar?q=goodenough
Similar keywords and links that I already use with Wox and suggest implementing, are:
th https://www.thesaurus.com/browse/{q}  for quickly browsing a thesaurus
stack https://stackoverflow.com/search?q={q} for searching stackoverflow
Scenario when this would be used?
To quickly search for terms on specific website with search engines.
Often when reading or writing it is nice to pull up and search for something only on a specific website, and doing so in powertoys run would be much easier than alt-tabbing, and would let me replace wox with powertoys run.
Supporting information
The Wox websearch plugin wiki entry is found here:
https://github.com/Wox-launcher/Wox/wiki/Default-Plugins.-Web-Search

this would be a community based plugin.  We won't directly deep link into a site as they are an independent entity.  this would require business relationships with that entity.  A PT Run macro feature request would enable this as well but by itself, not a feature we'd directly write.
/dup https://github.com/microsoft/PowerToys/issues/15032

authors: crutkas moerch


text:
Crashed or Exited after restarting as admin

Microsoft PowerToys version
0.58.0
Running as admin

[X] Yes

Area(s) with issue?
Settings
Steps to reproduce
I don't run PowerToys as administrator as our work policy is not to do so unless needed.
I noticed a new version was available (not sure what version I was on) and so I started the update.
I was prompted to "elevate" my permissions to install PowerToys. After doing that, the install went fine, but one thing I noticed was that PowerToys did not start up (after the install).
I started it under my "user Id" (just a normal windows user) and it came up.  I was able to see the settings and everything seemed to work fine under my user id.
when I decided to "Restart PowerToys as administrator", I was prompted to "elevate" to my administrator id and that worked and PowerToys came up, and was up just long enough to show the update note and then PowerToys either exited or crashed. All I noticed was that it went away.
I've never had a problem in the past running as administrator and I don't know if this is similar to #18019 (I don't have that type of video card, my card is NVIDIA and I don't use my machine for gaming) or if it's related to #18043.  I'm including my generated Report bug zip file
PowerToysReport_2022-05-05-11-59-31.zip
.
✔ Expected Behavior
Expected PowerToys to come up after install as well as coming up when restarting as administrator and stay running.
❌ Actual Behavior
PowerToys exits or crashes.
Other Software
No response

Can't reproduce it anymore.


text:
Fancy Zones

Microsoft PowerToys version
0.58.0
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
Whenever I use the hover over the window icon in Firefox and then click to remap the current window to a Zone, the zone cannot be maximised to fit the screen anymore. It automatically resizes back to the Zone after. The only way to get around is to close the window.
✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

/bugreport

authors: SeraphimaZykova kukendran


text:
Ability to add Prefix and Suffix to file names in Powerrename

Description of the new feature / enhancement
I want the ability to add Prefix and suffix to files when using powerrename
Scenario when this would be used?
I want to maintain the different names of images but I was to add 'I_' prefix or suffix to all Images in selected files in powerrename. the 'search for' field cannot do this since the names or first/last letter are different from one another. Therefore, the replace function wont work.
Supporting information
for artists they need a quick way to rename files with prefixes and suffixes.

Hello and thanks for your message.
This is already possible. Please have another look at the documentation.

authors: IbyA Jay-o-Way


text:
0.64.0 cant apply modified fancy zone

Microsoft PowerToys version
0.64.0
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce
Selected priority layout and remove the gap between zones. Go back to desktop. drag window and press shift, still zones with gap.
✔ Expected Behavior
No gap between zones
❌ Actual Behavior
Gap between zones
Other Software
NON

can confirm. this happens since the latest version.
on Win11 21H2

/dup #21630

authors: Shougon delasource taras-janea


text:
FancyZones layouts changing on reboot

Microsoft PowerToys version
0.67.1
Installation method
GitHub, PowerToys auto-update
Running as admin
No
Area(s) with issue?
FancyZones
Steps to reproduce
I have two monitors with different layouts configured. Since upgrading to 0.67.1, following a reboot, the layouts change from their configured settings (Custom + No Layout) to Priority Grid + Rows and have to be set back again.
✔ Expected Behavior
Selected layouts should persist
❌ Actual Behavior
Layouts change following reboot
Other Software
N/A

PowerToysReport_2023-02-16-16-03-01.zip

PowerToysReport_2023-02-18-12-09-15.zip
Mine goes to default, and it happens intermittently, not consistently after reboot.

Same issue here. After reboot one screen changes layout and main screen is fine but highlight distance is Zero on both.
When I go inside the settings they both show like they have different layouts and have to reselect them.
PowerToysReport_2023-02-20-17-19-58.zip

Still present in 0.68

Update: I now did the following:

Set my desired layouts
Ensure a proper exit, by exiting PowerToys via the system tray menu
Restart PowerToys
Observe my desired layouts are still active

This could also point to #24840 being a possible cause of my observations.

/dup https://github.com/microsoft/PowerToys/issues/16370

authors: SeraphimaZykova danielschenk erikpienk ngod88 thespad


text:
[FancyZones] Layout lost after turning off and on the second screen

Microsoft PowerToys version
0.68.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce

Have a custom layout active
Check that is being applied to all monitors correctly
Turn off one monitor
Turn it on again
Check that FancyZones is applying the default layout instead of the custom and previously applied one.
You need to close and reopen PowerToys to have it working again with the custom layout it was previously active.
PowerToysReport_2023-03-30-15-45-04.zip

Additional data:

Laptop's screen resolution: 1920x1200
Additional monitor resolution (set as main): 5120x1440
It's not happening every single time. I'm not sure if the act of powering off the monitor + Windows lock/logon screen is related with this.

✔ Expected Behavior
It should keep the previously applied layout
❌ Actual Behavior
It's applying the default layout but it's saying the custom one is applied. Tried selecting another one and the custom one again with no luck. You need to close and reopen PowerToys to have it working as expected.
Other Software
No response

+1 to this issue. Was about to file a bug but this sounds like the same root thing. For me my reproduction steps are:

Using a laptop, have a custom layout active.
Plug in laptop to my USB-C monitor.
Observe that FancyZones is now using the default layout instead of the custom one I have set.

Another thing worth noting is that this issue existed a long time ago, but was fixed several months ago, and seems to have recently regressed.


text:
Run a PowerPoint slideshow in a zone as if on a second monitor

Description of the new feature / enhancement
Please have PowerPoint be able to view a zone as a display for a slide show to run within. PowerPoint takes control of the entire screen when running a slide show using a single monitor setup, but with the proposed feature, it would run only within a predefined zone. This would enable a user to edit a PowerPoint presentation while simultaneously displaying the running slideshow.
Scenario when this would be used?
When collaborating on a slide presentation with clients and colleagues while screen sharing, showing the running slideshow is often helpful when making edits to the file. When using a single monitor setup, one has to stop the slideshow view to make an edit and then restart the presentation to see the changes made. With this proposed enhancement, a designer/presenter could change the file "offscreen/unseen" to the viewers while maintaining the slideshow running.
Supporting information
No response

Has there been any progress on this? I see it's been pending triage since last September, but this feature is desperately needed!


text:
Automatic installation of updates

Description of the new feature / enhancement
The option to enable not only downloading updates automatically but also installing them
Scenario when this would be used?
It's important to me because I want to keep it up to date but I don't really see the value of getting notifications to manually click a button for that.
Supporting information
No response

this is hard due to the non-per user needs to be elevated to do the install and other features require elevation to be turned on for per-user installs

this is hard due to the non-per user needs to be elevated to do the install and other features require elevation to be turned on for per-user installs

Is it possible to ask for elevated permissions when this option gets chosen in the options menu?

/dup https://github.com/microsoft/PowerToys/issues/27651

authors: TheTomer caligula-69 cinnamon-msft crutkas


text:
How to uninstall

Microsoft PowerToys version
0.81.0
Installation method
GitHub
Running as admin
No
Area(s) with issue?
General
Steps to reproduce
I believe it is already uninstalled but it keeps popping up, it's not showing on remove add and programs
✔ Expected Behavior
To be removed completely after using the uninstaller
❌ Actual Behavior
It is still installed but not showing on installed apps
Other Software
No response

Can you try to install PowerToys again and then reuninstalling it?
/needinfo

authors: Aaron-Junker asoksevil


text:
Nothing happens when i right-click on the PowerToys Awake icon.

Microsoft PowerToys version
0.84.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Awake
Steps to reproduce
PowerToysReport_2024-09-12-01-56-57.zip
https://github.com/user-attachments/assets/45c72759-144c-4a8a-8b7f-e172c80a5a2d
✔ Expected Behavior
Expecting to see the menus/options in the system tray when i right-clicked the awake tool from the sys tray.
❌ Actual Behavior
After the latest update, nothing happens when i right-click on the PowerToys Awake icon.
1st bug:
Tried disabling and enabling the Awake tool in PowerToys, but the Awake tool seemed to be not able to load after disabling from powertoys.  Close the powertoys app and relaunch powertoys but still unable to load the Awake tool until i manually toggle in powertoys app.
2nd Bug: Nothing happens when i right-click the awake tool in the system tray and im unable to access the Awake menu/options in the system tray.
Other Software
No response

I've the same issue.

I have the same issue. Started in 0.84 and I am not running as Admin.

Like Scott123456, this problem seems to have been introduced with 0.84 and is not resolved in 0.84.1.

I've just run into this to (v0.84.1).

Duplicate of #34656

Same issue here, tried from MS store as well as stand-alone MSI installer.


text:
Fix crash when saving any module settings while module being disabled

Summary of the Pull Request
After powertoy module is disabled we need to make sure that no crash occurs when user tries to change settings of disabled powertoy.

PR Checklist

[x] Applies to #1250

Validation Steps Performed

Disable any of the available powertoys.
Change settings of disabled powertoy.

Expected result: Nothing happens (no crash occurs).

why is this happening now versus before?  what introduced the behavior?

why is this happening now versus before? what introduced the behavior?

At some point just simple storing of JSON formated settings got dependent on actually applying those, for which we need active module, not disabled as it is scenario here. When the module is disabled and we try to apply those settings crash occurs. I've added checks to avoid this scenario, but I will also refactor it slightly to separate those two.

A unit test alone wouldn't catch this, we'd also need a functional UI test, right?

A unit test alone wouldn't catch this, we'd also need a functional UI test, right?

This can be simulated with unit test alone, disable the module and try to save some configuration through module interface. There are already unit tests for settings within FancyZones. I will extend it with additional test case.

A unit test alone wouldn't catch this, we'd also need a functional UI test, right?

This can be simulated with unit test alone, disable the module and try to save some configuration through module interface. There are already unit tests for settings within FancyZones. I will extend it with additional test case.

create a new task, link to this PR / issue, assign to 20.03.

why is this happening now versus before? what introduced the behavior?

In Shortcut Guide is happening since this commit https://github.com/microsoft/PowerToys/commit/bf82e04ddb58dea33aa2ff3d08f6d28e1ec18564

A unit test alone wouldn't catch this, we'd also need a functional UI test, right?

Probably a unit test would have not assumed as a valid case to call this method if the module is disabled, mocking only some objects but not all.

Issue for unit-testing this https://github.com/microsoft/PowerToys/issues/1262

authors: crutkas enricogior vldmr11080


text:
[PT Run] Add scheme verfication for application URI

Summary of the Pull Request
What is this about:
Add RFC3986 scheme verification for application URI. Resolves #15305
What is included in the PR:
Add scheme verification
How does someone test / validate:
Enter ^: in PT Run and see the logs.
Quality Checklist

[x] Linked issue: #15305
[ ] Communication: I've discussed this with core contributors in the issue.
[x] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@franky920920
I will test it tomorrow.


text:
[WIP] Adding new filetypes for developer file preview

Summary of the Pull Request
What is this about:
What is included in the PR:

Preview for reg files (self written!)
New extensions for XML preview: ".xsl", ".xsd", ".wsdl"
New extensions for c++ preview: ".ino", ".pde"
New extension for cshtml preview: ".razor"

A system to add costum file types. Only downside is that you have to copy paste the language definitions into monacoSpecialLanguages.js
How does someone test / validate:
Install and test with new file types
Quality Checklist

[x] Linked issue: #14957 #16112
[x] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[x] Binaries: Any new files are added to WXS / YML

[x] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@stefansjfw Could you please make the installer stuff:

Including "costumLanguages" folder
Including "monacoSpecialLanguages.js"

This would be very nice.

@stefansjfw Could you please make the installer stuff:

Including "costumLanguages" folder
Including "monacoSpecialLanguages.js"

This would be very nice.

Sure. Could you please rebase this work on top of latest main?

@aaron-junker
Are the words marked by spell checker predefined or can we change casing here to lowerCamelCase?

@stefansjfw I merged master in

Regarding reg format:
Can you define special colored elements? Then we could color keys/values to felete inred.
Delete key
[-hklm\key-to-delete]

Delete value
"value-to-delete"=-

Regarding reg format:
Can you define special colored elements? Then we could color keys/values to delete in red. (I suggest to color the whole line in red like np++ does for deleted keys.
Delete key
[-hklm\key-to-delete]

Delete value
"value-to-delete"=-

Tjis should be possible. Thanks for the suggestion.

And let's have the constants in purple to look different in all color modes.
Btw. there is a test wep page you can use to validate your colors.

I can't define the color just the type of a element.

A note in doc/devdocs/modules/powerpreview/monaco/readme.md about how to add languages which don't have a reasonable mapping for in monaco would be good (likely "add to monaco first", but I haven't found information on that either).

A note in doc/devdocs/modules/powerpreview/monaco/readme.md about how to add languages which don't have a reasonable mapping for in monaco would be good (likely "add to monaco first", but I haven't found information on that either).

I agree. Will look what I can provide. What did you want to integrate?

What did you want to integrate?

Whatever I stumble over :-)
Form my current source tree:
COBOL (.cob/.cbl) would likely be "totally new";
autoconf (.ac, .at; which may be aliased to .m4 if that exists, but that isn't highlighted so far)
Side note: if ".in" isn't aliased to .txt altrit should be added, too, similar for .rc (I may have a manual provider as text setup, would need to check); automake (.am) should be aliased to Makefile; .sln + .vcxproj may be aliased to xml if there's no better match;

Will this also handle .xslt? We use .xsl for html pages using xsl and .xslt for other transformation. Thanks for adding these!

I will add these too,

Looks like I've asked in the wrong post, please add ".log", ".err", ".out" as text to fix #17506.

@htcfreek  I added your suggestions.

@stefansjfw This is now ready for review

I will add the docs later

I don't like this many colors and they way they are used.
Can we define

the "Reg type header" as comment
the whole reg key path in blue or green (except deletions)
the brackets and the equal sign uncolored (black/white)

btw, on some color shemes there is no difference between hkcl and the rest of the path.

@Aaron-Junker
What do you think about this:

return {
        tokenPostfix: '.reg',
        tokenizer: {
            root: [
                // Header
                [/Windows Registry Editor Version 5.00/, 'comment'],
                [/REGEDIT4/, 'comment'],
                // Comments
                [/;.*/, "comment"],
                // Keys
                [/\[\-.*\]/, 'invalid'],
                [/\\.*[^\]]/, 'keyword'],
                // Values
                [/@/, "keyword"],
                [/\".*\"=\-/, "invalid"],
                [/\".*\"(?=\=)/, "keyword"],
                [/\".*\"(?!\=)/, 'string'],
                [/((hex\({0,1}[0-9,a,b]*\){0,1})|dword):.*/, "string"],
                // Hive names
                [/HKEY_CLASSES_ROOT/, 'type'],
                [/HKEY_LOCAL_MACHINE/, 'type'],
                [/HKEY_USERS/, 'type'],
                [/HKEY_CURRENT_USER/, 'type'],
                [/HKEY_PERFORMANCE_DATA/, 'type'],
                [/HKEY_DYN_DATA/, 'type'],
                // Symbols (for better contrast on hc-black)
                [/=/, 'delimiter'],
                [/\[/, 'delimiter'],
                [/]/, 'delimiter'],
            ]
        }
    }

Or with special color for value type:

return {
        tokenPostfix: '.reg',
        tokenizer: {
            root: [
                // Header (case sensitive)
                [/Windows Registry Editor Version 5.00/, 'comment'],
                [/REGEDIT4/, 'comment'],
                // Comments
                [/;.*/, "comment"],
                // Keys
                [/\[\-.*\]/, 'invalid'],
                [/\\.*[^\]]/, 'keyword'],
                // Values
                [/@/, "keyword"],
                [/\".*\"=\-/, "invalid"],
                [/\".*\"(?=\=)/, "keyword"],
                [/\".*\"(?!\=)/, 'string'],
                [/hex\({0,1}[0-9,a,b]\)|hex|dword(?=\:)/, "type"],
                [/[0-9,a-f,A-F][0-9,a-f,A-F],*/, 'string'],
                // Hive names (case in-sensitive)
                [/HKEY_CLASSES_ROOT/, 'type'],
                [/HKEY_LOCAL_MACHINE/, 'type'],
                [/HKEY_USERS/, 'type'],
                [/HKEY_CURRENT_USER/, 'type'],
                [/HKEY_PERFORMANCE_DATA/, 'type'],
                [/HKEY_DYN_DATA/, 'type'],
                [/hkey_classes_root/, 'type'],
                [/hkey_local_machine/, 'type'],
                [/hkey_users/, 'type'],
                [/hkey_current_user/, 'type'],
                [/hkey_performance_data/, 'type'],
                [/hkey_dyn_data/, 'type'],
                // Symbols (For better contrast on hc-black)
                [/=/, 'delimiter'],
                [/\[/, 'delimiter'],
                [/]/, 'delimiter'],
                [/:/, 'delimiter'],
            ]
        }
    }

Or with special color for value type:

return {
        tokenPostfix: '.reg',
        tokenizer: {
            root: [
                // Header (case sensitive)
                [/Windows Registry Editor Version 5.00/, 'comment'],
                [/REGEDIT4/, 'comment'],
                // Comments
                [/;.*/, "comment"],
                // Keys
                [/\[\-.*\]/, 'invalid'],
                [/\\.*[^\]]/, 'keyword'],
                // Values
                [/@/, "keyword"],
                [/\".*\"=\-/, "invalid"],
                [/\".*\"(?=\=)/, "keyword"],
                [/\".*\"(?!\=)/, 'string'],
                [/hex\({0,1}[0-9,a,b]\)|hex|dword(?=\:)/, "type"],
                [/[0-9,a-f,A-F][0-9,a-f,A-F],*/, 'string'],
                // Hive names (case in-sensitive)
                [/HKEY_CLASSES_ROOT/, 'type'],
                [/HKEY_LOCAL_MACHINE/, 'type'],
                [/HKEY_USERS/, 'type'],
                [/HKEY_CURRENT_USER/, 'type'],
                [/HKEY_PERFORMANCE_DATA/, 'type'],
                [/HKEY_DYN_DATA/, 'type'],
                [/hkey_classes_root/, 'type'],
                [/hkey_local_machine/, 'type'],
                [/hkey_users/, 'type'],
                [/hkey_current_user/, 'type'],
                [/hkey_performance_data/, 'type'],
                [/hkey_dyn_data/, 'type'],
                // Symbols (For better contrast on hc-black)
                [/=/, 'delimiter'],
                [/\[/, 'delimiter'],
                [/]/, 'delimiter'],
                [/:/, 'delimiter'],
            ]
        }
    }

I love it. Thank you so much.

How did you test this?
I tried building installer and installing PT and monaco doesn't work even for old file types..

I added the files and registry keys manually. I will look why this happens.

How did you test this?
I tried building installer and installing PT and monaco doesn't work even for old file types..

I added the files and registry keys manually. I will look why this happens.

Sorry, my bad. You already asked for installer stuff and I somehow though I already did that. Here it is..

@Aaron-Junker Can you try the installer now and all new extensions? For me e.g. xslt doesn't seem to work, but wsdl works for some reason..

I forgot to generate a new monaco_languages.json file after adding xslt.

How did you test this?
I tried building installer and installing PT and monaco doesn't work even for old file types..

I added the files and registry keys manually. I will look why this happens.

Sorry, my bad. You already asked for installer stuff and I somehow though I already did that. Here it is..

Thanks.

@Aaron-Junker
let's add this page to our docs: https://microsoft.github.io/monaco-editor/monarch.html

@htcfreek As I stated above

I will add the docs later

@Aaron-Junker Can you try the installer now and all new extensions? For me e.g. xslt doesn't seem to work, but wsdl works for some reason..

I forgot to generate a new monaco_languages.json file after adding xslt.

this is still TBD, right ?

isn't this shipped with 0.58.0?

isn't this shipped with 0.58.0?

Yes why?

isn't this shipped with 0.58.0?

Yes why?

Didn't work for me. .reg is not shown with dev preview. It's shown as plain text with I think default provider.

isn't this shipped with 0.58.0?

Yes why?

Didn't work for me. .reg is not shown with dev preview. It's shown as plain text with I think default provider.

Open a new issue. I will look this this weekend what is going on.

authors: Aaron-Junker GitMensch htcfreek stefansjfw


text:
minor spelling correction

spelling correction

Specing is not a word. Spec is slang.

authors: blacxjaguar crutkas


text:
Update Chinese Translation

Summary of the Pull Request
What is this about?
This pr has updated multiple inappropriate Chinese translations.
PR Checklist

[x] Applies to #7533
[x] CLA signed. If not, go over here and sign the CLA

@binsee, lets do this in the Issue versus the PR.  how the LCL files get updated, changes like these run a risk of being overwritten.

authors: binsee crutkas