Inconsistency input shape for AdversarialPatchPyTorch

Describe the bug
The __init__ function assumes that the input should be in shape NCHW .
For example:
https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/49e13eac6f4d1154ccfdc5eb398a93924455fec6/art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py#L152
https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/49e13eac6f4d1154ccfdc5eb398a93924455fec6/art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py#L136
However, the generate function requires the input shape to be NHWC:
https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/49e13eac6f4d1154ccfdc5eb398a93924455fec6/art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py#L415
If you follow all the requirements in the doc, then you will get an error:
~/.local/lib/python3.8/site-packages/art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py in _random_overlay(self, images, patch, scale, mask)
    407         inverted_mask = torch.from_numpy(np.ones(shape=image_mask.shape, dtype=np.float32)) - image_mask
    408
--> 409         return images * inverted_mask + padded_patch * image_mask
    410
    411     def generate(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> Tuple[np.ndarray, np.ndarray]:

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

Expected behavior
The shape should be consistent
Version: ART 1.8.0

What I mentioned above should be a documentation error. If you just use NCHW, then it should be OK.
However, when running the code on GPU enabled server, you will get a device error at the same location:
~/.local/lib/python3.8/site-packages/art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py in _random_overlay(self, images, patch, scale, mask)
    407         inverted_mask = torch.from_numpy(np.ones(shape=image_mask.shape, dtype=np.float32)) - image_mask
    408
--> 409         return images * inverted_mask + padded_patch * image_mask
    410
    411     def generate(self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs) -> Tuple[np.ndarray, np.ndarray]:

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

Hi @YuhengHuang42 Thank you very much for using ART and raising this issue! We will be taking a closer look as soon as possible. Do you have a simple example code that we can run to reproduce the error?

Hi @YuhengHuang42 Thank you very much for using ART and raising this issue! We will be taking a closer look as soon as possible. Do you have a simple example code that we can run to reproduce the error?

Sure
import torch
import torch.nn as nn
import torchvision
from art.attacks.evasion import AdversarialPatchPyTorch
from art.estimators.classification import PyTorchClassifier
import numpy as np

images = torch.randn(16, 3, 224, 224)
target_name = 'toaster'
image_shape = (3, 224, 224)
clip_values = (0, 1)
nb_classes  =1000
batch_size = 16
scale_min = 0.4
scale_max = 1.0
rotation_max = 22.5
learning_rate = 5000.
max_iter = 200

resnet = torchvision.models.resnet18(pretrained=True)
resnet.cuda()
model_wrapper = PyTorchClassifier(model=resnet, loss=nn.CrossEntropyLoss, nb_classes=nb_classes,
                                        input_shape=image_shape, clip_values=clip_values, device_type="cuda")

ap = AdversarialPatchPyTorch(classifier=model_wrapper, rotation_max=rotation_max,
                      scale_min=scale_min, scale_max=scale_max,
                      learning_rate=learning_rate, max_iter=max_iter, batch_size=batch_size,
                      patch_shape=(3, 31, 31), patch_type="square", verbose=True)

label = 1
y_one_hot = np.zeros(nb_classes)
y_one_hot[label] = 1.0
y_target = np.tile(y_one_hot, (images.shape[0], 1))
patch, patch_mask = ap.generate(x=images, y=y_target)

I found where the "bug" is. Briefly, your patch should be of the same dimension as your input data. Particularly, if your input data is NCHW, your patch shape should be (1,3,31,31). On the other hand, if your input data is CHW, your patch shape should be (3,31,31). For more detail, please check lines 145 to 151 and 257 to 262.

I found where the "bug" is. Briefly, your patch should be of the same dimension as your input data. Particularly, if your input data is NCHW, your patch shape should be (1,3,31,31). On the other hand, if your input data is CHW, your patch shape should be (3,31,31). For more detail, please check lines 145 to 151 and 257 to 262.

Oh, as I said before, this should be a documentation error. Another error is the device error, which happens at where you create the mask.

@YuhengHuang42 I think you are right, I was able to reproduce your description. I have opened pull request #1333 to fix this issue. Could you please take a look and try out the improved version?

@YuhengHuang42 I think you are right, I was able to reproduce your description. I have opened pull request #1333 to fix this issue. Could you please take a look and try out the improved version?

Yes, everything seems to work fine now. Thanks for the timely reply!


Create in memory cache for lab config

BeforeClass & AfterClass test methods does not work with Robolectric, so we use the before and after methods instead to perform common tasks that need to be performed prior to running a test. These include hitting the lab api to get a user for the automated test. Initially we had only few tests but as we write more tests, this will get expensive for both us, as well as the lab api. To solve this problem, I've created an in-memory cache (modeled by HashMap) for the lab config. So now if we try to get a user/config from lab and we recently made a request with the same query, then we can just return the result from cache and don't need to hit the lab api.

Please add description on the changes you made.

Please add a brief description on the changes you made (why+how)

@rpdome See description


When SSL is on, http:// is disabled

A redirect from http:// to https:// would be better

Just want to mention this works for me https://github.com/veelenga/crystal-ann/pull/16.
This change is of course Heroku-dependent, because of x-forwarded-proto... ;)

It should just redirect to path instead of url then we won't have to worry about protocol. I believe rails does it this way.

I have some code here on master branch to try to run 2 servers, one for HTTP and one for HTTPS
but it fails
https://github.com/mixflame/amber

Closing this issue since it seems to be working as expected. Please reopen if you find out more about this issue


Return empty beaker matrices unless there are tests

Today there's ERB templating in Vox Pupuli's modulesync config that disables the job. This doesn't work with reusable workflows. This outputs an empty matrix for beaker which prevents running the acceptance tests without having to template the workflow.
It still allows forcing it via an undocumented environment variable (PUPPET_METADATA_FORCE_ACCEPTANCE).

Verified in https://github.com/voxpupuli/puppet-example that this works.

Oh, scratch that:

Error when evaluating 'strategy' for job 'acceptance'. ekohl/gha-puppet/.github/workflows/ci.yml@v1 (Line: 75, Col: 9): Matrix must define at least one vector


[Feat]: CLO Monitor Recommendations

Achieve a score of 💯 on CLOMonitor
Remaning Tasks:

[ ] Dependency Policy
[ ] SBOM
[ ] Security Insights file
[ ] Token Permissions

All is done except the SBOM. The chart shows 99%


Dynamic App Title

Hi,
First of all this is a wonderful layout!!!
It would be appreciated if it would be possible to set dynamically the App title based on viewed page.
Thanks in advance
Luigi

This should already be possible.
The LeftLayouts have a setTitleComponent so you only need to get access to the AppLayout. As much as I know you should be able to get it from the VaadinSession under the AppLayout-Token.

@gigiobix Can you give an example how the API is supposed to support this?

I think it would be a good Idea to use something like the Page title mechanism via HasTitle Interface.
I.e. if the component which use your layout as Router  inherit from some Interface exposing getTitle method then the layout could invoke this method to set the title evrerytime the page is rendered.
Another way could be the one exposed by @Springrbua, get a reference to the Applayout and use the setTitleComponent method
Another good Idea would be the ability to change the title during user interaction
I hope this could help your work.
Thanks

It would probably be a combination of both methods.
As I've said, the AppLayout already has a setTitleComponent, so changing the title should be pretty easy.
But the AppLayoutRouterLayout could implement an Interface (AppLayoutContent?), which has default methods to set the title etc.:
default void setAppLayoutTitleComponent(Component title) {
    UI.getCurrent().getSession().getAttribute(AppLayout.class).setTitleComponent(title);
}

Thanks to post of @Springrbua I've implemented a workaround to have dynamic title.
In the class extending AppLayoutRouterLayout, which I use as layout of all my routes, first to invoke the init method a set the Applayout generated in the session:
AppLayout layout = AppLayoutBuilder.get(Behaviour.LEFT_OVERLAY)
                                   .withTitle("GenericName")
                                   .build();

UI.getCurrent().getSession().setAttribute(AppLayout.class, layout);

init(layout);

Then in every class that use this layout after constructor, the I arrange the view I get the class from the Session and set the title
Optional.ofNullable(UI.getCurrent()
                      .getSession()
                      .getAttribute(AppLayout.class)).ifPresent(l -> {
			logger.info("Aggiorno il titolo a 'Gestione Processo'");
			 Span span = new Span("New Title");
		        span.setWidth("100%");
		        span.getStyle()
		                .set("white-space", "nowrap")
		                .set("overflow", "hidden")
		                .set("text-overflow", "ellipsis");
		        l.setTitleComponent(span);
		});

I hope this can help.

@gigiobix I have just seen, that the AppLayoutRouterLayoutBase (base-class for AppLayoutRouterLayout) has a static method getCurrent, which gives you the current AppLayout instance from the session.
So you could simply use getCurrent() if you are in a subclass of AppLayoutRouterLayout, or AppLayoutRouterLayout.getCurrent() from anywhere else.

@Springrbua , I've tried your suggestion, and it works fine.
I think it would be cool if AppLayoutRouterLayoutBase could expose the metod void setTitle (String title) for semplicity
Thanks a lot

@Springrbua Sorry I'm still a huge noob. Can you provide a sample code for this?
When I'm calling AppLayoutRouterLayout.getCurrent() at the end of my ViewConstructer, which uses the AppLayout from here as a parent i get a nullpointer.

@cedricaebi, I've tried thr method suggested by @Springrbua , but the method always return null value.
To solve the problem, I use this tecnique:
At the end of layout creation, I store the result of build method in session:
AppLayout layout =
		(AppLayoutBuilder.get(Behaviour.LEFT)
		 .withTitle("My Title")
		 .withAppMenu(menuBuilder.build())
		 .build());
UI.getCurrent().getSession().setAttribute(AppLayout.class, layout);

Then I created an Helper class with this static method, called to set view title:
	public static void setTitle(String title) {
		Span span = new Span(title);
		span.setWidth("100%");
		span.getStyle()
			.set("white-space", "nowrap")
			.set("overflow", "hidden")
			.set("text-overflow", "ellipsis");
		Optional.ofNullable(UI.getCurrent().getSession().getAttribute(AppLayout.class)).ifPresent(l -> l.setTitleComponent(span));
	}
}

I hope this could help you.

@gigiobix thanks! It worked. I called Helper.setTitle() in the public void beforeEnter() of the view.
Again thanks :)

@cedricaebi @gigiobix does this work if you have multiple tabs?
As much as I know, multiple tabs share the same Session and therefore the same attributes. But the AppLayout instance should not be the same as they have different DOMs.

@Springrbua our app is for internal usage, only one tab per time is opened, so I don't care about multi tab. I've tried to use the solution you suggested to me but it didn't function. If you can suggest a new solution I will try it.
Thanks

@gigiobix @cedricaebi
I just tested the solution I provided and it works as expected.
Here the code:
public class MainView extends AppLayoutRouterLayout {
    public MainView() {
        init(AppLayoutBuilder.get(Behaviour.LEFT_RESPONSIVE)
            .withTitle("Test")
            .withAppBar(AppBarBuilder.get().add(new Button(new Icon(VaadinIcon.USER))).build())
            .withAppMenu(LeftAppMenuBuilder.get()
                .add(new LeftClickableItem("Test", VaadinIcon.ABACUS.create(), click -> {
                    getCurrent().setTitleComponent(new Span("Clicked"));
                }))
                .build()
            ).build()
        );
    }
    @Route(value = "", layout=MainView.class)
    public static class InnerView extends Div {
        protected void onAttach(AttachEvent attachEvent) {
            setText("Content");
        }
    }
}

The important line is inside the LeftCLickableItems ClickListener:
getCurrent().setTitleComponent(new Span("Clicked"));
Outside the AppLayoutRouterLayout you hsould be able to do the same by calling AppLayoutRouterLayout.getCurrent().setTitleComponent(...).
I also tested it with multiple tabs and noticed that it works only for the last tab.
The reason is probably the following:
Each browser tab shares the same VaadinSession and therefore the same Attributes.
The last tab you opened writes it's AppLayout into the attribute and is therefore the only tab that can modify it.
Since all other tabs don't have this AppLayout instance attached, they are not allowed to change it.
So I guess we should really look for another solution and remove the AppLayoutRouterLayout.getCurrent.
The only solution I can think about right now is to go through all children of the UI, until we find the AppLayoutRouterLayout and return it.
@appreciated what do you think about this?

@Springrbua I'm not enough expert on Vaadin, but your thought on UI seems to be the right one, Perhaps it would be possible to assign an unique ID to the Title Container and refer to that instead of navigating the DOM.
I how this could help you

@appreciated what do you think about this?

This is a bug, and a misthinking of mine. Currently working on a fix for this.

@Springrbua , I've tried your suggestion, and it works fine.
I think it would be cool if AppLayoutRouterLayoutBase could expose the metod void setTitle (String title) for semplicity
Thanks a lot

To avoid a bloating of the  AppLayoutRouterLayoutBase with methods that do not belong in there, I disagree in adding a setTitle. Actually even getCurrent does not belong here. I have to think about this how to refactor this properly. Also since this is a breaking change this will be not be added in 2.* but in 3.0.0

Actually even getCurrent does not belong here. I have to think about this how to refactor this properly. Also since this is a breaking change this will be not be added in 2.* but in 3.0.0
Opened #264.

Each browser tab shares the same VaadinSession and therefore the same Attributes.
The last tab you opened writes it's AppLayout into the attribute and is therefore the only tab that can modify it.
Since all other tabs don't have this AppLayout instance attached, they are not allowed to change it.
Closed by ffd3372205c3df4e3f7c5aa74c48b1f82911da4a.


[AMQ-8316] Remove unused methods in BrokerService

@cshannon can you please take a look ? Thanks !


Redesign documentation

Turn the cirq documentation into Xanadu style. It is recommended to locally build the documentation for code review.
We do currently not have a lot of content, but this can be the basis of growing the plugin.

The JavaScript formattings seem to be off for CodeFactor :thinking:

Have updated the codefactor settings to ignore javascript files!

I think I caught most of your suggestions, and updated to reflect the latest qiskit polish as well.
@josh146 I wonder why CodeFactor still complains about js files?


'make run' runs the wrong emacs configuration

I currently have ~/.emacs.d pointing to ~/emacses/doomv1/.emacs.d (which is a modified version of DOOM emacs v1). I have DOOM emacs v2 in the folder ~/emacses/doomv2/.emacs.d . When running "make run" from the v2 folder, DOOM emacs v1 is loaded instead.
To run version 2, I need to be in its folder and use the command:
"HOME=~/emacses/doomv2 emacs"
I'm not sure how to debug this as all variables are setup correctly in the Makefile, yet the wrong files are loaded. Is there a weird cache mechanism (related to compiling) that is not being taken into consideration?

Ah, good catch. The run task uses the emacs binary straight, without -q to prevent ~/.emacs.d/init.el from being loaded. It should be:
run:
	@$(EMACSI) $(EMACS_FLAGS) -l init.el

The fix will be up soon.

Done. Feel free to reopen this if the problem returns.

The fix works, though, it uses one two many $(EMACS_FLAGS). The variable $EMACSI already includes the flags. The run rule should instead be:
run:
	@$(EMACSI) -l init.el

Whoops! You're right, I was too hasty. I'll follow up with another commit soon.


404 monthly maintenance - October 2017

Updated _redirects

This change is

@chenopis 👋 Ready when you are.


Replace npm token arg with proper build secrets

Change-type: major
Signed-off-by: Giovanni Garufi<EMAIL_ADDRESS>

@nazrhom superseded by https://github.com/product-os/balena-concourse/pull/580


[stable/jenkins] Adding sub-path option for scraping

Signed-off-by: Tomer Leibovich<EMAIL_ADDRESS>
What this PR does / why we need it:
In cases where Jenkins is available under sub-path, any attempts to scrape /prometheus failed with 404. I added a condition, if the ingress is created with sub-path, the scrape path will match it.
In addition, the current configuration creates the ServiceMonitor under the same namespace as the rest of the resources, if Prometheus isn't set to scan additional namespaces, it won't pick up the new ServiceMonitor.
My PR also address it by adding serviceMonitorNameSpace which allows the user to change it according to his setup.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ x] DCO signed
[ x] Chart Version bumped
[ x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @maorfr

hey @tomerleib,
thanks for this PR! nice to see you get further involved :)
i must say, i am not a big fan of a chart creating resources in more then a single namespace. especially moving forward to helm 3 where each namespace will contain information about releases in that namespace.
imagine a chart deploying resources to a few namespaces, and then the original namespace is deleted. we will remain with "orphan" resources.
what do you think?
i would love to get @torstenwalter in on this as well.

I've tested it further.
Closing this PR and submitting a new one.

@tomerleib You can always update a PR no need to close and reopen. That would keep the discussion history.


python3Packages.regenmaschine: init at 3.1.1

Motivation for this change
Python library for interacting with RainMachine smart sprinkler controllers
https://github.com/bachya/regenmaschine
This is a Home Assistant dependency.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109629 run on x86_64-linux 1

3 packages built:

python37Packages.regenmaschine
python38Packages.regenmaschine
python39Packages.regenmaschine

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109629 run on x86_64-linux 1

3 packages built:

python37Packages.regenmaschine
python38Packages.regenmaschine
python39Packages.regenmaschine

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109629 run on x86_64-darwin 1

3 packages failed to build and are new build failures:

python37Packages.regenmaschine: log https://termbin.com/5ftm
python38Packages.regenmaschine: log https://termbin.com/wqya
python39Packages.regenmaschine: log https://termbin.com/p7ye

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109629 run on x86_64-darwin 1

3 packages failed to build and are new build failures:

python37Packages.regenmaschine: log https://termbin.com/5ftm
python38Packages.regenmaschine: log https://termbin.com/wqya
python39Packages.regenmaschine: log https://termbin.com/p7ye

Maybe allowing local networking will appease the darwin sandbox.
  __darwinAllowLocalNetworking = true;

Maybe allowing local networking will appease the darwin sandbox.
  __darwinAllowLocalNetworking = true;

Thanks for the darwin input.

Thanks for the darwin input.

Result of nixpkgs-review pr 109629 run on x86_64-linux 1

3 packages built:

python37Packages.regenmaschine
python38Packages.regenmaschine
python39Packages.regenmaschine

Result of nixpkgs-review pr 109629 run on x86_64-linux 1

3 packages built:

python37Packages.regenmaschine
python38Packages.regenmaschine
python39Packages.regenmaschine


list_model: Rename object to item

Fixes #478

Could you add a comment so that we know this can be removed when https://github.com/gtk-rs/gir/issues/1112 is implemented?

Could you add a comment so that we know this can be removed when gtk-rs/gir#1112 is implemented?

Done.

Thanks.


GPT-tfjs model is not persisted in the browser local storage

Download the GPT model in the Evaluation page doesn't persist the model in the browser's cache:

refreshing the page makes it disappear.
trying to use the model after downloading fails
Inspecting the page, we can see that the local storage (or indexedDB) doesn't show any new model when downloading the GPT model, while it does for others. This happens both in local and for discolab.ai
@tharvik do you have an idea of what's happening? I suspect it may come from #764

after some investigation, it seems that a serialized GPT model is 40MiB which is way larger than how much we can put in local storage. sadly, moving to using a larger storage requires to use async storage which isn't support by the persist layer we use now.
I'm moving to use another persist layer, pinia-plugin-persistedstate-2, which allow for async storage. and implementing an OPFS interface.

I see, not very surprising. This is something we will have to care about as language models grow larger. What about IndexedDB?

IndexedDB is also a possibility. if our case, we don't need to search for data, so OPFS looked more fit.


Testing CircleCI

Further tests

Waiting for approval from a project maintainer before running e2e tests. https://circleci.com/workflow-run/

[AUTOMATED MESSAGE]
Waiting for approval from a project maintainer before running e2e tests.
@jariz @JoshuaWalsh https://circleci.com/workflow-run/2284182e-cebe-4d79-93d2-625e3711f6ac

[AUTOMATED MESSAGE]
Waiting for approval from a project maintainer before running e2e tests.
@JoshuaWalsh https://circleci.com/workflow-run/4269d269-fec6-482a-b08c-1498a73f815e

[AUTOMATED MESSAGE]
Waiting for approval from a project maintainer before running e2e tests.
@JoshuaWalsh https://circleci.com/workflow-run/97ff5d96-6089-4a16-a06a-85433de5f8ea


Branch names with special characters lead to broken builds

Since version 1.12.0, branch names that contain special characters, like feature/whatever, that are not allowed in version strings, cause broken builds. I've created a minimal example to demonstrate this behavior: https://github.com/mlangc/setuptools-git-versioning-version-parsing-bug-reproduction/tree/feature/whatever
If I run setup.py --version with the code from the link above, I get
Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    setup(
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 147, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools/dist.py", line 476, in __init__
    _Distribution.__init__(
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 280, in __init__
    self.finalize_options()
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools/dist.py", line 900, in finalize_options
    ep(self)
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools_git_versioning.py", line 251, in infer_version
    version = version_from_git(dist.metadata.name, **config, root=root)
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools_git_versioning.py", line 565, in version_from_git
    return sanitize_version(version)
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/setuptools_git_versioning.py", line 450, in sanitize_version
    result = str(Version(version))
  File "/usr/local/Caskroom/miniconda/base/envs/app_ve_analytics_38/lib/python3.8/site-packages/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '0.0.0.dev1+feature/whatever.1.cf8f98db'

Note that everything works fine, if I use setuptools-git-versioning==1.11.0 instead. As far as I can tell, this problem was introduced by https://github.com/dolfinus/setuptools-git-versioning/commit/49c719aef10878643e68c1f47f81b1c2664eb39c#diff-669acc32e6f1e51356caf8db37342593a3fa289dade13da5fc4132b1f8fb1452L567, since the new sanitize_version function throws exceptions for invalid version strings.

Hi. You should use branch_formatter option to remove unsupported symbols from branch name before substitution to the template

Thank you very much for your quick response. I was in fact thinking about using the branch_formatter option, but since this is only a minor version upgrade, but a major change in behavior, I'm still inclined to view this as a bug.
Maybe we can add a sensible default for branch_formatter? Otherwise many clients of the library will develop their own, most likely very similar branch formatters.

Well, fair enough. Please check v1.12.1

Thank you very much, v1.12.1 fixes the problem for me!


Minor: book is not mentioned anywhere in README or the github page

It would be nice if the book was mentioned somewhere in the first pages of README and/or in the repo description with a link?
Currently it's not immediately obvious the book even exists when opening the repository page (other that seeing 'book').

As a matter of fact, there's no immediate link to docs.rs either, might be nice to add it as one of the badges in the readme? (and/or repo description)

Both the API docs and the book are currently linked as badges:
https://github.com/proptest-rs/proptest/blob/master/proptest/README.md?plain=1#L6-L10
I've added a section to the top of the README explicitly mentioning the book:
https://github.com/proptest-rs/proptest/pull/309


Domain activation is Failed - One or more of the CNAMEs you provided are already associated with a different resource.

App Id: d3mygq1w99jrhx
Region: us-east-1
Step: Domain activation
Status: Failed

Note: Do not include information that is sensitive in nature such as your domain name, company etc.

Issue/question
I am trying to activate a domain for an amplify project with root redirecting to www for one branch and a sub domain for another branch. My domain is in Route53 and the records  are being automatically created by Amplify but it fails at the end.
Error message
One or more of the CNAMEs you provided are already associated with a different resource.
Note: Be sure to check the message for sensitive information.
Additional information

Any help on this please? I have searched for this issue and tried different things to no avail. Any help would be greatly appreciated.

Our records indicate that your domain is now available. Re-open if you're still having issues. c*****p*****.io


Settings - update to database broken

Updating any field in Settings don't work due to firebase error, yet success Toast is shown

this should be resolved with #149

closed by https://github.com/covid19risk/permission-portal/pull/169


gh/workflows: Use cilium-cli GHA to install CLI exec

This reduces not only the boilerplate, but allows with a few cmds to change the CLI vsn to test WIP changes. For example, to use a custom CLI CI build for all workflows:
    $ CI_BUILD_VSN=foobar
    $ git grep -l cilium_cli_version: | xargs sed -i 's/cilium_cli_version: .*/cilium_cli_version:/g'
    $ git grep -l cilium_cli_ci_version: | xargs sed -i 's/cilium_cli_ci_version: .*/cilium_cli_ci_version: $CI_BUILD_VSN/g'

Depends on https://github.com/cilium/cilium-cli/pull/1563

Removed ready-to-merge pending resolution of https://github.com/cilium/cilium/pull/25228#discussion_r1185159693 .

Removed ready-to-merge pending resolution of https://github.com/cilium/cilium/pull/25228#discussion_r1185159693 .

@joestringer The comment has been addressed.


Hitting after semicolon inserts pattern matching bar.

Hi @freebroccolo. vscode-reasonml continues to be an excellent plugin.
I noticed one issue. When hitting enter after this semicolon, a pattern matching bar is inserted.

Thanks for the feedback. I think this is related to some of the discussion in #46. Should be fixed in the upcoming release.

Release 1.0.0 doesn't fix the problem.


feat(plugin-asset): support re-export and preserve-import in asset for Rslib

Summary

Checklist

[ ] Tests updated (or not required).
[ ] Documentation updated (or not required).

!pkg.pr.new


Add gunicorn dependency/example, and add example for fractal as a service

[ ] Have gunicorn as an extra in pypoetry


An error occurred while processing the “Feedbin” account: The data couldn’t be read because it isn’t in the correct format.

Hello everyone,
I am currently encountering an error while adding my Feedbin account in NetNewsWire on macOS :
An error occurred while processing the “Feedbin” account: The data couldn’t be read because it isn’t in the correct format.
I tried on a fresh install of NNW, version 6.0.2 (6032), on macOS Big Sur 11.2.3.
However, this is not the first time I get this error. I got the same one with NNW 5 (sorry, I don't recall the correct version) on my personal mac on Catalina. I also get this issue on iOS (v5.0.5).
My feedbin account works perfectly fine with other apps (Fiery Feeds on iOS, Reeder, ...)
I saw that there were other issue opened regarding this error, however, I did not find any steps to help me solve it.
Does anyone can help me with this? Please tell me if you need any more informations!
Thanks a lot!

@fma16 Can you think of anything unusual about your Feedbin account? Is there special characters in the username or password that we might not be taking into consideration?

@vincode-io Thanks for your help! :)
Not really, my username is an email address (feedbin at laugier dot co). Noting in particular in my password too.
I do use Feedbin newsletter feature, but nothing exotic. I can of course provide you with an OPML export if needed.
On the syncing issue, what seems to happen is that NNW is able to sync some data, but is faced with a bug mid-process. Here is when I get the error :

I can provide you with an extract from the macOS console if needed.
Thanks a lot!

An OPML file would be useful. There might be something in a specific feed that causing the bug to trigger.

Here you go (I had to add it as a zip since Github refuses to upload .xml files).
Thanks again for your time.
subscriptions.xml.zip

I don't have a fix for your problem yet, but if you delete your "Hacker News: Front Page" feed it will start syncing for you again.

The problem with the "Hacker News: Front Page" feed is that it doesn't conform to the JSON 1.0 spec. We now handle this more gracefully and don't fail to parse the entire JSON feed. Look for this fix in the next Mac release.

Thanks a lot for your help @vincode-io . It is very much appreciated. I will switch the feed in Feedbin from jsonfeed to the classic XML version, but looking forward to your fix!


SRDB import: count records with consecutive Study_midyear as single plot

@ValentineHerr, in cases where Study_midyear increases consecutively and Age stays the same, we have what the code thinks are separate plots when in fact we're dealing with a multi-year study at the same plot (example: Schanis). Please modify these such that we only get one plot, with age defined based on the first study date.
Please alert me if this causes unexpected problems. I think we've been through this issue before and decided to do it the way its currently done, but now that I'm looking at the import I'm realizing that this creates a lot of unwanted false separation of plots.

I wrote the code to deal with that. I don't know yet what problem it can cause (I need to roll back all changes in ForC and run SRDB_import.R again to figure it out), so leaving this open for now.

I found a tricky example related to this.
This is data from site "Oak Ridge"
Columns indicates the stand.age, rows the study_midyear.
Numbers in the grid are the number of record in SRDB.

We, as human, can see that stand with age 10 was samped in years 1997-2001 but the stand age was not updated along those years. Other plots seem to be independents. and stand age should be kept to what they are.
I don't know how to code this to handle all potential cases.... quickly enough (to be done before I leave tonight)

This  is a file with all situations that my code is not fixing. (It is easier to look at the file in Excel, ignore the X in front of stand age)
All other cases (where there is only one stand age involved) are easily fixed.

Got it. This is a tricky one to deal with. Some will obviously require manual review, but I'm wondering if there's any way to facilitate that/ code away some of the more common problems.

Here's the start of a list I'm making as I assess these:
Examples of legitimately independent plots, and would be good to exclude from this list:

Northern Limestone Alps
Buckingham-20

Examples that seem like they'd be solved by counting as the same plot if date is only 1/2 year off:

BOREAS NSA-OBS
Coweeta-WS6

The 1/2 year issue seems like it may be easily solveable, and seems to be affecting a good number. Sometimes it would be solved by rounding up, other times by rounding down.

There are a number where measurements were made in only one year. If all records are from the same study, they can be counted as legitimately separate plots and removed from the list.

When one of the ages is NAC, its a likely duplicate with another plot but requires manual review. These should be imported as is and will need to be reviewed later. Please make a list of these.

Can you show me an example where rounding 1/2 year would solve the problem?
And how to automatically decide if it is supposed to be rounded up or down?
I don't see the trick! :-)

Actually, this isn't dealing with consecutive years; rather, it would come in where you decide whether plots were established in the same year. If
Several examples below. In this case, if you count 1971 as the earlier year of measurement, there's a 24 year difference between the first and second measurements, and also a 24 year difference in stand age. One way to solve this (that would actually be better for plot names) would be to floor estimates of year established. We'd rarely say, "stand established in 1940.5" or "stand is 70.5" years old. This false precision is essentially what's causing a lot of these problems.
Coweeta-WS6 ____________________________
,29,5
1971.5,0,1
1995,1,0
Coweeta-WS13 ____________________________
,33,9
1971.5,0,1
1995,1,0
Coweeta-WS17 ____________________________
,15,39
1971.5,1,0
1995,0,1
Coweeta-WS18 ____________________________
,44,68
1971.5,1,0
1995,0,1

ok, I'll use floor(Study_midyear) when attributing plot.name

@ValentineHerr, I've updated the list above. Could you please try implementing those (hopefully all pretty easy) and see how the list looks?

Site names are now listed in
sites_where_age_have_been_changed
sites_with_NAC_and_at_least_one_other_age
sites_legitimately_complicated

Thanks. This reduces the number of sites that need review to a manageable number.

I just found an example where a single plots is falsely counted as multiple plots. It is "Kurth_2014_isrr research site in Minnesota USA", "Temperate Deciduous Forest. Stand established around 1950/1951/1952". The same study had plots of age 0-1-2 (measured in 3 consecutive years) that are treated correctly. In SRDB, age 60 is given to all 3 instances of the older plot.


Calendar -- subsequent imports duplicate

They should update (ad new items or change hose changed in the meantime) but not duplicate new unless doing so will be very slow.

slow is not as much of a problem as correctness. Updating would not be doable unless we mark extra information on each block about which were a google cal import and which weren't. What's the use case here? just re importing today if new items get added to your calendar same day?

I had three events imported. Then modified one and added one. Imported again I got 7 events of which 2 duplicated and 1 in the current and old version and one Okay.

Audit: Won't do - could revist with interest


LSTM - Issue with model fitting using ragged tensor

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
OS Platform and Distribution : Linux Ubuntu 16.04 / Google Colab
TensorFlow installed from (source or binary): Google Colab
TensorFlow version (use command below): 2.4.1
Python version: 3.6.9
CUDA/cuDNN version: Not used
GPU model and memory: None

** Problem Description**
I'm working on classification of ECG signals into 4 classes. Each sequence to be classified has potentially different lengths. Sequences are stored into a ragged tensor.
The model is based on LSTM layers. Unfortunatly when I try to fit the model using the function "fit" there is a problem about matrix size incompatibility:
InvalidArgumentError:  Matrix size-incompatible: In[0]: [32,18000], In[1]: [18286,256]
	 [[node sequential/LSTM_1/lstm_cell/MatMul (defined at <ipython-input-7-36997f53d4b2>:19) ]] [Op:__inference_train_function_6985]

Nevertheless, when I use a subset of this exact dataframe (25 sequence of 8500+), the training is going well to the end.
I have verified, there are no Nan of None in my sequences.
Describe the current behavior
The training of the model returns an error concerning matrix size incompatibility. The training can be performed when using a subset of the dataset.
Describe the expected behavior
Model can be trained well with the entire dataset
Standalone code to reproduce the issue
Notebook link : https://colab.research.google.com/drive/1RdtafxvD_5nqh9-xuG6o8WL4GOd9IZnN?authuser=1#scrollTo=Dzq3tRK9cwbe
Data link : https://drive.google.com/file/d/1V9nNxMehtiwAjNVS-8usTP6Jol9jC6et/view?usp=sharing
Other info / logs
Epoch 1/10
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-7-36997f53d4b2> in <module>()
     17 model.summary()
     18
---> 19 model.fit(xx,yy, epochs=10) # --> Doesn t working with the full dataset, matrix size error

6 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     58     ctx.ensure_initialized()
     59     tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
---> 60                                         inputs, attrs, num_outputs)
     61   except core._NotOkStatusException as e:
     62     if name is not None:

InvalidArgumentError:  Matrix size-incompatible: In[0]: [32,18000], In[1]: [18286,256]
	 [[node sequential/LSTM_1/lstm_cell/MatMul (defined at <ipython-input-7-36997f53d4b2>:19) ]] [Op:__inference_train_function_6985]

Function call stack:
train_function

Thanks in advance

@sebgra
I am unable to access the notebook shared, please refer to this link meanwhile and let us know if it helps.

@Saduf2019
cardiology_challenge_2017.zip
Here's the .py code
Original file is located at
https://colab.research.google.com/drive/1RdtafxvD_5nqh9-xuG6o8WL4GOd9IZnN
"""
from google.colab import drive
drive.mount("/content/drive")
"""# Importing Libraries"""
import numpy as np
import tensorflow as tf
import keras
import pandas as pd
import plotly.express as px
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
"""# Reading Database"""

df = pd.read_pickle('/content/drive/MyDrive/Cardiology/Data_Set/Cardiology_Dataset') # Full dataset : Cardiology_Dataset file
#--> https://drive.google.com/file/d/1V9nNxMehtiwAjNVS-8usTP6Jol9jC6et/view?usp=sharing
df

"""# Implementing Model"""

xx = tf.ragged.constant(df['Sequence'])

yy = tf.one_hot(df['Label'],4)
xx.bounding_shape()[-1]

#max_seq = X_train.bounding_shape()[-1]
max_seq = xx.bounding_shape()[-1]
print(f'Maximum length sequence : {max_seq}')

model = keras.Sequential([
                          tf.keras.layers.Input(shape=[None, max_seq], dtype=tf.float32, ragged=True),
                          keras.layers.LSTM(units=64, activation='tanh', dropout=0.2, name = 'LSTM_1', return_sequences=True),
                          keras.layers.LSTM(units=256, activation='tanh', dropout=0.2, name = 'LSTM_2',return_sequences=True),
                          keras.layers.LSTM(units=100, activation='tanh', dropout=0.2, name = 'LSTM_3', return_sequences=False),
                          tf.keras.layers.Dense(units=4, activation='sigmoid', name = 'Dense_1')
])

model.compile(optimizer=keras.optimizers.Adam(learning_rate=0.001),loss=tf.keras.losses.CategoricalCrossentropy(from_logits=True), metrics=['accuracy'])

model.summary()

model.fit(xx,yy, epochs=10) # --> Doesn t working with the full dataset, matrix size error

"""# Subset of the original dataset --> Working"""

sub_df = df.head(25)

xx_sub = tf.ragged.constant(sub_df['Sequence'])

yy_sub = tf.one_hot(sub_df['Label'],4)

max_seq = xx_sub.bounding_shape()[-1]

model = keras.Sequential([
                          tf.keras.layers.Input(shape=[None, max_seq], dtype=tf.float32, ragged=True),
                          keras.layers.LSTM(units=64, activation='tanh', dropout=0.2, name = 'LSTM_1', return_sequences=True),
                          keras.layers.LSTM(units=256, activation='tanh', dropout=0.2, name = 'LSTM_2',return_sequences=True),
                          keras.layers.LSTM(units=100, activation='tanh', dropout=0.2, name = 'LSTM_3', return_sequences=False),
                          # tf.keras.layers.LSTM(4),
                          #tf.keras.layers.Flatten(name = 'Flatten'),
                          tf.keras.layers.Dense(units=4, activation='sigmoid', name = 'Dense_1')
])

model.compile(optimizer=keras.optimizers.Adam(learning_rate=0.001),loss=tf.keras.losses.CategoricalCrossentropy(from_logits=True), metrics=['accuracy'])

model.summary()

model.fit(xx_sub,yy_sub, epochs=10, shuffle=False) # --> No problem with a subset of the original dataset, why ?

@Saduf2019 , @sebgra , Even though I didn't run your code, I think that your Input Layer's shape declaration is causing the error. You declared the shape to [None, max_seq] , but it would only be compatible for tensors having that exact shape. Since you used ragged tensors and since the shape of all the sequences are not same i.e. not equal to [None, max_seq] , the code is running into the error. Try changing the Input Layer's shape to [None, None] and check if it works.

@around-star This modification returns an error concerning the dense layer :
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

@sebgra i see . Thats one contraint with Dense layers. The feature of the data along the axis which they perform the dot product , needs to be of constant len/size. I would suggest to try padding along the last axis or make some changes in the network so as not to include any Dense layer.

@around-star I have made a version of this network with padding. But I am still confused about the performance of the network with zero padding which seems to descrease the performances.

@sebgra
I ran the code shared and face a different error, please find the gist here.
Please refer to above comment and let us know.

@Saduf2019 That is because you're trying to read a .py file, which is a script and not the data.
Try to replace  :
df = pd.read_pickle('/content/cardiology_challenge_2017.py')
By :
df = pd.read_pickle('/content/drive/MyDrive/Cardiology/Data_Set/Cardiology_Dataset')
Which should correspond to the path of the data available at :
https://drive.google.com/file/d/1V9nNxMehtiwAjNVS-8usTP6Jol9jC6et/view?usp=sharing

Was able to reproduce your issue in Tf Nightly 2.6.0-dev20210603, please find the gist here. Thanks!

System information
* Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

* OS Platform and Distribution : Linux Ubuntu 16.04 / Google Colab

* TensorFlow installed from (source or binary): Google Colab

* TensorFlow version (use command below): 2.4.1

* Python version: 3.6.9

* CUDA/cuDNN version: Not used

* GPU model and memory: None

** Problem Description**
I'm working on classification of ECG signals into 4 classes. Each sequence to be classified has potentially different lengths. Sequences are stored into a ragged tensor.
The model is based on LSTM layers. Unfortunatly when I try to fit the model using the function "fit" there is a problem about matrix size incompatibility:
InvalidArgumentError:  Matrix size-incompatible: In[0]: [32,18000], In[1]: [18286,256]
	 [[node sequential/LSTM_1/lstm_cell/MatMul (defined at <ipython-input-7-36997f53d4b2>:19) ]] [Op:__inference_train_function_6985]

Nevertheless, when I use a subset of this exact dataframe (25 sequence of 8500+), the training is going well to the end.
I have verified, there are no Nan of None in my sequences.
Describe the current behavior
The training of the model returns an error concerning matrix size incompatibility. The training can be performed when using a subset of the dataset.
Describe the expected behavior
Model can be trained well with the entire dataset
Standalone code to reproduce the issue
Notebook link : https://colab.research.google.com/drive/1RdtafxvD_5nqh9-xuG6o8WL4GOd9IZnN?authuser=1#scrollTo=Dzq3tRK9cwbe
Data link : https://drive.google.com/file/d/1V9nNxMehtiwAjNVS-8usTP6Jol9jC6et/view?usp=sharing
Other info / logs
Epoch 1/10
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-7-36997f53d4b2> in <module>()
     17 model.summary()
     18
---> 19 model.fit(xx,yy, epochs=10) # --> Doesn t working with the full dataset, matrix size error

6 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     58     ctx.ensure_initialized()
     59     tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
---> 60                                         inputs, attrs, num_outputs)
     61   except core._NotOkStatusException as e:
     62     if name is not None:

InvalidArgumentError:  Matrix size-incompatible: In[0]: [32,18000], In[1]: [18286,256]
	 [[node sequential/LSTM_1/lstm_cell/MatMul (defined at <ipython-input-7-36997f53d4b2>:19) ]] [Op:__inference_train_function_6985]

Function call stack:
train_function

Thanks in advance

did you solve it ?

This hasn't be solved yet. The only solution that I've found is to pad sequence with zeros to get series of the same time. Indeed, the power of the model is unfortunatly decreasing.

sorry for my late reply . yes, this is my problem too .. can i use reshape ?

Only zero padding help me to make it works but not as efficient as it could. I'm still searching for a slolution

@around-star

i see . Thats one contraint with Dense layers. The feature of the data along the axis which they perform the dot product , needs to be of constant len/size. I would suggest to try padding along the last axis or make some changes in the network so as not to include any Dense layer.
Could you elaborate on this please? I don't get it why the Dense layer can't infer the shape in that network. As I understand even if input was [None, None], shape before Dense would be [None, 100] (None for batch) as we don't return sequences in the last LSTM, but only a final state.

@sebgra Tried to reproduce the code and had the same problem. However, Embedding layer helps and I think it might be crucial there:
x1 = tf.ragged.constant([[1, 2, 3, 4, 5], [8, 9], [10, 11, 12, 13], [1, 2, 3]])
y1 = tf.constant([[0, 1, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0],])
model1 = tf.keras.Sequential([
                          tf.keras.layers.Input(shape=[None], dtype=tf.int32, ragged=True),
                          tf.keras.layers.Embedding(15, 4),
                          tf.keras.layers.LSTM(units=64, activation='tanh', dropout=0.2, name = 'LSTM_1', return_sequences=True),
                          tf.keras.layers.LSTM(units=256, activation='tanh', dropout=0.2, name = 'LSTM_2',return_sequences=True),
                          tf.keras.layers.LSTM(units=100, activation='tanh', dropout=0.2, name = 'LSTM_3', return_sequences=False),
                          tf.keras.layers.Dense(units=4, activation='sigmoid', name = 'Dense_1')
])

model1.compile(optimizer=tf.keras.optimizers.Nadam(learning_rate=1e-3),
          loss='categorical_crossentropy',
          metrics=['accuracy'])
model1.summary()
model1.fit(x1, y1, batch_size=2)

Doc: https://www.tensorflow.org/guide/ragged_tensor#keras

@mathshangw , I played a bit with a notebook you have shared and found,

**Dimensions are mixed up **:  intf.keras.layers.Input(shape=[None,max_seq], we want max_seq to be a sequence len, but instead it defines the features vector size of a timestep, see the tf.print output from call:  [32 1 18000]

Keras somehow failed in getting the bounding shape of the ragged tensor, it used 18000 instead of 18170. However, it doesn't seem like a Keras bug to me, because no one wants to train LSTM with a variable size feature vector..

The solution is mentioned in @GlaIZier comment "Embedding layer helps" to add feature dimension, it's size it just a constant.

It sounds like this issue can be closed.

@vitaly-d I'm still trying to make @GlaIZier 's answer to work, but I'm facing a new error which is :
InvalidArgumentError:  indices[32] = -9 is not in [0, 18287) 	 [[node sequential_18/embedding_15/embedding_lookup_ragged/embedding_lookup  (defined at /usr/local/lib/python3.7/dist-packages/keras/layers/embeddings.py:191) ]] [Op:__inference_train_function_219565]
The corrected code is :
`model = keras.Sequential([
tf.keras.layers.Input(shape=[None], dtype=tf.float32, ragged=True),
tf.keras.layers.Embedding(18286, 4),
keras.layers.LSTM(units=64, activation='tanh', dropout=0.2, name = 'LSTM_1', return_sequences=True),
keras.layers.LSTM(units=256, activation='tanh', dropout=0.2, name = 'LSTM_2',return_sequences=True),
keras.layers.LSTM(units=100, activation='tanh', dropout=0.2, name = 'LSTM_3', return_sequences=False),
# tf.keras.layers.LSTM(4),
#tf.keras.layers.Flatten(name = 'Flatten'),
tf.keras.layers.Dense(units=4, activation='sigmoid', name = 'Dense_1')
])
model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=0.001),loss=tf.keras.losses.CategoricalCrossentropy(from_logits=True), metrics=['accuracy'])
model.summary()
model.fit(tf_X_train, y, epochs=20, batch_size=2)
`
Where y is the one hot encoded on 4 classes of my corresponding sequences, and 18286 the result of my tf_Xtrain.bounding_shape()[1]
What would be a good reproducible solution ?
Thanks in advance

As @vitaly-d mentioned you have problems with your data.  You need to preprocess it properly.
LSTM expects data with [batch, time_step, features] shape. Your shape is [batch_size, 1, time_steps].
Embedding expects data in [batch, time_step] (taking into account that your feature length is 1 like for strings/words) and makes it [batch, time_step, feature/embedded vector], which is fully compatible with LSTM. Furthermore, my guess is that Embedding layer doesn't support negative numbers, which can be found in your sequences
So,
without Embedding you input should be smth like: [[[128], [157], [189], [226]], [[123], [232]]]. It might not work though as I mentioned in my previous post, thus padding to the same length might be necessary.
with Embedding: [[128, 157, 189], [123, 232]] without negative numbers

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


Problems with regenerator-transform while compiling

I have been trying to build the Chrome extension here on Ubuntu.  I get the following error:
><EMAIL_ADDRESS>copyfiles /home/joey/SYNC/src/xBrowserSync-App
> cross-var n-copy --source $npm_package_config_platformPath --destination build "*" "**/*" && n-copy --source . --destination build "app.html" "css/*" "img/*" "fonts/*" "views/*" && n-copy --source fonts --destination build/fonts "**/*" && n-copy --source node_modules/font-awesome/fonts --destination build/fonts/font-awesome "**/*"

/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^

ReferenceError: Unknown plugin "transform-runtime" specified in "/home/joey/SYNC/src/xBrowserSync-App/node_modules/regenerator-transform/package.json" at 0, attempted to resolve relative to "/home/joey/SYNC/src/xBrowserSync-App/node_modules/regenerator-transform" (While processing preset: "/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-preset-es2015/lib/index.js")
    at /home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17

I can actually fix that error by running:
( cd node_modules/regenerator-transform && npm install )

But then I get another error:
/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^

Error: Options {"loose":true} passed to /home/joey/SYNC/src/xBrowserSync-App/node_modules/regenerator-transform/node_modules/babel-preset-env/lib/index.js which does not accept options. (While processing preset: "/home/joey/SYNC/src/xBrowserSync-App/node_modules/regenerator-transform/node_modules/babel-preset-env/lib/index.js") (While processing preset: "/home/joey/SYNC/src/xBrowserSync-App/node_modules/regenerator-transform/node_modules/babel-preset-env/lib/index.js") (While processing preset: "/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-preset-es2015/lib/index.js")
    at /home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:314:17
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/home/joey/SYNC/src/xBrowserSync-App/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)

I have tried with node v8.9.3 and node v10.1.0 and npm v5.4.1 and npm v6.1.0.  Using nvm here.  Also tried with yarn a bit.  Consistently got the same results.
I did get a couple of warnings from npm:
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

and
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

May I ask:

What platform are you using?  (I could also try on the Mac I have at work.)
What versions of node and npm are you using?
Do you have a package-lock.json or a yarn.lock file you could share with me?

(I recommend adding package-lock.json to the repository, just as a history of which packages worked when.  You can remove it and rebuild it whenever you like.)

Unfortunately there wasn't a package-lock.json for the current version, it's something I'm currently addressing. Those errors you're getting are from dependencies as xBrowserSync doesn't directly depend on babel, nor use prepublish scripts.
I'll have these dependency issues resolved when I release the next version, which will include a package-lock.json. Apologies for the trouble!
(btw, the build should work both on Windows and Linux as I use both platforms)

Just ran the following on my windows box:
npm install
npm run build:chrome

and the build ran successfully. Could be a linux issue, try running npm install --unsafe-perm then re-run the build.

I tried on my MacBookPro and got the same errors! (--unsafe-perm also the same.)
So I would urge you to keep good backups of your node_modules folder etc., because there might be something magical happening on your machine! ;-)
The same bug has been reported on the cross-var repo, but no solutions yet.
I tried a couple of fixes, but still can't get past the {loose: true} error.
(Adding babel-plugin-transform-runtime to our package.json does get past the first error message, although I do appreciate that should not be the responsibility of this app! An alternative is to move it from devDependencies into dependencies in cross-var's package.json, and then do a similar fix for babel-plugin-transform-flow-strip-types in babylon's devDependencies. For some reason npm isn't pulling in the devDependencies of child modules even when I ask it to!)
I notice you are pinned to cross-var=1.0.3 but I tried with the latest 1.1.0 with no improvement. Babylon uses cross-env which is very popular, so might be an alternative solution worth trying.

Great work @joeytwiddle! Are you up for replacing cross-var with cross-env and submitting a pull request? I've switched the default branch to v1.4.0, would you be able to switch to this branch and then submit the change, if so I can test the change on my Windows machine and then incorporate it with the upcoming release.

I will have a try, so that you can get back to the Firefox addon. :sunglasses:

Oh, I think I know why these packages can't find their dependencies.
It's because I am using the latest versions of npm and yarn, which flatten the module tree.
I suspect these packages are trying to load things specifically from deep node_modules folders, e.g. doing require('../node_modules/' + pluginName) instead of just require(pluginName). That would have worked before flattening.
If there is no way to disable flattening in npm/yarn, I will try an older version of npm. (You never did tell me what version you are using, but I'm guessing it's not recent!)
It would be good to document in the README what is the recommended development environment (node and npm versions).
(I like using nvm to have different versions of node installed on Linux/Mac.)

Hmm, I'm actually on Node LTS (v8.11.1) and npm v6.1.0 and I'm not having this issue, I need to give it a try on my laptop running Ubuntu. Since it is working on Windows with latest npm I would suspect it is more of a package issue as you previously mentioned rather than an inherent npm issue?

@joeytwiddle I believe this issue has been resolved with the most recent commit. I've tested on an Ubuntu box with the following specs:

Ubuntu 16.04.4 LTS
Node v9.10.1
NPM v6.0.0

If you get a chance could you clone the most recent v1.4.0 to a new dir, then run npm install and npm run build:chrome and see if you get any errors?
I'm going to close this for now, I'll re-open if you still have problems after the latest commit.
If you do get around to creating a pull request to switch from using cross-var to cross-env that would be great, otherwise I'll add it to my list of dependencies to evaluate after v1.4.0 has been released. 😄

I decided to just do the replacement as it was quick enough, in 8c701c1.

Out of interest, I tried with node v8.9.3 and npm v5.4.0. The installation and the build passed with no warnings or errors!
The build took only 17 seconds, outputting 52 files.
Thanks for this nero120. The ability to compile it makes it much more likely that I will contribute in future!

Great stuff @joeytwiddle, thanks for testing it!


User should see FaceVerification liveness best practices

[ ] where and when should we show this to the user
[ ] head straight, camera eye level, natural expression, even and good lighting

@LiavGut @tomerGD Waiting for your response

@yaroslav-fedyshyn-nordwhale @sirpy

Add text below the title:
"Please frame your face in the oval."
remove the "X" (close) button
Change the text below the oval to:
"Just like a passport picture, keep your head straight,
eyes at camera level, and good, even lighting."

*** Please verify new text sizes, margins, line space, and overall positioning ***
Let me know if we have issues with small devices regarding the text amount.
Thanks.
https://xd.adobe.com/view/e8a0b4a4-abcc-403b-9110-c0940dbb3db5-bdf3/

@liavgut i've been thinking more about something in case he fails liveness

@sirpy ?

@LiavGut
we don't have full access to the FV components to customize/manipulate with its text or layout. The Zoom's API allows us to add only one string with explanations and it will be displayed in different places depends on device screen size (see sample image - the pink text is our customizable string - https://prnt.sc/u25jte)

@yaroslav-fedyshyn-nordwhale Ok, I'll find a different place for it. Thanks.

@yaroslav-fedyshyn-nordwhale @sirpy
Let's change the text on the Zoom native error screen (ie. "let's try again")
Change the text below the photos to:
"Just like a passport picture, keep your head straight,
eyes at camera level, and good, even lighting."

Checked on QA V1.1.3-3
LG V30+ // Android 8.0 // Google Chrome 85.0.4183.81
Desktop: Windows 10 // Google Chrome  85.0.4183.102

@AnastasiiaOdnoshevna Yes, we've shortened the text so it'll fit.
Thanks! :)

@sirpy The text is correct


Add support for a separate alpha image, both compressed and uncompressed

I'm happy with the RGTC part of this, am considering the uncompressed alpha and generating some comparisons.

This is now in the ycocg-alpha branch where I have edited the language a bit and will update the reference implementation before merging to master. Still considering uncompressed alpha. Comments welcome - especially if you think I've messed up the spec, I trimmed some of your changes.

Probably use HapA as identifier for alpha-only, and HapM for either Scaled YCoCg DXT5 + alpha (and if uncompressed and RGTC alpha are both allowed, they will share identifiers). Refer to alpha-only as "Hap Alpha-Only" and Y+a as "Hap Q Alpha". This will be documented when I address #4.

The spec will probably

explicitly permit any single-texture format on its own inside a multi-image top-level section
explicitly require that dimensions match (without padding) for multi-image sections with colour + alpha textures.

That all makes sense to me.

I'm going to merge the ycocg-alpha soon - I've disallowed uncompressed alpha as the quality of RGTC1 seems good - it's similar or better than the quality of the rest of the codec formats. Happy to hear any arguments for its inclusion though.


Is there an example / documentation ?!

[Enter feedback here]

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

ID: 99a93860-0460-2f14-dce9-e485d3735371
Version Independent ID: bf7bec96-f6aa-cc76-4779-5245fcd14323
Content: Supported Microsoft Defender Advanced Threat Protection response APIs - Windows security
Content Source: windows/security/threat-protection/microsoft-defender-atp/supported-response-apis.md
Product: m365-security
Technology: mde
GitHub Login: @mjcaparas
Microsoft Alias: macapara

Hello, thanks for your attention, I would like to ask about these api functions, can I really call them and how to call them, im kinda building a av that work with windows defender, some thing for the collage, i really would like to figure it out ! At least how to load them, the article does only show the functionality of each one, a example would help, or at least the header file and the parameters needed....thank you again for your time and have a nice day

The page you refer to is obsolete and I'll remove it.
The samples for the APIs mentioned in this doc are available at: https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/machineaction and https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/files.

The page you refer to is obsolete and I'll remove it.
The samples for the APIs mentioned in this doc are available at: https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/machineaction and https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/files.


Build failed with an exception

i have followed all the instruction given to link it to my react-native android project but it took me into a problem,
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to  element at AndroidManifest.xml:7:5-117 to override.

my settings.gradel

rootProject.name = 'Example'
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
include ':@react-native-community_async-storage'
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
include ':react-native-maps'
project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-sqlite-storage'
project(':react-native-sqlite-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sqlite-storage/src/android')
include ':lottie-react-native'
project(':lottie-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/lottie-react-native/src/android')
include ':react-native-linear-gradient'
project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android')
include ':app'

Mainapplication.java

package com.examle.anim;

import android.app.Application;
import org.pgsqlite.SQLitePluginPackage;
import com.facebook.react.ReactApplication;
import com.imagepicker.ImagePickerPackage;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import com.airbnb.android.react.maps.MapsPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import com.facebook.soloader.SoLoader;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import com.airbnb.android.react.lottie.LottiePackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new ImagePickerPackage(),
            new AsyncStoragePackage(),
            new MapsPackage(),
            new RNGestureHandlerPackage(),
  new RNFirebasePackage(),
new RNFirebaseNotificationsPackage() ,
new RNFirebaseMessagingPackage(),
new SQLitePluginPackage(),
              new LinearGradientPackage()
      );
      packages.add(new LottiePackage());
    }

    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }

}

3. build.gradel
    dependencies {
    implementation project(':react-native-image-picker')
    implementation project(':@react-native-community_async-storage')
    implementation project(':react-native-sqlite-storage')
    implementation project(':react-native-maps')
    implementation project(':react-native-gesture-handler')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation project(':react-native-linear-gradient')
      implementation "com.google.firebase:firebase-messaging:17.5.0"
  implementation 'me.leolin:ShortcutBadger:1.1.21@aar' // <-- Add this line if you wish to use badge on Android
  implementation "com.google.firebase:firebase-core:16.0.8"
      implementation project(':react-native-firebase')
      implementation project(':lottie-react-native')
}

my file that will show the animation
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View } from 'react-native';
import Animation from 'lottie-react-native';

export default class lottieloader extends Component {
  componentDidMount() {
    this.animation.play();
  }

  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to Lottie Animations :-)</Text>
        <View>
          <Animation
            ref={animation => {
              this.animation = animation;
            }}
            style={{
              width: 80,
              height: 80
            }}
            loop={true}
            source="soda_loader.json"
          />
        </View>

      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#A6207E'
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
    color: '#ffffff'
  }
});

AppRegistry.registerComponent('lottieloader', () => lottieloader);

Expected Behaviour: it should show an animation at application start
Actual behavior:  unable to build the app
Versions
 React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
      Memory: 75.60 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.4.0 - /usr/local/bin/node
      Yarn: 1.15.2 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 26, 27, 28, 29
        Build Tools: 28.0.3, 29.0.1
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.4 AI-183.6<IP_ADDRESS>22156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3
      react-native: 0.59.5 => 0.59.5

I have the exact same problem. Any ideas how to fix this?

Which version of lottie-react-native are you guys using? Take into account AndroidX support was introduced on 3.0.4 and it won't work with apps not supporting AndroidX

My react-native version is 0.59.3 and as per the readme, I installed the latest version of lottie-react-native. After a lot of to and fro, version 3.0.1 worked.
Also in MainApplication.java => List<ReactPackage> getPackages() function i had to add new LottiePackage() to the returning Array as opposed to what's written in the readme

Getting the same runtime error while building the app.
I'm using the lottie-react-native: 3.0.3, and react-native 0.59.3 for supporting the android 64-bit architecture to comply with the Google play store compliance.


Don't list AWS instances until they are actually ready

AWS instances boot in an unusual way, with various stages of "readiness".  Wait until they are fully booted before returning them when listing instances to prevent code getting confused by instances being in weird states.
In contrast, when retrieving a single instance by ID, we will try to return it whatever the state; we presume the client knows what it is doing.

LGTM


Redactor field in front end form

Sorry if this has been answered but I have a front-end redactor form and this sucker works great but on the sprig reload the redactor js and css files no longer manipulate the field.  What would you suggest is the best way to solve this.

The Redactor field will likely need to be re-initialised on each component re-render. The htmx:afterSwap event allows you to  runu JavaScript code each time the component is re-rendered. Not sure why the CSS stops working, make sure your CSS code is not inside the Sprig component.
Put this JS code in the parent template as per the recipe at https://putyourlightson.com/sprig-cookbook#refreshing-components .
<script>
htmx.on('htmx:afterSwap', function(event) {
    // Initialise Redactor
});
</script>

That works! Thanks, Ben... solid name ;).  The plugin is really incredible!

Glad to hear it, Ben!


updated project targets and references to net6

closes #48

There must be a new branch for this.
Every blazor version needs to go into its on base branch.


crashed when "toutchscreen settings" button in menu was pressed

I have lenovo yoga 2 pro
the crash happens right after I press the button
here's my log
https://mclo.gs/AZVewig

my fault. i listed the mod as working for 1.20.1-1.20.4, when it currently only works for 1.20.1. my bad! ill fix it soon.

The version for 1.20.4 works too now. you can download it here
https://modrinth.com/mod/touchscreenfix/version/biX9lSDf


Small suggestion

It is becoming very difficult to keep track of all the available hooks and what they do. A simple way to make it easier would be adding a one liner description to the list in the startup settings, just to know what each hook is supposed to do.

I would like to second this suggestion. A discriptor next to each would be very helpful.

Done


Possible mistake?

section
Guest users using Personal accounts will experience more limitations due to sign-in restrictions.
"They can use consumption experiences in the Power BI service through a web browser"
Can they? Can you please check this statement. Thanks in advance

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

ID: 725c3bff-b250-c882-6f2b-1f2cb7f00341
Version Independent ID: f48832e7-8fc5-498a-8522-435a8ce42129
Content: Distribute content to external guest users with Azure AD B2B - Power BI
Content Source: powerbi-docs/service-admin-azure-ad-b2b.md
Service: powerbi
Sub-service: powerbi-admin
GitHub Login: @kfollis
Microsoft Alias: kfollis

Thanks for your comment, @chizhova.
I've assigned this issue to the doc author for review.

Need update please.
Under Assign a Power BI Pro license to guest user
https://docs.microsoft.com/en-us/microsoft-365/admin/manage/assign-licenses-to-users?view=o365-worldwide#assign-licenses-to-users-on-the-licenses-page
Nothing about assigning a license to a guest user.

Hi @chizhova,
We've update this article since you submitted this Issue. I'm going to close this because the article has been updated and also because it is true that guest users can consume content using Power BI service.  If you feel that this Issue is not resolved, please let us know.
Thank you for your feedback,
The DOCS team


Added "Accept-Encoding" header with "gzip, deflate"

Added Axios "Accept-Encoding" header with "gzip, deflate" to support larger requests

Thanks @jazibsawar 🙌


feat(select): add Select and Option component

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines: https://github.com/wc-catalogue/blaze-elements/blob/master/docs/CONTRIBUTING.md#commit
[x] There are no linting errors and code is properly formatted (your run before push yarn ts:format && yarn ts:lint:fix)
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior? (You can also link to an open issue here)
<select> element does not have blaze wc component
What is the new behavior?

<select> has <bl-select> as blaze wc component
<option> has <bl-option> as blaze wc component

Example
<bl-select value="en">   <bl-option value="cs">Cesky<bl-option>   <bl-option value="en">English<bl-option> </bl-select>

English is highlighted as selected
Value of bl-select is actual selected option

Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

Thank You @Hotell for your time & gr8 review 🚶


Fix globbing of filenames that contain special glob characters

When specifying a coverage filename using the COVERAGE_FILE environment variable, special characters are not handled correctly. I use that facility to set the name of the coverage file to match the name of the test that I am running in pytest, so that I can associate the coverage with the specific test that generated that coverage. Some test names contain brackets, so the name of the test might be exampletest[b-a], and I transform that name into .coverage.exampletest[b-a] and then run
COVERAGE_FILE=.coverage.exampletest[b-a] pytest --cov "exampletest[b-a]"

Which results in the error:
re.error: bad character range b-a at position 5

Any special characters in a filename specified for creating a new file should be escaped before globbing for similar filenames.

This is now released as part of coverage 6.4.3.


SPIR-V compilation error and segfault on RX 6800

Hello,
This program and the other ncnn-vulkan image upscalers don't work on my system since I switched to an RX 6800, other vulkan programs such as games or vkFFT work  fine. This is the error I get.
WARNING: radv is not a conformant vulkan implementation, testing use only.
[0 AMD Radeon RX 6800]  queueC=1[4]  queueG=0[1]  queueT=2[2]
[0 AMD Radeon RX 6800]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon RX 6800]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon RX 6800]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
compile spir-v module failed
ERROR: 0:10: 'constant_id' : only allowed when generating SPIR-V
ERROR: 0:10: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

The "compile spir-v module failed" part repeats a lot of times and the program eventually segfaults. I've tested it with the RADV and AMDVLK backends but it doesn't help. This is on kernel 5.12.8 and mesa 21.1.1.

Upon further testing I found out that this is related to the AUR package waifu2x-ncnn-vulkan-git. The issue is not present if I build the program according to the instructions in the README. The AUR package however uses these two specific arguments while during configuration: -DGLSLANG_TARGET_DIR=/usr/lib/cmake  -DUSE_SYSTEM_NCNN=on, the issue only occurs if the program is built with these options. The issue is probably caused by the AUR package or the libraries on my system so I'm closing this.

@d0809 Do you have an idea what caused this? Was it the version of your system-wide ncnn? Lib path wrong? I'm having the same errors and the gentoo ebuild uses the same options but I'm not sure I want to use the ncnn from this repository, even as a troubleshooting measure. I'm wondering if there's just maybe an incompatible version somewhere.

@catthou a newer ncnn solved the problem for me. just copy and digest the ncnn ebuild:
cp ncnn-20210525.ebuild ncnn-20210720.ebuild
ebuild ncnn-20210720.ebuild digest

then edit waifu2x-ncnn-vulkan-20210521.ebuild and change the RDEPEND to accept the new  ncnn version.
RDEPEND="
    ~dev-libs/ncnn-20210720[vulkan]

then digest it too:
ebuild waifu2x-ncnn-vulkan-20210521.ebuild digest
then you can emerge -1 ncnn waifu2x-ncnn-vulkan


⚠ Bofrost.de has degraded performance

In 1c7728a, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 825 ms

Resolved: Bofrost.de performance has improved in df5d899.


Lost Market Money

Lost 30k to selling a Ditto on the market

Krothesis -Solosis 10000,  Ferroseed 8500, Riolu 13000

Lost Buneary, worth 7500, IGN: TheTunzo

IGN: MoloCreator - UnBreed 5x31 Timid Rotom, worth 34 000

IGN - ZackieKun Lost two mon.  Textured Mew priced at 45k. Textured Groudon priced at 50k. Both were quest mon I was selling. Had pretty good ivs too.

IGN - Aliskiren Lost unbreed ferroseed worth 10k

I lost breedable Mimikyu for 25k and breedable Raltz for 10k IGN: kary33

IGN - Kirikoz Lost unbreed chansey worth 10k

my friend TheBestGirl_WGF lost her quilava that yesterday she put in the market for 8.000

IGN - dsdsdsdsds Wailmer put on market for 9.5k disappered while I was not logged in, no usual message on Discord noting sale, unsure if I got the money or not.

IGN- PrimalCyndaquil. Was an eevee for roughly 10k, not sure exactly.

IGN- Draisaitl_
HA timid eevee 5.5k unbreedable
HA calm eevee 5.5k unbreedable
bold HA HP-fire eevee 12.5k unbreedable
recieved no funds for any of these and none are on the market anymore.

IGN- Hikaritokage
It looks like I lost my ferroseed, mareanie, and chansey I put on the market yesterday. I have not gotten any messages about them being sold, but it looks like 1 of them was sold cause my money went up. They were all 3 around 13,000.


add native split_part to the cross db utils

Describe the feature
Right now, dbt offers native support for any cross-db macros, including split_part. The implementation in dbt-spark right now is fairly complex, given that there's not native support for split_part in spark. This gets especially complex for negative arguments to the function, which relies on some heavy string parsing to properly translate a negative arg into the appropriate index in the array. Given that databricks natively supports this function including negative part_numbers, it may be a good idea to implement here to avoid this complex logic.
Describe alternatives you've considered
Do nothing, inherit from dbt-spark
Additional context
Please include any other relevant context here.
Who will this benefit?
package maintainers like me!
Are you interested in contributing this feature?
For sure

dbt-labs/dbt-spark #689 added support for negative part_number argument to dbt-spark. Like @dave-connors-3 mentioned, dbt-databricks will just inherit this logic, so it is not strictly necessary to override it.
But providing a native implementation might be as simple as copy-pasting the logic from the default implementation:
dbt/include/databricks/macros/utils/split_part.sql
{% macro databricks__split_part(string_text, delimiter_text, part_number) %}

    split_part(
        {{ string_text }},
        {{ delimiter_text }},
        {{ part_number }}
        )

{%- endmacro %}

Or just inherit the default from dbt-core:
{% macro databricks__split_part(string_text, delimiter_text, part_number) %}

    {{ dbt.default__split_part(string_text, delimiter_text, part_number) }}

{%- endmacro %}

:warning: Caveat
I didn't check one way or the other if the semantics of split_part in Databricks would necessitate bifurcated logic like in here.
This inherited test in dbt-databricks includes a negative test case as-of dbt-core v1.6, so it should catch cases where any new implementation is off.


Issue on certain environments :"Format of the initialization string does not conform to specification starting at index 0." ---> System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0

Hi
I have a pipeline with 3 tasks. DEV and SYS work fine.
When I clone the task to our UAT environment I get this error:
Exception calling ".ctor" with "1" argument(s): "Format of the initialization string does not conform to specification starting at index 0." ---> System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0
I'm trying to figure out what could cause this exception. It must be a problem with our environments and not your code because is works on 3 out of 3 environments, but I was wondering if you might have an idea what could cause this. Initial googling pointed to discussions about the connection string (not related to dbup) but our connection string is fine because our dbup console application runs fine from visual studio against the same database as the one thats failing in the pipeline.
Thanks

Sorry, but I have no idea.
But you can diagnose the issue yourself by downloading this folder to your environment and execute the powershell manually.
I suspect it is something with the c# part in DatabaseWithDbUp.ps1 that fails. Perhaps is it because you have not got the .NET Core SDK installed on that machine?

Thank you very much for your reply. It was useful to see the powershell scripts but we were unable to fix the issue. My team has no control over these environments that were set up hundreds of years ago.
Managed to work around it by using your Azure DevOps extension on some environments and deploying and executing a console app on other environments.

Glad to hear that you got past the issue somehow. Thanks for the follow up!


fix regex for kind/api-change labels

What this PR does / why we need it:
Fixes the labels for kind/api-change
Special notes for your reviewer:
Following the examples from upstream kubernetes documentation: https://github.com/kubernetes/community/blob/master/contributors/guide/owners.md#filters
Release note:

NONE

cc @rthallisey @rmohr

/lgtm
/approve

/retest

/ok-to-test

/retest-required


Don't make assumptions about the username field

The USERNAME_FIELD exists to allow customisation. Therefore we should make an assumption that .username exists on the model. Instead, we need to pull the required value from the USERNAME_FIELD and add in a fallback default.
Thanks for contributing to Wagtail! 🎉
Before submitting, please review the contributor guidelines http://docs.wagtail.io/en/latest/contributing/index.html and check the following:

Do the tests still pass? (http://docs.wagtail.io/en/latest/contributing/developing.html#testing)
Does the code comply with the style guide? (Run make lint from the Wagtail root)
For Python changes: Have you added tests to cover the new/fixed behaviour?

Thanks @nanorepublica! We have a custom user model with a non-default USERNAME_FIELD defined in our test fixtures, but evidently we're not exercising that here:
https://github.com/wagtail/wagtail/blob/56f29a0825acd10ad4d1746d4c90ed4732486ca7/wagtail/tests/customuser/models.py#L85
We should add this to our test coverage.

Hi @gasman, I now have some spare time to work on this now. What tests are required to get this merged?
In my opinion, to sufficiently cover all the scenario's it would require duplicating all existing tests where the CustomUser is used in place of the EmailUser. This, however, feels extreme and naive given I have just been a user of wagtail to date and not a contributor.
Any guidance on what tests would be required would be helpful.

Hi @nanorepublica,
As I recall I had a brief look at adding tests for this, but found that there were other non-obvious customisations needed - to the admin login form, possibly? - to get Wagtail working with a username-less User model to the point where it could be tested. Hopefully you have more familiarity with those customisations than I do!
It won't be necessary to duplicate the full set of user-related tests - I think it would be enough to have a single test that calls the test helper's login method and confirms that it results in a logged-in user (e.g. by fetching /admin/ and getting back a 200 OK response).
If you're willing to add further tests to cover the other user-management views, then I definitely wouldn't say no to that - it sounds like we're lacking in test coverage for this sort of user model, and even if they do work in the current version, it's the sort of thing that could easily get broken in a future refactor if there aren't any tests to catch it. I wouldn't say that's a requirement for the current pull request, though.

This is a note to myself and others who are interested.
So adding a test for this will be difficult. I have started by overriding AUTH_USER_MODEL to the customuser.EmailUser, however, that leads to an error in the new test due to all foreign keys (initially the PageRevision model) are pointing to customuser.CustomUser when the test database is set up.
My current thinking is to have a second test database for the email custom user as Django doesn't have the concept of 2 user tables in a single database. So I am thanking either to use database routers or add functionality to the runtests.py script. The functionality required is to set AUTH_USER_MODEL to a specified model before the migrations run for a test run.

@gasman I have been pondering over this for a couple of days and I see a few options available.

Add in a second test run to the CI with the customuser.EmailUser Model, which would run against all existing tests. This is required since migrations that a run at the beginning of a test run hook everything up to the customuser.CustomUser model meaning that overriding AUTH_USER_MODEL for one test doesn't work. This might be better as a separate PR as I would have no idea what if anything else would break as a result. If this route was chosen, it would be great to understand or pointed of which CI I ought to be adding to (circle or travis)

Similar to the above but switch from customuser.EmailUser as the default, this has the benefit not adding another whole test run, but would catch assumptions made to date about the username field.

Look to mock the DB layer, so a simple test changing the EmailUser model works.

Not test it?

I would appreciate your thoughts about which you would prefer. My preference is for #1

@nanorepublica Thanks for looking into this. Yep, it does sound like this is a job for a separate test run. It would make sense for that to be part of the Travis config, as it's a similar situation to the Elasticsearch tests (although this one shouldn't be in the allow-failures list - that's only the case for elasticsearch because those are intermittently flaky...) It's also fine for it to just run the tests that are most likely to touch the user model (presumably wagtail.admin, wagtail.core and wagtail.users).
Since the tests are a bigger job than I'd anticipated, I think we shouldn't let them block this immediate fix - so I'll go ahead and merge this now so that it can be included in Wagtail 2.6.

Merged in b9816d194a47bcb96b9e5f1d07c6e99fb76c0b3e.

Great stuff. I may have a look at the test case since I have started, but I am not promising anything soon :)


Facing memory issue while loading the bigquery table data through python.

Hi, while trying to fetch the data of 1.8 M rows from Bigquery to local machine, we are getting Memory Error.
Import pandas_gbq as pgbq
df= pgbq.read_gbq(sql, dialect)

I'm sorry you are having this issue.  Unfortunately, pandas_gbq isn't maintained in this repository:  you probably need to report the issue over there.
As a check, can you try iterating over the results the same query using just google-cloud-bigquery facilities?  E.g.:
from google.cloud.bigquery import Client

client = Client()
query = client.query(sql)
row_count = 0
for row in query:
    row_count += 1

You could also try converting to a dataframe directly using google-cloud-bigquery:

from google.cloud.bigquery import Client

client = Client()
query = client.query(sql)
dataframe = query.to_dataframe()

@tseaver : Hi Tres, I have tried to implement your suggestion but now it is showing
IOError: [Errno 22] Invalid argument

@HarshCHhz Are you using the legacy dialect for your query?  Also, can you please provide the full traceback?

@tseaver : I am using standard dialect for the query.
Traceback (most recent call last):
File "filename_path.py", line 416, in
args.specialstrings
File "filename_path.py", line 362, in main
run()
File "filename_path.py", line 288, in run
sourcewisefilename= generatecsv(sqlinput[i], csvfilename,title[i])
File "filename_path.py", line 82, in generatecsv
client = Client()
File "C:\Python27\lib\site-packages\google\cloud\bigquery\client.py", line 127, in init
project=project, credentials=credentials, _http=_http)
File "C:\Python27\lib\site-packages\google\cloud\client.py", line 216, in init
Client.init(self, credentials=credentials, _http=_http)
File "C:\Python27\lib\site-packages\google\cloud\client.py", line 129, in init
credentials, _ = google.auth.default()
File "C:\Python27\lib\site-packages\google\auth_default.py", line 277, in default
credentials, project_id = checker()
File "C:\Python27\lib\site-packages\google\auth_default.py", line 138, in _get_explicit_environ_credentials
os.environ[environment_vars.CREDENTIALS])
File "C:\Python27\lib\site-packages\google\auth_default.py", line 63, in _load_credentials_from_file
with io.open(filename, 'r') as file_obj:
IOError: [Errno 22] Invalid argument: '=path.json'

@tseaver so this error is caused by this issue

Traceback (most recent call last):
File "file.py", line 415, in
args.specialstrings
File "file.py", line 361, in main
run()
File "file.py", line 287, in run
sourcewisefilename= generatecsv(sqlinput[i], csvfilename,title[i])
File "file.py", line 82, in generatecsv
query = client.query()
TypeError: query() takes at least 2 arguments (1 given)

@HarshCHhz do you see the MemoryError when iterating row-by-row, or only when converting the query to a dataframe?

After converting to dataframe
On Thu, Aug 30, 2018, 7:31 PM Tres Seaver<EMAIL_ADDRESS>wrote:

@HarshCHhz https://github.com/HarshCHhz do you see the MemoryError when
iterating row-by-row, or only when converting the query to a dataframe?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5859#issuecomment-417329968,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AfhePWk3Njukbd1fKDobzwR3nw2wwjaJks5uV_A2gaJpZM4WRLLj
.

OK, looking at google.cloud.bigquery.table.RowIterator.to_dataframe, I can see that it is pulling the whole rowset into memory before constructing the pandas.Dataframe.  @HarshCHhz can you try with the following patch applied?
--- a/bigquery/google/cloud/bigquery/table.py
+++ b/bigquery/google/cloud/bigquery/table.py
@@ -1166,9 +1166,9 @@ class RowIterator(HTTPIterator):
             raise ValueError(_NO_PANDAS_ERROR)

         column_headers = [field.name for field in self.schema]
-        rows = [row.values() for row in iter(self)]
+        rows = (row.values() for row in iter(self))

-        return pandas.DataFrame(rows, columns=column_headers)
+        return pandas.DataFrame.from_records(rows, columns=column_headers)

 class _EmptyRowIterator(object):

@HarshCHhz Thank you for the report!