clickhouse-keeper readiness probe failing

It seems like the readiness probe for clickhouse-keeper example is failing because zk_peer_state does not exist in clickhouse-keeper mntr. When a node is a follower zk_peer_state does not exist: https://github.com/Altinity/clickhouse-operator/blob/master/deploy/clickhouse-keeper/clickhouse-keeper-3-nodes.yaml#L182
Would it be sufficient to just be "ruok" ?

@a-dot, looks like 3 nodes is completelly broken ;( sorry for that,
I tried to remove any readyness, and add only liveness ruok monitor on zookeeper-exporter container, but looks like something wrong with quorum in clickhouse-keeper ;(
continue to figure out

It seems to be a little bit hit or miss but I'm having a semblance of reliability if I leave the livenessProbe for zookeeper-exporter untouched and modify the readinessProbe for clickhouse-keeper to:
OK=$(bash -c 'exec 3<>/dev/tcp/<IP_ADDRESS>/2181 && printf \"ruok\" >&3 && timeout 5 cat <&3');
if [[ \"$OK\" == \"imok\" ]];
then
  exit 0;
else
  exit 1;
fi

That way all 3 nodes come up and I seem to have quorum. At least I think that's what these messages mean?
<Information> RaftInstance: [VOTE_RESP] peer 3 (0), resp term 1, my role candidate, granted 2, responded 2, num voting members 3, quorum 2
[...]
<Debug> KeeperDispatcher: Quorum initialized

fixed on https://github.com/Altinity/clickhouse-operator/releases/0.18.4


Ca/webrtc frontend 2

This PR is aimed at cleaning up the codebase and promoting some consistency through out, removing (16 )unused components from past iterations, confusing comments, as well as removing unused imports in many many places.
Changes:

updated the reducer tests (business and ui) to match the current default state.
turned on the http test in jest.  noticed it is failing. @MajorLift is this related to the http package we were talking about yesterday?
all other tests passing as before
Found and removed the following unused components:

components/composer/NewRequest

GRPCProtoEntryForm
Header
FieldEntryForm

components/containers

ViewRequestDetails

components/display

CloseBtn
CookieTable
CookieTableCell
CookieTableRow
OpenBtn
RequestTabs
ResponseCookiesDisplay
ResponseEventsDisplay
ResponseSubscriptionDisplay
ResponseTabs
SSE Row
Tab

Note: Components/composer/NewRequest/ProtocolSelect: this file is not being used in the app, but still being tested in the jest tests.  leaving this in for now, but it is producing a false positive in the tests.  Will make an issue that tests should be adjusted to account for the new way of selecting protocols

hmm this actually looks to be failing the gRPC tests, both locally and in TravisCI. Going to close this and investigate.


Create integration test to verify M3DB handles timezones correctly internally

Spin up a node in one timezone, create a client with another timezone, and then verify that everything is written / read correctly.

Handled by #379


Check for required PHP extensions upon plugin initialization

Feature Description
Our plugins requires on things like libxml, DOMDocument, etc. to be available. Let's add some checks for these required features upon plugin initialization so that users know immediately when their server is not compatible.
The AMP plugin does this like so:
https://github.com/ampproject/amp-wp/blob/5f42cde04d84046e106fa9784d4cf2e61f3ba204/amp.php#L22-L154
We can refactor includes/namespace.php to have similar checks.
Alternatives Considered

Additional Context
There have been some user reports where DOMDocument was not available, or libxml was outdated. Hence the requirement for this.

Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance Criteria

Implementation Brief

@spacedmonkey FYI. I think we discussed this at some point

We like the logic from the amp plugin. I think we should move the logic from amp plugin into the stories plugin. However, I think that the logic should be formatted in a class, called say Compatibility. It would take a WP_Error object as a dependancy and would have method that would add errors to this object.
As an object, this makes the code really easily to reuse.
Here is what I had in mind for implementations. ( dumby code ).
 * @return void
 */
function activate( $network_wide = false ) {
      $_error         = new \WP_Error();
      $compatibility  = new Compatibility( $_error );
      $compatibility->run_checks();
      $error          = $compatibility->get_error();
      if ( $error->errors ) {
             wp_die( $error );
     }

Similar logic can be reused like this.
 * @return void
 */
 function _print_admin_notice() {
      $_error         = new \WP_Error();
      $compatibility  = new Compatibility( $_error );
      $compatibility->run_checks();
      $error          = $compatibility->get_error();
      if ( ! $error->errors ) {
          return;
      }
		?>

			<?php esc_html_e( 'Web stories plugin unable to initialize.', 'amp' ); ?>

			<?php foreach ( array_keys( $error->errors ) as $error_code ) : ?>
				<?php foreach ( $error->get_error_messages( $error_code ) as $message ) : ?>

						<?php echo wp_kses_post( $message ); ?>

				<?php endforeach; ?>
			<?php endforeach; ?>

	<?php
}

or in CLI
if ( ( defined( 'WP_CLI' ) && WP_CLI ) || 'true' === getenv( 'CI' ) || 'cli' === PHP_SAPI ) {
      $_error         = new \WP_Error();
      $compatibility  = new Compatibility( $_error );
      $compatibility->run_checks();
      $error          = $compatibility->get_error();
      if ( ! $error->errors ) {
         $body = $error->get_error_message();
         if ( class_exists( '\WP_CLI' ) ) {
		\WP_CLI::warning( "$body" );
         } else {
	    echo "$body\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
         }
      }
}

Each check could be a different method,

missing_extensions_check
missing_classes_check
missing_functions_check
php_version_check
wp_version_check
code_built_check

With way you could bundle multiple checks together or just call what you need.

function activate( $network_wide = false ) { ... }

I don't see why this check would need to run on site activation? 🤔

Similar logic can be reused like this.
or in CLI

There's some repetition when doing new Compatibility( $_error ) [...] once for each context. Why not just do the checks once and print the results differently depending on the context?

missing_extensions_check
missing_classes_check
missing_functions_check

If a class or a function is missing, it's because it's part of an extension that is missing/incomplete. So I'd just move this into one function that checks for the extension requirement.

code_built_check

Just noting that, if the plugin hasn't been built yet, then there is no autoloader and the Compatibility class won't be available.
Also, today we only care about JS being built if not using WP-CLI. If using WP-CLI it doesn't matter whether the JS has been built or not. Need to preserve this.

/cc @westonruter - perhaps you could share some insights into how you came up with the current solution in the amp.php plugin file and if there is something we haven't considered?
Perhaps we could collaborate on this to create something both plugins could use?

I don't see why this check would need to run on site activation? 🤔

I think these checks should also happen on activation. If you try and activate the plugin and there is a missing extension, this should show a wp_die message, the same as a wrong version of PHP or WordPress IMO.

There's some repetition when doing new Compatibility( $_error ) [...] once for each context. Why not just do the checks once and print the results differently depending on the context?

Sounds good. Again, this was dumby code, we can talk about this in implementation stage.

If a class or a function is missing, it's because it's part of an extension that is missing/incomplete. So I'd just move this into one function that checks for the extension requirement.

This was just copied from the AMP implementation, but this is good through when writing the code and something to note in CR.

Just noting that, if the plugin hasn't been built yet, then there is no autoloader and the Compatibility class won't be available.

If the class doesn't exist, we can just load the file in manually, "the old fashioned way".
I would love to find a way to share code between these two projects would be great.
Keeping this as a class, that you can set class properties of functions, extenstions, class, min php and WP versions, that would keep it very generic and reusable for any WordPress plugin.

perhaps you could share some insights into how you came up with the current solution in the amp.php plugin file and if there is something we haven't considered?

Yes. The reason why all of the checks are inside of amp.php is primarily because of the PHP version. We do these checks before and without the autoloader because we want to make sure that all of the checks work in PHP 5.2. If we used the autoloader, then the amp.php to do this, then we'd not be able to use any PHP language features newer than 5.2. Only if all checks pass do we then proceed with loading the autoloader and bootstrapping the plugin.
This is probably less important now that WordPress core has PHP version checks built-in, but that's the original reason for doing this.

We do not have to use namespacing or autoloading this Compatibility class to be a class. As said above, we can just load this class ( file ) in the old fashioned way and not namespace it.

Let's try this then 👍

Note that we now have a polyfill for mbstring (#4898), no need to check for that.


Expand the module connection

Extend the connection between charging coil and PCB to seperate them

Tested the extended connection of  PCB and the charging coil using crocodile clips and wires with a current supply. The connection works perfectly. Need to solder the connections and complete the task.


Installation wizard

I would like to make my application TCP port configurable and let user decide its number in the wizard. Here is my docker-compose.yml file:
version: '2'
services:
  web:
    image: portainer/portainer:1.12.4
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    network_mode: host
    command:
      - --bind $PORTAINER_BIND

How should I implement it in the wizard/install.json file so the PORTAINER_BIND variable can be defined by a user during the installation process?

Hi @stefaniuk,
I tried to do an example, please refer to https://github.com/chihhunglin/container-apps/
step1: edit list.json
    {
        "description": "Simple management UI for Docker.",
        "repository": "dockerhub",
        "arch": "amd64",
        "displayName": "Portainer",
        "name": "portainer",
        "version": "1.12.4",
        "location": "https://hub.docker.com/r/portainer/portainer/",
        "type": "app"
    },

step2: add a new folder (portainer) and the required files in template

@chihhunglin thanks for your comment. With the help of our installation wizard I figured it out.
It is not very clear from the documentation that QPKG manual also applies to the qnap-dev/container-apps repo.


An error with the session is shown several times in the log when you connect emondrian with Excel or similar clients

If you access to emondrian from Excel ou similar clients as SSAS, in the log the following message is displayed:
ERROR 2021-08-04T08:29:21.763 mondrian.xmla.XmlaServlet [] - No login credentials for found for session [ccjvf4g7te]
It appears in each access to emondrian from Excel.

It's fixed and patched in release v<IP_ADDRESS>


[ISEC-1584] Add GHAS security scanning

What:
Creating a github action to do the equivalent of default security scanner, but with self-hosted infrastructure. Ticket: ISEC-1584
Why:
Running on self-hosted infrastructure saves costs compared to github cloud runner minutes.

No self-hosted runners are assigned to this repo. Enabling default scanning and leaving PR open


Multiple isolated worlds on individual threads.

I have a bunch of simulations that should all run in isolation. I have it working on a single thread, updating each simulation one after the other.
I'm hoping to move simulations to their own threads but I'm noticing some weirdness in the collision detection. Should there be any issues with updating, collision detection on multiple worlds in multiple threads given that each thread should have it's own unique state? Are there any static data/singletons that might cause issues?
Thanks.

In poking around I see there's a lot of static data in MemoryManager which is probably the cause of the issues I'm seeing.

Yes in the current version of the library the memory allocators are static and shared between multiple worlds and there might be some issues if you are using some multi-threading here. Note that ReactPhysics3D doesn't officially support multi-threading yet.
First, can I ask you if you are noticing some weirdness in the collision detection only if you are using multi-threading ?
Maybe you can try to add mutexes at the beginning of the allocate() and release() methods of the different memory allocators (DefaultPoolAllocator and SingleFrameAllocator classses) to see if it helps. This is what will be done in the next release of the library.

Yes the problem only appears in multi threaded versions. In single threaded I've had no issues.
For the moment to get past the blocker I've put a mutex around the function that does all the physics work and that appears to solve the issue, although obviously locking out a big chunk of code makes a lot of the multi thread work redundant.
I saw in another issue that you were planning for 0.8.0 to support threading. Is that still the plan? Will that be coming out any time soon?

I initially planned to integrate multi-threading collision detection in version 0.8.0. Unfortunately, some other parts took me quite some time and therefore it won't be part of version 0.8.0. I will probably release v0.8.0 this week or the next one. In this release, I use some mutexes in the memory allocators and therefore, it might solve your issue.

That's unfortunate. But the good news is that putting the mutexes into the allocators seems to have made it behave. It's still early in testing but hopefully that will get the job done for now.

Ok perfect. I am closing the issue. Do not hesitate to reopen it if needed.


Edit actions are available only in IE

Open the context menu for the editor in https://microsoft.github.io/monaco-editor/playground.html
Edit actions (copy, paste & cut) are available only IE.

I don't even see it in the latest version of Edge, they only show up for me in regular IE. Looks like this is the code where they are defined:
https://github.com/Microsoft/vscode/blob/47e5582d87210a65f87e3d7922ba97fa8b2c7dc0/src/vs/editor/contrib/clipboard/browser/clipboard.ts

Also on Linux pasting by pressing the middle mouse button doesn't work.

Paste does not seem to work in FF, Chrome, and Safari but on IE. Is that the reason, it is restricted here.
I have created a very simple example for the cut-paste command execution.

There we are querying the DOM api if these commands are supported. We need to revisit if browsers truthfully answer and if document.queryCommandSupported is implemented as expected.

In all browsers, Ctrl+X, Ctrl+C and Ctrl+V do what they should do without any prompts.
IE11

the context menu will contain Cut, Copy and Paste
when running from file:// or from http://localhost, clicking in the context menu works without any prompts.
when running from a different origin, clicking in the context menu will prompt and ask the user if they want to grant clipboard access

Edge, Chrome and Firefox

the context menu will contain Cut and Copy, and clicking in the context menu works without any prompts.
there is no way to trigger paste from a click handler in these browsers.


MongoDB of with schema v9 after two migrations

#1272

try running poetry update && poetry install && make squeaky-clean all test brute-force-all


Accept any materializer type param for S3's chunkUploadSink

When I originally added this functionality I mistakingly hardcoded the type parameter to NotUsed rather than just using _ (which means don't care). While this may initially seem like a non-issue, a problem eventuates if you happen to use a Sink that materializes a value that is contained within a Future i.e. Sink[(UploadPartResponse, immutable.Iterable[C]), Future[Done]]. Such sinks are quite common and there is no way to get a value outside of a Future aside from blocking (which you should never do in production code) in order to satisfy chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), NotUsed].
Note that since chunkUploadSink ultimately ends up getting used in .alsoTo whos materializer type argument param is also _ (see https://github.com/apache/incubator-pekko/blob/1b1f57224b409c8b2cbd5267ace814439e97d3ea/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala#L3464) and the fact that we are only dealing with type parameters which get erased at runtime means that this change is completely safe for the 1.0.x series (in fact it shouldn't even generate any bytecode difference either way, all this does is make scalac satisfy code where the materializer type param is not NotUsed)

Sure

@pjfanning https://github.com/apache/incubator-pekko-connectors/pull/278 has been approved

@pjfanning #278 has been approved

That PR is merged. Could you rebase this?

@pjfanning The relevant tests passed (including MiMa check)


Mapping result of querySync into store

Hello. Thank you for all the libraries which you've made.
I'm wondering if there is a way to map values from url query-params into store? I have this such code
const $tags = createStore<string[]>([]);
const setTagsFromUrlEvent = createEvent<string>();

querySync({
    clock: setTagsFromUrlEvent,
    source: { filters: $tags },
    route: meetingsRoute,
    controls,
});

Imagine that somewhere in application I changed query-params and now my url is ?filters=apple,banana,lemon. My $tags is an array of ["apple", "banana", "lemon"]. When I reload my page $tags will be initialised with a string apple,banana,lemon. How can I map values? I've tried to use effect but it didn't help

simple way map data without querySync


Calling module and resource

Hi Team,
We have a terraform code block like below, how can we add this in our terragrunt.hcl file? Due to the module name, we got confused with this:
resource "civo_firewall_rule" "http_ingress" {
  firewall_id = module.k3s_test_dev_fra1.firewall_id
  action      = "allow"
  protocol    = "tcp"
  start_port  = "80"
  end_port    = "80"
  cidr        = var.allowed_http_ips
  direction   = "ingress"
  label       = "Web Ingress - HTTP"
}

Hello,
values can be passed through inputs attributes(passed value can be read from dependencies outputs)
https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#inputs
https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#dependencies


Bot Channel Registration page is not available in the azure resources (It is deprecated), Kindly provide the alternate solution

[Enter feedback here]

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

ID: 7e551722-8247-39ba-b32b-b7a7ac3b4523
Version Independent ID: 0524edfc-51e3-52dd-7334-fd5e2fa169dc
Content: Configure custom channel, or bring your own channel
Content Source: ce/customer-service/configure-custom-channel.md
Service: dynamics-365-customerservice
GitHub Login: @neeranelli
Microsoft Alias: nenellim

Hello @davidimmanuel007
You can instead use the Azure Bot Service. To learn how to register, see Register a bot with Azure Bot Service.
Thanks,
Jaya


Fix missing newline between metrics when collecting #15

Resolves #15
Motivation and Context
I've tried out the backend in a real project and noticed that collecting breaks -- a missing \n between metrics. See #15
Newlines must be inserted between metrics otherwise parsing fails.
The other implementation of collect does it right, since it does succeed(self.metrics.map { $0.collect() }.joined(separator: "\n"))
The trailing newline is not an issue, so let's go with this rather than reinventing joined manually IMHO

We don't have a CI for PR validation? 🤔

@ktoso do you have time to add some? Otherwise we should think about what we want to go with, maybe try out GitHub Actions?

(I should have time in the next few days if no one else has cycles)

@tomerd seems this project has no CI, do we want to include it in the https://ci.swiftserver.group perhaps? It's a pretty small/quick build.

Oh, that'd be awesome! Reverse engineering the setup, looks like it's using the docker compose configs to run the tests with the right setup?

Yeah correct, we use docker to have a well defined and "run the same env" locally "on linux" (on mac on docker) when testing locally as on CI.
@tomerd maintains that CI so ultimately his call, but I think it'd be nice to be able to offer it to projects if they don't have their own setup. OR we set up travis / circle / githubactions or anything here. I'm happy to help on that once we decide that we need.

Cool, I'm good with any solution overall, but might be nice to start with an "externally accessible" build/CI system so projects that want to move into the SSWG can start-then-continue with one of travis/circle ci/github. Otherwise there might be some pressure to migrate into this blessed-but-closed CI system.
I might be over thinking it a bit, but enough projects bootstrap via cargo-culting that allowing new projects to copy-paste best practices they can use from existing projects could be nice.

If you want to set up CI in any other way here, please do ;-) just mentioning the option exists. No strong feelings either way

(Your reply was very nice! Thank you so much for offering; I’m also noodling on big-picture ideas but like leveraging maintained infra other SSWG projects use in general. Thanks for talking it through with me!)

I used to have circle set up for this repo, not sure where that went off to. I'll investigate. @ktoso thanks for the PR!

Found out it was me who had a setting wrong in CircleCI regarding forked PRs. I'll push something to this branch to trigger a build

Cool, we have Circle then, thank you @MrLotU 🙏

Sweet! Thanks @MrLotU & @ktoso 🎉

Yay, great to have CI back, thanks @MrLotU


Add random seeding.

Hi @heckj , I think I misunderstood your last comment. Just added seeding support, but still not as flexible as d3 :)


query Deal library

create a function to

input

map with ID ,bond id ,can be CUSIP/ISIN/ China Bond ID

history

True -> include all history snapshots
False -> only fetch latest available  ( response with warning if it's too old )

production

True -> only fetch deal models with QA
False -> any deal models available in the library

update doc

https://github.com/yellowbean/AbsBox/commit/b934379d020dbf5904b5e98abf5ea89125a968cc
WIP, need to include authentication

https://github.com/yellowbean/AbsBox/commit/94d9c5de95020a536e9fa8fae9207fba7fd7bed6
Authentication done

https://github.com/yellowbean/AbsBox/commit/46148b31ab193703171f2358dda6368f3fea576b


"Open in Terminal" cannot find "wt.exe"

I'm running Windows 11 Pro 23H2, with Windows Terminal 1.20.11381.0 installed through the Microsoft Store.
with SourceGit 8.17, I get the following error popup when I click the "Open in Terminal":

NOTE: it seems like this is only an issue if SourceGit is configured to use "Default Shell in Windows Terminal", if I explicitly select a shell ("Git Bash", "PowerShell", or "Command Prompt") then I get the expected shell in a new tab in WT.
the only difference I see with explicitly selecting "PowerShell" for this, is the tab itself shows the full path to pwsh.exe whereas creating a new tab in WT directly just says "PowerShell".

first tab opened by SourceGit, second tab opened in WT directly.

This software uses the PATH environment variable to find the location of wt.exe.

This software uses the PATH environment variable to find the location of wt.exe.

fair enough, and that is a pretty standard way of handling access to applications that may or may not be installed, or that can be installed to anywhere the user chooses.. obviously this is also why explicitly selecting "PowerShell" as the shell to use works, because in my system the folder with pwsh.exe is in my PATH environment variable.
the problem here is that Windows Terminal installs to C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_<VERSION>_x64__<IDENTIFIER>, as seen in my screenshot of Explorer:

but this C:\Program Files\WindowsApps, at least in Windows 11, seems to be some new kind of special folder.. I can navigate to the folder seen above if I "open file location" from the WT process in Task Manager, but trying to navigate there from my "C:" in Explorer shows up as a hidden folder (which I always keep visible anyway) and then simply refuses to open.
furthermore, while it may work to explicitly add this to my PATH variable, because in includes a version number, this path will change when WT is updated. so that's not a valid solution.
there must be a better way to launch WT, but I'm not sure how to make use of that from an app built using C#.. I am currently at work and busy with other things, but I've made a note to dig into this some more when I get home later.

It looks like the only way to specify a window title for PowerShell launched via Process.Start is to add the argument - Command "& { $Host.UI.RawUI.WindowTitle = 'My Custom Title'; }", the PowerShell window title you see when you manually open pwsh seems to be a special behavior of Windows itself.

alrighty, I think I've figured it out.. I had a "simple" environment config issue on my end.
when I checked my Windows 10 system, specifically I found an entry for %USERPROFILE%\AppData\Local\Microsoft\WindowsApps in my PATH variable. checking this folder, I see what appear to be shims of some kind the the "currently installed version" that I found the path to earlier.
adding this path to the PATH variable in my Windows 11 machine exposed wt.exe (and a bunch of other things that I was looking for) to my environment, and now SourceGit's "open in terminal" action works with the "Default profile in Windows Terminal" option.
definitely not a bug.. 🎉 maybe worth adding a note to the readme though? it could fit in quite nicely with the other environment-related config info.


Update copyright date to 2022 in footer

Just changes date in footer svelte file to 2022 from 2021.

 Update copyright date in footer


OpenGL Shaders are Broken in Bundled Levels

Not sure whose bug this is. When running the game with -force-glcore to get around hardware/software limitations, a lot of shaders are completely broken, such as:

"Enraged"
Checkpoints
Explosions
Dust/Wind

Screenshots are Linux, but I also confirmed it to happen on Windows with a fresh install of BepInEx, PluginConfigurator, and AngryLevelLoader.

Found a starting point: [Error  : Unity Log] Desired shader compiler platform 15 is not available in shader blob
It might be related to how asset bundles are built

I made this little guide a while ago for UNIX compatibility, but it may still apply. This fixed mods such as WafflesWeapons as well.

 I made this little guide a while ago for UNIX compatibility, but it may still apply. This fixed mods such as WafflesWeapons as well.

I already use path methods but I will try building bundles with the second method. If it works, it means the problem is on the rude side

It is indeed related to rude side and the second method worked. I will release a new version with the included levels built with the correct build method

Thanks for the consideration for us OpenGL players. Any ETA on when we could see these fixes pushed?

Thanks for the consideration for us OpenGL players. Any ETA on when we could see these fixes pushed?

New builds on discord should be supported. I am having issues getting the correctly built bundles since I did not build them and also I want to make a quick update which will decrease bundle sizes before pushing. Sorry for the delay, please contact hola and horror on discord if you want to get the correct versions of the bundles at the moment

1.0.2 contains doilus map which is open gl friendly. Couldn't get the world series from hola because he had trouble exporting it. On discord, maps should be configurable if authors installed the latest update for rude

This issue should be solved, due to addressable shader linking and newly built levels being built with correct shader variants

Forgot to come back and report results. Working on Windows, MacOS, and Linux.


Error: in the react-native-tab-navigator page no  change

in the react-native-tab-navigator page no  change, use the chats in one TabNavigator.Item ,when change the page to another, the page chart still show in page, no hide.

my mistake .  i hava solved it

my mistake .  i hava solved it

me，too！ how to solved it？


Enable CLI to work with both secured/none secured EdgeXFoundry instances

🚀 Feature Request
Description
EdgeX Foundry could work in two modes - secure and none secure.
When security is off all micro services are accessible and could be called from outside.
When security is On, there is a single entry point - gateway that accepts https requests and requires Authorization Header.
Here it is how you could create a user with name tony that belongs to pre-existent group - admin.

docker-compose -f docker-compose-geneva-redis.yml  run --rm

--entrypoint /edgex/security-proxy-setup edgex-proxy --init=false --useradd=tony --group=admin

Once the user is created a token is provided.
This token could be used for accessing edgex services by sending it in the Authorization Header.
More about Gateway security : here
Describe the solution you'd like
The token could be created only by executing the above command locally on the EdgeX Server. So lets assume that the token is already created and ENV variable is created with the token value on the machine where edgex-cli is running.
Propose Name for env variable could be : EDGEX_ACCESS_TOKEN
configuration.tolm file content will be different depending on the EdgeX Foundry security mode.
If the security is Off: the content should be :

[Service]
security= false
[Clients]
[Clients.Metadata]
Host = 'localhost'
Protocol = 'http'
Port = 48081
[Clients.CoreData]
Host = 'localhost'
Protocol = 'http'
Port = 48080
[Clients.Scheduler]
Host = 'localhost'
Protocol = 'http'
Port = 48085
[Clients.Notification]
Host = 'localhost'
Protocol = 'http'
Port = 48060
[Clients.Logging]
Host = 'localhost'
Protocol = 'http'
Port = 48061

If the security is On

[Service]
security= true
[Clients]
[Clients.Proxy]
Host = 'gatewayIp'
Protocol = 'https'
Port = 8443

Configuration file, will be filled with the appropriate content during the installation process:
make install - the default will be working in security enabled mode.
make install insecure - work  in security disabled mode.
On start up, edgex-cli should check what is the value of security property
If it is true, all requests towards all edgex microservices  goes through the gateway. Part of the url will be used to identify which EdgeX micro service the request should be routed to.

curl https://:8443/<service_identifier>/api/v1/ping

coredata 48080 -> coredata
metadata 48081 -> metadata
command 48082 -> command
notifications 48060 -> notifications
supportlogging 48061 -> supportlogging
examples:
curl https://:8443/coredata/api/v1/ping
curl https://:8443/metadata/api/v1/ping
curl https://:8443/command/api/v1/ping
and etc.
Each request should contain the special  two Headers:

Authorization: EDGEX_ACCESS_TOKEN

host: edgex

Current Edgex-CLI implementation use go-mod-core-contracts models and Interface clients - that are not prepared to work in security mode. First Go-mod-core -contract should be updated appropriately and used in the Edgex-CLI.
(I am still not sure if the security mode need to be implemnted for edgex api v1, or to come when working with edgex API v2 )

I thought we'd ruled out support for secure mode as the client for the initial release?

Isn't this a duplicate of issue #101?


"Fine-tune InceptionV3/ResNet50 on a new set of classes" doesn't work, while VGG16 works (suspect BN)

The following code works as expected with vgg16 (no BN) but not with resnet50 or inception_v3 (BN). My hypothesis is that it's due to BN. The code follows "Fine-tune InceptionV3 on a new set of classes" from https://keras.io/applications/#usage-examples-for-image-classification-models
from keras.preprocessing import image
from keras.applications import resnet50, inception_v3, vgg16
from keras.models import Model
from keras.layers import Dense, GlobalAveragePooling2D, Input
from keras.optimizers import Adam
import numpy as np

batch_size = 50
num_classes = 2

#base_model = resnet50.ResNet50
#base_model = inception_v3.InceptionV3
base_model = vgg16.VGG16

base_model = base_model(weights='imagenet', include_top=False)
x = base_model.output
x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(num_classes, activation='softmax')(x)
model = Model(inputs=base_model.input, outputs=predictions)
for layer in base_model.layers:
    layer.trainable = False

model.compile(loss='sparse_categorical_crossentropy',
              optimizer=Adam(lr=0.0001),
              metrics=['acc'])

x_train = np.random.normal(loc=127, scale=127, size=(50, 224,224,3))
y_train = np.array([0,1]*25)
x_train = resnet50.preprocess_input(x_train)

print(model.evaluate(x_train, y_train, batch_size=batch_size, verbose=0))
model.fit(x_train, y_train,
          epochs=100,
          batch_size=batch_size,
          shuffle=False,
          validation_data=(x_train, y_train))

Just checked with TF 1.5 and Keras master, and the behavior is unchanged. Also identical on CPU (which I didn't check before).
@fchollet, it appears to be a serious problem, because AFAIK I follow (simple) docs to the letter.

I am having the exact same issue. Inception does not work but VGG does fine. InceptionV3 picks the same class every time no matter what the test set is

same issue when I try ResNet50 in keras

I have tried using different way to optimize(Adam, SGD, SGD with momentum and so on) when I trained the ResNet50, finetune and just freeze all the layers except fc layer, My training loss is decreasing, but val accu is increasing and then just as you say, stopping at 50% ~60%......

I am having the same problem with Inception-v3 and I posted a question for a workaround on stackoverflow:
https://stackoverflow.com/questions/49689122/keras-inception-v3-fine-tuning-workaraound
maybe somebody has a suggestion

I am having the same problem with ResNet50. I am doing transfer learning and the same dataset works for InceptionV3 and DenseNet121, but ResNet seems to always predict one class

For all of you who are affected by this, please have a look at PR #9965. This probllem is caused by the way that the Batch Normalization layer is implemented in Keras.
To understand why this happens we need to understand how the BN works. When the network is in training mode, the mini-batch statistics of BN are used for training the network; when the network is in inference mode, we use the moving mean/var learned during the training. That's all good. The problem is how the layer behaves when it is frozen. Its side-effects are more profound when we use fine-tuning and Transfer Learning.
You see, when frozen and while in training mode the BN continues to use the mini-batch statistics for scaling the training data. This causes the unfrozen/trainable layers to adapt to the scale of the data. Unfortunately during inference mode (predictions) the network will switch to the moving mean/var. If the moving mean/var is different that the mini-batch statistics the data are scaled differently causing massive discrepancies on the accuracy. If you want more info, have a look at the PR.

@ozabluda I'm facing the same problem on Keras 2.1.6 and TensorFlow 1.7. Did you find a solution?
@datumbox I tried installing your branch and it seems to work well. Unfortunately it is not synced with the latest version of Keras. Any plans to merge it with 2.1.6? If not I can do it.

@jksmither Sorry for the late response. I just synced my branch with the latest master and provided a patched fork of 2.1.6. Honestly I would like to see this fixed on master as maintaining a separate fork with the patch is not a viable solution on the long term. I'll probably keep syncing it for as long as we use Keras at work but I can't make any promises.

Did anyone find a concrete solution to this problem? I am also affected by this problem and I am working on  Keras 2.1.6 and TensorFlow 1.7 to train and test my data using InceptionV3 and Resnet50.
I am very new to deep learning and any help will be appreciated.

@shazamkash
This is temp fix:
pip install -U --force-reinstall --no-dependencies git+https://github.com/datumbox/keras@bugfix/trainable_bn

So, this command reinstall keras with fixes, provided by @datumbox.
This works for me (Inception started train normally).

@izharikov @datumbox
Thank you so much for providing this information and the patch. Although are we expecting a permanent fix anytime soon?
Also has anyone faced this problem using just the TensorFlow? Any experience with that?

Thanks for the input. I would advise using the fork 2.1.6 instead of the trainable_bn branch. This is because the fork is synced with the latest stable version of keras, while the trainable_bn even though it's more fresh it's not based on a finalized release.
Unfortunately there are no plans for a permanent fix at the moment. My PR #9965 was rejected (you can read the rational on the link) because it modifies the semantics of trainable. It's not the first time that the BatchNormalization layer forces us to update the semantics of trainable (see version 2.1.3) but it can take a while until such a change gets enough momentum. So maybe on the future if enough people complain about it, it will reopen. Until then I'll do my best to maintain the fork for those of you who are brave enough to mess with custom implementations.

Wow.  Was spinning my wheels for a while with ResNet50 training trying to fine tune until I found these threads.  Same problems.  So batchnorm in Keras = no fine tuning?  Either paste the FC layer on top of trained weights (imagenet) or train from scratch.  I'm working with smaller N's so training from scratch with augmentation is not a defacto solution. A shame too because Transfer Learning is looking more attractive lately - see : "Do Better ImageNet Models Transfer Better?"
Apart from @datumbox's patch, or moving over to another framework, any other workarounds?

for layer in base_model.layers:
        if hasattr(layer, 'moving_mean') and hasattr(layer, 'moving_variance'):
            layer.trainable = True
            K.eval(K.update(layer.moving_mean, K.zeros_like(layer.moving_mean)))
            K.eval(K.update(layer.moving_variance, K.zeros_like(layer.moving_variance)))
        else:
            layer.trainable = False

Just a simple question: why the value 1024 as units in the last dense layer?
x = Dense(1024, activation='relu')(x)

x = Dense(1024, activation='relu')(x) is because

The code follows "Fine-tune InceptionV3 on a new set of classes" from https://keras.io/applications/#usage-examples-for-image-classification-models

For the purpose of this Issue, I was following the docs literally for stronger effect to make my point.

I also suffer from bad validation accuracy of finetuning ResNet50 with some layers set untrainable, on my dataset, but VGG works fine.
I once used keras-retinanet (https://github.com/fizyr/keras-retinanet) to train on my own dataset, which worked very well. Retinanet uses ResNet as backbone, and BatchNormalization layers are frozen, see
https://github.com/fizyr/keras-retinanet/blob/master/keras_retinanet/models/resnet.py#L98
The ResNet in that projects is borrowed from another repo keras-resnet (https://github.com/broadinstitute/keras-resnet). In this ResNet implementation, the authors customize the BatchNormalize layer, see
https://github.com/broadinstitute/keras-resnet/blob/master/keras_resnet/layers/_batch_normalization.py
    def call(self, *args, **kwargs):
        # return super.call, but set training
        return super(BatchNormalization, self).call(training=(not self.freeze), *args, **kwargs)

It seems that this operation is what @fchollet recommends in @datumbox 's PR
https://github.com/keras-team/keras/pull/9965#issuecomment-382801648

I have the same problem with Resnet50.
This seems to work.
-Set the learning phase to 1
-In every batch normalization layer  set Training=False
After that I get the correct accuracy.
K.set_learning_phase(1)

base_model = ResNet50(weights='imagenet', include_top=False)

x = base_model.output

x = GlobalAveragePooling2D()(x)
x = Dense(1024, activation='relu')(x)
predictions = Dense(2, activation='softmax')(x)

model = Model(inputs=base_model.input, outputs=predictions)

for layer in base_model.layers:
    layer.trainable = False

    if layer.name.startswith('bn'):
        layer.call(layer.input, training=False)

@cesarorosco This means that you network runs always on Training mode. Even when you make predictions you use the mini-batch statistics. This is not great as your predictions will change depending on what images you pass on the batch.

If I proceed as @cesarorosco mentionned, things go even worse and I stick around a ~0.5 acc on the learning and validation sets...
It is a bit disappointing to have this kind of problem, especially when this kind of stuff is presented as too simple when using Keras...
It is such a great tool, anyway.

I think I might be affected by a similar issue, except that I am using VGG16 instead. The training goes really well, to be honest a bit unexpectedly well, and it goes beyond 90%. I checked the model accuracy on a testing set and it gives good results and the same thing happens when I check with a confusion matrix. The problem is that, when I try to use the model to predict_classes() on my testing set (the same one that gave good results on accuracy and confusion matrix), the predictions are awfully bad. One class seems to be preferred over the others and I get 0 accuracy in 2 or the 5 classes. I was asked to check this post and I am wondering if anyone could help. Thanks a lot !!

I am having the same issue as well.Inception v3 giving low validation accuracy but high training accuracy.What would be the suggestion to fix this?
Epoch 1/30
185/185 [==============================] - 5478s 30s/step - loss: 0.1161 - acc: 0.9493 - val_loss: 2.4898 - val_acc: 0.5678
Epoch 2/30
185/185 [==============================] - 5453s 29s/step - loss: 0.0362 - acc: 0.9861 - val_loss: 1.1530 - val_acc: 0.7678
Epoch 3/30
185/185 [==============================] - 5457s 29s/step - loss: 0.0280 - acc: 0.9902 - val_loss: 5.4614 - val_acc: 0.4506
Epoch 4/30
185/185 [==============================] - 5458s 30s/step - loss: 0.0184 - acc: 0.9934 - val_loss: 5.2297 - val_acc: 0.5117
Epoch 5/30
185/185 [==============================] - 5474s 30s/step - loss: 0.0146 - acc: 0.9954 - val_loss: 4.2587 - val_acc: 0.5586
Epoch 6/30
185/185 [==============================] - 5463s 30s/step - loss: 0.0113 - acc: 0.9965 - val_loss: 4.5049 - val_acc: 0.6019
Epoch 7/30
185/185 [==============================] - 5467s 30s/step - loss: 0.0099 - acc: 0.9972 - val_loss: 6.9422 - val_acc: 0.3551
Epoch 8/30
185/185 [==============================] - 5467s 30s/step - loss: 0.0099 - acc: 0.9969 - val_loss: 5.8211 - val_acc: 0.4901
Epoch 9/30
185/185 [==============================] - 5466s 30s/step - loss: 0.0112 - acc: 0.9965 - val_loss: 5.2108 - val_acc: 0.5518
Epoch 10/30
185/185 [==============================] - 5471s 30s/step - loss: 0.0113 - acc: 0.9964 - val_loss: 6.1660 - val_acc: 0.5092
Epoch 11/30
104/185 [===============>..............] - ETA: 37:44 - loss: 0.0140 - acc: 0.9958

same issue when I try ResNet50 in keras

Same here too

i tried to run resnet50 model for classifying colors of clothes, i used image net weights and added a globalavg pool layer, 2 dense and dropouts and final output layer with sigmoid/softmax. training goes well for some and i managed to get some accuracies but when i tested my model, the predicitions are all wrong. can anybody help me solve this?

I tried transfer learning on resnet50 in keras for two class classification problem. I only fine-tune the top fully-connected layer, while all other layers are frozen. I encounter the same problem: training accuracy is increasing as expected, but validation accuracy is only between 50-60%.
Have any one had good solutions to overcome this problem in keras, please?

@xhm1014 Pre-compute the vectors using resnet50, then train model with only the dense layers on the vectors. After training, join the dense layers to the resnet50 layers if you want to save the whole network.

@geometrikal
could you provide any example how to do that? i know that this w/a was suggested by the author of keras, but I couldn't find any way how to do that.
It is really shame that official docs doesn't mention this. Any other model than VGG (without BN) is useless if you want to freeze any of the layers.

@BraveDistribution Yea it is a bit strange.
This is how I do it, (taken from my repo here: https://github.com/microfossil/particle-classification/blob/master/miso/training/model_trainer.py )
Functions to make the head and tail:
def resnet50_head(input_shape):
    inputs = Input(shape=input_shape)
    x = Lambda(lambda y: tf.reverse(y, axis=[-1]))(inputs)
    x = Lambda(lambda y: y * tf.constant(255.0)
                         - tf.reshape(tf.constant([103.939, 116.779, 128.68]),
                                      [1, 1, 1, 3]))(x)
    x = resnet50.ResNet50(include_top=False,
                          weights='imagenet',
                          pooling='avg')(x)
    model = Model(inputs=inputs, outputs=x)
    model.get_layer('resnet50').trainable = False
    return model

def tl_tail(nb_classes):
    model = Sequential()
    model.add(Dropout(0.05))
    model.add(Dense(512, activation='relu'))
    model.add(Dropout(0.15))
    model.add(Dense(512, activation='relu'))
    model.add(Dense(nb_classes, activation='softmax'))
    return model

Note the two lambda layers to make the head. The pre-trained ResNet50 uses some pre-processing that takes away the channel averages (of ImageNet). In my datasets I use images scaled to the range [0,1] by divding by 255. So these two layers convert from [0,1] range to correct pre-processing used by the pre-trained network. You can remove them if you are using resnet50.preprocessing() to create the images.
Now create the head and make the vectors:
model_head = resnet50_head(input_shape=(224,224,3))
train_vectors = model_head.predict(train_images)
test_vectors = model_head.predict(test_images)

Make the tail and train with these vectors:
model_tail = tl_tail(nb_classes=N)
model_tail.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
history = model_tail.fit(train_vector,
                                 train_onehots,
                                 validation_data=(test_vector, test_onehots),
                                 epochs=max_epochs,
                                 batch_size=batch_size,
                                 shuffle=True,
                                 verbose=0)

Then if you want to have a network that takes image as input, join them:
outputs = model_tail(model_head.outputs[0])
model = Model(model_head.inputs[0], outputs)

and then you can do
train_preds = model.predict(train_images) etc

Pre-calculating the vectors like this makes training very fast. You can even do it on a CPU.
By the way, my repo is designed for a project where we are enabling non-ML people to train networks. If you are interested see the docs read me here: https://github.com/microfossil/particle-classification-examples and especially the google colab tutorial (and use resnet50_tl as the cnn type)

I also noticed this while training the efficientNet model, which includes BatchNormalization. I observed that it seems like freezing the BN layer, leads to bad accuracy (wrong predictions) in validation phase, while in training phase everything looks fine. When un-freezing the BN, the test accuracy recovers.
Here is an example notebook and here  is some additional information:

@digital-thinking I think it would be interesting to see the results if a very small batch_size(1/2) is used; that is the specific case in which for using pre-trained backbones(especially for segmentation), freezing the BN layer is recommended.

Hi @Nestak2 yes this is what I had to to to get reasonable validation metrics. If you train only the top-layer and don't make Batch Normalization layers trainable, you won't get correct results. If the hole model is trainable, there is no problem.

@digital-thinking Thanks for clarifying! Unfortunately this strategy didn't work out for me - the validation loss and accuracy were bad in both the "warm-up" and the proper training phases. I post the heart part of my code and the training metrics. Can you spot what I am doing wrong? Tnx
image_input = Input(shape=data_shape)
basemodel = ResNet50(input_tensor=image_input, include_top=True,weights='imagenet')
x = basemodel.get_layer('avg_pool').output

x = Flatten(name='flatten')(x)
x = Dense(512, activation="relu")(x)
x = Dropout(0.5)(x)

out = Dense(num_classes, activation='softmax', name='output_layer')(x)
custom_resnet_model = Model(inputs=image_input,outputs= out)

custom_resnet_model.compile(Adam(lr=0.001),loss='categorical_crossentropy',metrics=['accuracy'])
model = custom_resnet_model

######################
#### do the warm-up training for a the head of the model for a few epochs.
#### the tail of the model is not being trained
for layer in model.layers:
    if isinstance(layer, BatchNormalization):
        layer.trainable = True
    else:
        layer.trainable = False

H = model.fit_generator(
    generator = train_generator,
    steps_per_epoch=train_generator.n//train_generator.batch_size,
    validation_data=valid_generator,
    validation_steps=valid_generator.n//valid_generator.batch_size,
    # class_weight=class_weights,
    epochs=15
    )
#######################

#######################
#### do the proper training of all the layers
for layer in model.layers:
    layer.trainable = True

print('check of validation ims 2:', valid_generator.filepaths[:5])

H = model.fit_generator(
    generator = train_generator,
    steps_per_epoch=train_generator.n//train_generator.batch_size,
    validation_data=valid_generator,
    validation_steps=valid_generator.n//valid_generator.batch_size,
    # class_weight=class_weights,
    epochs=num_epochs
    )
########################

This gives me this training metrics output, which shows a decent learning performance, but bad validation:
 9/10 [==========================>...] - ETA: 7s - loss: 0.9657 - acc: 0.7240 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 13s 171ms/step - loss: 26.6340 - acc: 0.1757
10/10 [==============================] - 85s 9s/step - loss: 0.9069 - acc: 0.7391 - val_loss: 29.8742 - val_acc: 0.1757
Epoch 2/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.2085 - acc: 0.9446 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 121ms/step - loss: 40.7067 - acc: 0.1081
10/10 [==============================] - 67s 7s/step - loss: 0.2051 - acc: 0.9487 - val_loss: 51.1770 - val_acc: 0.1081
Epoch 3/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.2235 - acc: 0.9464 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 121ms/step - loss: 222.0811 - acc: 0.1757
10/10 [==============================] - 62s 6s/step - loss: 0.2124 - acc: 0.9490 - val_loss: 284.9632 - val_acc: 0.1757
Epoch 4/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.1671 - acc: 0.9554 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 27.6185 - acc: 0.1892
10/10 [==============================] - 64s 6s/step - loss: 0.1536 - acc: 0.9599 - val_loss: 50.7521 - val_acc: 0.1892
Epoch 5/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0500 - acc: 0.9844 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 30.1733 - acc: 0.1757
10/10 [==============================] - 65s 7s/step - loss: 0.0565 - acc: 0.9828 - val_loss: 40.2771 - val_acc: 0.1757
Epoch 6/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0466 - acc: 0.9853 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 13.8834 - acc: 0.1757
10/10 [==============================] - 62s 6s/step - loss: 0.0429 - acc: 0.9868 - val_loss: 18.6932 - val_acc: 0.1757
Epoch 7/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0214 - acc: 0.9946 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 122ms/step - loss: 20.4458 - acc: 0.1757
10/10 [==============================] - 64s 6s/step - loss: 0.0388 - acc: 0.9904 - val_loss: 25.5468 - val_acc: 0.1757
Epoch 8/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0701 - acc: 0.9821 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 121ms/step - loss: 14.2723 - acc: 0.1892
10/10 [==============================] - 65s 6s/step - loss: 0.0732 - acc: 0.9824 - val_loss: 24.9597 - val_acc: 0.1892
Epoch 9/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0761 - acc: 0.9768 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 121ms/step - loss: 2.8525 - acc: 0.1622
10/10 [==============================] - 64s 6s/step - loss: 0.0689 - acc: 0.9792 - val_loss: 3.2069 - val_acc: 0.1622
Epoch 10/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0368 - acc: 0.9861 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 123ms/step - loss: 6.5042 - acc: 0.1622
10/10 [==============================] - 64s 6s/step - loss: 0.0332 - acc: 0.9872 - val_loss: 6.5715 - val_acc: 0.1622
Epoch 11/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0753 - acc: 0.9826 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 122ms/step - loss: 2.4013 - acc: 0.1622
10/10 [==============================] - 66s 7s/step - loss: 0.1494 - acc: 0.9750 - val_loss: 2.6977 - val_acc: 0.1622
Epoch 12/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.1294 - acc: 0.9653 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 115ms/step - loss: 17.0063 - acc: 0.1622
10/10 [==============================] - 65s 6s/step - loss: 0.1289 - acc: 0.9656 - val_loss: 18.5074 - val_acc: 0.1622
Epoch 13/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0855 - acc: 0.9816 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 180.1986 - acc: 0.1622
10/10 [==============================] - 66s 7s/step - loss: 0.0788 - acc: 0.9836 - val_loss: 174.2110 - val_acc: 0.1622
Epoch 14/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.0823 - acc: 0.9792 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 211.2853 - acc: 0.1622
10/10 [==============================] - 66s 7s/step - loss: 0.0802 - acc: 0.9797 - val_loss: 199.9975 - val_acc: 0.1622
Epoch 15/15
 9/10 [==========================>...] - ETA: 5s - loss: 0.1303 - acc: 0.9821 Epoch 1/15
74/10 [==============================================================================================================================================================================================================================] - 9s 120ms/step - loss: 17.8702 - acc: 0.1622
10/10 [==============================] - 63s 6s/step - loss: 0.1164 - acc: 0.9840 - val_loss: 18.2201 - val_acc: 0.1622
check of validation ims 2: ['./ims_train2/bottle/20200623_202617.jpg', './ims_train2/bottle/20200623_202619.jpg', './ims_train2/bottle/20200623_202624.jpg', './ims_train2/bottle/20200623_202629.jpg', './ims_train2/bottle/20200623_202636.jpg']
Epoch 1/60
 9/10 [==========================>...] - ETA: 6s - loss: 0.1154 - acc: 0.9653 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 116ms/step - loss: 4.5718 - acc: 0.1622
10/10 [==============================] - 74s 7s/step - loss: 0.1057 - acc: 0.9688 - val_loss: 7.2388 - val_acc: 0.1622
Epoch 2/60
 9/10 [==========================>...] - ETA: 5s - loss: 0.1150 - acc: 0.9724 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 121ms/step - loss: 5.0241 - acc: 0.1892
10/10 [==============================] - 66s 7s/step - loss: 0.1047 - acc: 0.9753 - val_loss: 7.6464 - val_acc: 0.1892
Epoch 3/60
 9/10 [==========================>...] - ETA: 5s - loss: 0.4038 - acc: 0.9714 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 122ms/step - loss: 9.9850 - acc: 0.1757
10/10 [==============================] - 64s 6s/step - loss: 0.3883 - acc: 0.9679 - val_loss: 11.0730 - val_acc: 0.1757
Epoch 4/60
 9/10 [==========================>...] - ETA: 5s - loss: 0.3822 - acc: 0.8982 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 125ms/step - loss: 2.7105 - acc: 0.1892
10/10 [==============================] - 64s 6s/step - loss: 0.4216 - acc: 0.8926 - val_loss: 5.3383 - val_acc: 0.1892
Epoch 5/60
 9/10 [==========================>...] - ETA: 5s - loss: 0.2122 - acc: 0.9427 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 125ms/step - loss: 2599176.3548 - acc: 0.1892
10/10 [==============================] - 66s 7s/step - loss: 0.2137 - acc: 0.9438 - val_loss: 4664818.5203 - val_acc: 0.1892
Epoch 6/60
 9/10 [==========================>...] - ETA: 5s - loss: 0.2319 - acc: 0.9761 Epoch 1/60
74/10 [==============================================================================================================================================================================================================================] - 9s 124ms/step - loss:<PHONE_NUMBER> - acc: 0.1892
10/10 [==============================] - 63s 6s/step - loss: 0.2161 - acc: 0.9770 - val_loss: 1461603.6436 - val_acc: 0.1892

Did anyone find a workaround on the code side rather than having patch in the backend? I also tried @digital-thinking answer but that somehow doesn't work for me and the loss comes out to be -inf/nan for every epoch while the accuracy is increasing very slowly.


Switch to using requirements.txt

The pip requirements.txt is the canonical standard for how to declare dependencies in a Python package.  Until another form replaces it, mpirical should switch to the standard.

Codecov Report

Merging #9 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master      #9   +/-   ##
======================================
  Coverage    94.7%   94.7%
======================================
  Files           6       6
  Lines         170     170
======================================
  Hits          161     161
  Misses          9       9

Continue to review full report at Codecov.

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


[Bug][Windows]  pinning protobuf version windows

pinning  protobuf version to test failure root cause

with latest version of protobuf v28.1 this issue is resolved


Will not submit

Challenge Create a Form Element has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

Click here for cat photos.

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

<form action="/submit-cat-photo">
  <input type="text" placeholder="cat photo URL">
</form>

Hi,
The code you have copy and pasted works, but the solution you sent in the link does not.  The link shows me a solution where you are missing the action for the form.  Try refreshing and copying the code here and submitting.
Cheers!

Hi @rrcamp
Thanks for reporting this issue.
Here are some next steps that you should follow before we can help you with your query:

Check these troubleshooting steps first.
Please use the Chat Rooms or try looking through our forum for help with a specific challenge and any coding assistance.

IMPORTANT:
Please NOTE that this tracker is for reporting bugs and enhancements to freeCodeCamp's code base only.
Happy Coding!


fix(linter) remove parsing of extends eslint config

Current dependencies on/for this PR:

main

PR #1695   👈

This stack of pull requests is managed by Graphite.


[$500] Distance-Title "Distance" changed to "merchant" when toggle on Billable

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.3.97-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Launch app
Open employee WS
Tap plus icon -- Request money
Tap distance request
Select start and finish waypoints
Tap next
Tap distance
Tap on distance request created to open distance request detail page
Note under distance heading, distance mentioned
Tapping on distance, user can add/change waypoints
Toggle on Billable
Note "distance" heading changed to "merchant "
Tap on merchant
Edit waypoints option not shown

Expected Result:
In employee Workspace, in distance request detail page, Title "Distance" must not change to "merchant" when toggle on Billable
Actual Result:
In employee Workspace, in distance request detail page, Title "Distance" changed to "merchant" when toggle on Billable
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/00f0e3c3-2a28-4026-b9a7-837b5d89f170
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01ef05e0c3265ef1c9
Upwork Job ID:<PHONE_NUMBER>118227968
Last Price Increase: 2023-11-09

The same issue reported https://github.com/Expensify/App/issues/31128

@kbecciv this was opened first

Ah nevermind, the other issue has the preconditions, I was wondering why I couldn't repro

@erquhart Here is TR link https://expensify.testrail.io/index.php?/tests/view/3953249


Link preload: Still an experimental feature in iOS 11.4

I saw at caniuse, that preloading was until 11.2 an experimental feature and is supported since 11.3. But i look in a 11.4 simulator and it's still an experimental feature (see Screenshot)

https://github.com/Fyrd/caniuse/blob/294ce7254e4f3e9f5e7395b4894ecf21d7eefc9d/CONTRIBUTING.md#L58
https://github.com/Fyrd/caniuse/blob/294ce7254e4f3e9f5e7395b4894ecf21d7eefc9d/CONTRIBUTING.md#L52
"Flagged(d)" typically means the feature needs to be enabled by the user, and "supported(y)" means if it is enabled by default. Link Preload has been "on-by-default experimental feature" since iOS 11.3.
There seems to be no way in CanIUse to differentiate if a feature is 1) on-by-default experimental 2) off-by-default experimental. I could think of some reasons: 1) and "official support" is essentially the same thing to most developers, and browsers could disagree over the term "experimental." Overall, surveying all the browsers for data only to differentiate 1) and 2) might be somewhat overkill in my opinion.

Hi, thank you for your good response. Thank you too for the link to https://trac.webkit.org/
I looked for the iOS version, when it's no longer experimental and it's starting with iOS 12. I'm developing in Apps with Cordova and so my Apps are using HTML in a WebView. It seems, it has no impact, if a experimental feature is enabled by default, when you using the UIWebView. Preloading worked in Safari but not in the App's Webview. I see you can add comments to caniuse. Maybe you could add the Info, that it's an experimental feature in iOS 11.3-11.4 enabled by default and is fully integrated since iOS 12.

Ah, that’s interesting. I wonder if the difference in UI/WKWebView applies to the other experimental features, or it’s some fluke around only this feature. I couldn’t find any related documentation or WWDC sessions, so some further testing might be needed.

Or maybe it's a problem with the obsoleted UIWebView. Maybe in WKWebView there is no problem. But i'm not able to test it currently :/ For UIWebView i think the problem applies to all experimental features. I cannot imagine it's a problem with only this feature.

Yeah, @kiding is correct. As long as all users of the browser have it enabled it's just "supported". May be worth adding a note that it's considered experimental if that matters in certain uses of the engine.

I tested if the experimental features have impact to the WKWebView and it doesn't change anything if I switch something on/off. For me this behaviour make sense, because a user could accidently changing the behaviour of an app, when he is changing something there, and an App which uses WKWebView and for example relies on link preloading would break.

Forget my last comment about the WKWebView which i deleted now.
When i was testing with WKWebView, my Environment was mistakenly not using the WKWebView and still used the UIWebView. Here are my test results with WKWebView now.
In WKWebView link preloading works in iOS 11.4 no matter if the user is switching it on or off in Safari > Experimental Features.
But in UIWebView it is not working, no matter if it is turned on or off.


[BUG]: PayPalScriptProvider options typescript type error

Is there an existing issue for this?

[X] I have searched the existing issues.

🐞 Describe the Bug
When putting messages on the same PayPalScriptProvider component it will only allow string as the type and fails to render if entering in a string with "buttons messages" or with an array.
😕 Current Behavior
When I use the following PayPalScriptProvider options:
{
"client-id": PP_CLIENT_ID,
currency: "GBP",
intent: "capture",
components: ["buttons", "messages"],
}
I get this typescript error:
Type '{ "client-id": string; currency: string; intent: string; components: string[]; }' is not assignable to type 'PayPalScriptOptions'.
Types of property 'components' are incompatible.
Type 'string[]' is not assignable to type 'string'.ts(2322)
scriptProviderTypes.d.ts(36, 5): The expected type comes from property 'options' which is declared here on type 'IntrinsicAttributes & ScriptProviderProps'
🤔 Expected Behavior
Should render without error.
🔬 Minimal Reproduction
Use above options for PayPalScriptProvider component

🌍 Environment
| Software         | Version(s) |
| ---------------- | ---------- |
| react-paypal-js  |  7.8.2     |
| Browser          |    chrome  |
| Operating System |     windows|

Relevant log output
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

➕ Anything else?
Changing the type components type on PayPalScriptQueryParameters in:
@paypal\paypal-js\types\script-options.d.ts
to : string | string[];
Fixes the issue and enable the page to render ok.

@designed2use  It's supposed to be a string we comma separated values:
'buttons,funding-eligibility,hosted-fields'

if you are still having this issue, replace "client-id" with clientId property.
EX:
import { loadScript } from "@paypal/paypal-js";

loadScript({clientId: 'MY_ID' }).then(  // code here )


ZcashLightClientKit/lib/libzcashlc.a - building for Mac Catalyst, but linking in object file built for , for architecture x86_64

Trying to compile wallet from branch arrr-mac gives following errors for TinyQRScanner dependency under Pods:
'AVCaptureSession' is only available in Mac Catalyst 14.0 or newer

To resolve it, change the "macOS" version from 10..5.1 to 11.0.
After that when building the project, it gives errors about libzcashlc.a as follows:
ld: in /Users/satinder/repo/meshbits/pirate-chain-ios-wallet/wallet/Pods/ZcashLightClientKit/lib/libzcashlc.a(zcashlc-c99a8b34047907fb.zcashlc.cgphjfl4-cgu.10.rcgu.o), building for Mac Catalyst, but linking in object file built for , for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

found issue with rust: https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3
It does actually has support coming for Mac Catalyst, but at the moment, it's not fully supported.
target				std		host		notes
aarch64-apple-ios-macabi	?				Apple Catalyst on ARM64

? indicates the standard library support is unknown or a work-in-progress.

I'll see if I can try some hacky way in the meantime, but we have at least tracked the accurate issue and it's expected solution direct from the language
as soon as it is even available in beta, I'll try that then
right now focusing on other important tasks

For compiling rust code for Mac Catalyst, I found these two relevant links:
https://github.com/rust-lang/rust/pull/80215
The day this issue github repo gives the binary compatible with Mac Catalyst we will have a usable solution for macOS App :)
https://github.com/visigoth/catalystsample
Right now compiling with nightly version of rust still gives this output:
➜  catalystsample git:(master) ✗ rustup default
nightly-x86_64-apple-darwin (default)
➜  catalystsample git:(master) ✗ rustc --version
rustc 1.55.0-nightly (6a758ea7e 2021-06-22)

➜  catalystsample git:(master) ✗ file target/x86_64-apple-ios-macabi/debug/catalystsample
target/x86_64-apple-ios-macabi/debug/catalystsample: Mach-O 64-bit executable x86_64
➜  catalystsample git:(master) ✗

Whereas like Firefox's arm64 binaries the file should show this:
➜  catalystsample git:(master) ✗ file /Applications/Firefox.app/Contents/MacOS/firefox
/Applications/Firefox.app/Contents/MacOS/firefox: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]
/Applications/Firefox.app/Contents/MacOS/firefox (for architecture x86_64):	Mach-O 64-bit executable x86_64
/Applications/Firefox.app/Contents/MacOS/firefox (for architecture arm64):	Mach-O 64-bit executable arm64
➜  catalystsample git:(master) ✗

We can do simple test of that catalystsample code in future to verify when our code is ready to test zcash sdk for macOS arm64.


Create Extension Controls in an MDK App (Using Metadata Approach)

Tutorial URL: https://developers.sap.com/tutorials/cp-mobile-dev-kit-slider-extension.html
Please specify the step you are referring to "Run the MDK client"
Hi!
After implemented the tutorial and tried to run the app on an iOS and Android device, the slider extension was working fine on iOS, but not on Android. I've build the app on a Macbook with options 'all' and 'device'. Attached images of exception on android class SeekBar.

@jalonsov I have made changes in android>myslider.ts file and also updated in tutorial page(would take couple of days to get PR merged).
In meanwhile, you can grab this file from here and test it.
https://github.com/SAP-samples/cloud-mdk-tutorial-samples/blob/master/4-Brand-Your-Customized-App-with-Mobile-Development-Kit-SDK/2-Create-Extension-Controls-with-NativeScript-in-an-MDK-App/mdk-extensions/Extensions/MySliderModule/controls/MySliderPlugin/android/MySlider.ts

Thanks @jitendrakansal for the quick reply.
Now is working fine.

Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.


5.0: UpdateRequest contains Lang and Language

The comment also says groovy, which I believe the new default is painless. Should one of these be removed? I only found this after I got the following error: 53:09.14195 E:StackRepository - Error occurred incrementing total event occurrences on stack "1ecd0826e447a44e78877ab1". Error: Type: illegal_argument_exception Reason: "request [/test-stacks/stacks/1ecd0826e447a44e78877ab1/_update] contains unrecognized parameter: [lang]"

Regardless, it is very confusing to have both :D, which is why I logged this.

Good catch, Lang comes from the REST spec and is set as a query string parameter, while Language was used previously to set on the body.  We'll standardize on Lang.


creating items with negative double properties are quoted in the db

when creating an item with a double property that has a negative value, that value is being quoted in the database.
when the value is positive it is not.
I dont think this is intended.

@MariaCobretti can you provide an example? I just did a quick tests and was not able to reproduce this behavior.
   [TestMethod]
        public async Task CreateDropItemTest()
        {
            ToDoActivity testItem = ToDoActivity.CreateRandomToDoActivity();
            testItem.cost = -2508;
            ItemResponse<ToDoActivity> response = await this.Container.CreateItemAsync<ToDoActivity>(item: testItem);

{
    "id": "87bd9370-805d-4e9d-88ea-2b1afdc93f16",
    "taskNum": 42,
    "cost": -2508,

@MariaCobretti can you provide an example? I just did a quick tests and was not able to reproduce this behavior.
   [TestMethod]
        public async Task CreateDropItemTest()
        {
            ToDoActivity testItem = ToDoActivity.CreateRandomToDoActivity();
            testItem.cost = -2508;
            ItemResponse<ToDoActivity> response = await this.Container.CreateItemAsync<ToDoActivity>(item: testItem);

{
    "id": "87bd9370-805d-4e9d-88ea-2b1afdc93f16",
    "taskNum": 42,
    "cost": -2508,

wasn't able to reproduce it either today.. well nvm then.. no idea how those quotes got there
thanks you anyways

wasn't able to reproduce it either today.. well nvm then.. no idea how those quotes got there
thanks you anyways


Create lightning_utilities.testing subpackage

🚀 Feature
Collect common classes, functions, e.g.

[ ] RunIf: https://github.com/Lightning-AI/lightning/blob/95374440ce9b4f499f83b0e6b8cee0bc715aa18b/tests/tests_pytorch/helpers/runif.py#L55
[x] no_warning_call: https://github.com/Lightning-AI/lightning/blob/95374440ce9b4f499f83b0e6b8cee0bc715aa18b/tests/tests_pytorch/helpers/utils.py#L92
[ ] ...

Motivation
Prevents duplication across repositories.

@carmocca still thinking about having the RunIf as a prototype with some simple functionality which would be extended/inherit in particular projects like PL

What simple functionality? Only min_python and skip_windows don't require any packages. And the code deduplication will be almost nothing because each repo will need to rewrite its own.

I added https://github.com/Lightning-AI/utilities/commit/88bd877506353d7329e24172634c20ca2b50ff66 but haven't updated the projects to use it.

I found with cutting strategies and accelerators that I am always coping with GPU, standalone, min torch, etc.

What's the issue with copying it? It's very simple infrastructure. If you wanted to share code, then it should be done through fabric or pytorch lightning, which do install torch


[5.1] Don't strip table prefix before executing the query

This is a bug that was fixed in #10890
This PR backports it to 5.1.
For context, here's where I've hit this bug now.

Are there any tests that go with this?


ValueError: Layer 'talking_head_attention' looks like it has unbuilt state, but Keras is not able to trace the layer call() in order to build it automatically.

while upgrading "examples/vision/cait.py" to keras 3 I run into the following error.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-6-dde8fac56e77>](https://localhost:8080/#) in <cell line: 752>()
    750
    751 config = get_config()
--> 752 cait_xxs24_224 = CaiT(**config)
    753
    754 dummy_inputs = keras.ops.ones((batch_size, image_size, image_size, num_channels))

4 frames
[/usr/local/lib/python3.10/dist-packages/keras/layers/layer.py](https://localhost:8080/#) in _maybe_build(self, call_spec)
   1211                     # Will let the actual eager call do state-building
   1212                     return
-> 1213                 raise ValueError(
   1214                     f"Layer '{self.name}' looks like it has unbuilt state, but "
   1215                     "Keras is not able to trace the layer `call()` in order to "

ValueError: Layer 'talking_head_attention' looks like it has unbuilt state, but Keras is not able to trace the layer `call()` in order to build it automatically. Possible causes:
1. The `call()` method of your layer may be crashing. Try to `__call__()` the layer eagerly on some test input first to see if it works. E.g. `x = np.random.random((3, 4)); y = layer(x)`
2. If the `call()` method is correct, then you may need to implement the `def build(self, input_shape)` method on your layer. It should create all variables used by the layer (e.g. by calling `layer.build()` on all its children layers).

Colab link to recreate the issue:
https://colab.research.google.com/drive/144Ugzq9peIFqHTWE9OuhXZt9-DPFjjCT?usp=sharing

@madhusshivakumar were you able to try the two debug options

The call() method of your layer may be crashing. Try to __call__() the layer eagerly on some test input first to see if it works. E.g. x = np.random.random((3, 4)); y = layer(x)
If the call() method is correct, then you may need to implement the def build(self, input_shape) method on your layer. It should create all variables used by the layer (e.g. by calling layer.build() on all its children layers).

Please let me know if that worked for you.


Adding multiple sinks

It would be nice to have shorthand method(s) to add multiple sinks at once.
Accepting another map
import { parsers } from '@rdfjs/formats-common'
import existingMap from './parsers'

existingMap.addAll(parsers)

Accepting a JS hashmap
import N3Parser from '@rdfjs/parser-n3'
import existingMap from './parsers'

existingMap.addAll({
  'text/turtle': new N3Parser()
})

And maybe an array to align with Map ctor
import N3Parser from '@rdfjs/parser-n3'
import existingMap from './parsers'

existingMap.addAll([
  ['text/turtle': new N3Parser()]
])

@tpluscode Is there any proposal for the plain JS Map that would add the functionality? I would like to keep it as close as possible in sync with the standard Map class. If there is nothing coming, I would propose to use a chain of .set(). Otherwise we could add it to our code, so we don't need to rely on the Map implementation.

It looks like Map.prototype.merge would be the correct method in the proposal for new methods for collections. But since there have been no updates for about four years, I will close this issue. Once the TC39 proposal status changes, we can open this issue again.


fix(behaviour): clear completion on "reset"

Summary
When reset is called when a completion is active, it should also be reset.

Result

improved tests
reset clears completion too

https://github.com/algolia/autocomplete/assets/6270048/c0f66f0c-bb20-429d-b980-9849dacbae74
https://github.com/algolia/autocomplete/assets/6270048/57b16c5e-bfd5-4ec3-8db1-d37e24f8fe34

https://github.com/algolia/autocomplete/pull/1215/commits/9f07965fb80a4cef203ca3c94243074f34d57e71 is the main implementation, the rest is fixes in tests that will be merged using rebase :)


overwriting recycled blocks can lead to surprising behavior

The current mirage_test tests which write until they can't anymore - rm 0 and split 0 - reveal some bad behavior when reformatting a block device previously used as a Chamelon filesystem. If rm 0 is run alone it passes, but if it runs after split 0 it fails.

Fixed in af7115dc36ab5237450a1383cad28f217f7ff2fa .


Trying yarn workspaces...

mmm it seems I need to think about things too much (mostly around CI stuff)... maybe trying later. closing


[rom_ctrl] Security hardening ideas for ROM_CTRL

I just recently had a look at rom_ctrl and noticed some signals that could benefit from multibit encoding, for example

the good signal here:
https://github.com/lowRISC/opentitan/blob/1a84e2dc27cf027cd26bdbcea31c5f79aa0f7d65/hw/ip/rom_ctrl/rtl/rom_ctrl.sv#L321

the sel_q register (and potentially the sel_i signal) here:
https://github.com/lowRISC/opentitan/blob/1a84e2dc27cf027cd26bdbcea31c5f79aa0f7d65/hw/ip/rom_ctrl/rtl/rom_ctrl_mux.sv#L49

What do you think?

related, #8981

Yep, absolutely. I haven't done any security hardening on rom_ctrl yet, so there will definitely be other examples too.

@rswarbrick should we close this issue now?

Oh! Yes, probably: this is rather out of date :-)


compare to casbin

Hi guys, could you please give a compare with casbin

Hey @henrywangx! We haven't written up a detailed comparison yet, but here's a link to a conversation in the Oso Community Slack where some folks were discussing the pros/cons of Casbin vs. Oso (and some other tools in the space) recently as well: https://oso-oss.slack.com/archives/C018B36E4LQ/p1639509763153500
Also, if you search Casbin throughout the Slack you'll find a number of similar discussions. Hope this helps!

(And for anyone who can't view that Slack link, you might have to join our workspace first: https://join-slack.osohq.com/)

I've been using oso for few days based on my understanding these are the major difference

Both casbin and oso are deny-default (if no policy matches deny the request)
Casbin expecting policy effect definition [to tell allow-override/deny-override/priority-override the policies] i.e., to pick policy effect (allow/deny) because the matcher condition could returns more than one policy for the same condition, which is not in case of oso. In oso, a policy always returns either allow true or allow false(i.e. deny)
But Oso expecting custom conditions on policy rules to decide allow-override or deny-override of that policy because by default oso policy rules are allow-overrides. i.e., there is only allow(...) built in rule available and there is no deny(...) built in rule.

From my point of view
casbin is easy to setup! but for oso you need to spend some time to understand polar once you did oso is very powerful.
Since oso makes sure a policy always return allow or deny for the given authorize condition, it's less confusing than casbin (in terms of policy effect definition)
Also oso needs more focus on data filtering part. it should support at least raw sql query conversion and most popular ORM lib . But, oso is growing we hope we'd get all the features ASAP!


remove duplicate Header instantiation

Summary

Ticket Link

Checklist

[ ] Added or updated unit tests (required for all new features)
[ ] Has UI changes
[ ] Includes text changes and localization file updates
[ ] Have tested against the 5 core themes to ensure consistency between them.

Device Information
This PR was tested on:
Screenshots

Release Note

@larkox, I created this PR with references the original.  You can pull any of the changes from here. Here is a rundown of what I did.

commmit https://github.com/mattermost/mattermost-mobile/pull/6306/commits/006e64d5fb44cab241a774e613b8fb0923adac84

remove duplicate Header instantiation

commit https://github.com/mattermost/mattermost-mobile/pull/6306/commits/57a0960d3a8a65483231144fdf6e5be6eec4ffeb

Add MessageTab and FileTab constants
Add SelectTab type
hook up the onHeaderSelect function to the onHeaderSelect prop passed to the Header component
The search component now hold the Selected Tab state. This is because the value (set by the Header component) needs to be passed to the adjacent Results component.

commit https://github.com/mattermost/mattermost-mobile/pull/6306/commits/c6220d61e466a8ecf58775a53c71588febd69733

This was the start of the results fetching.  I thnk we should merge this PR without actually data fetching and then add it in a separate PR, but that is to stop this one from growing too large. I do think the file restructure in this commit should happen. From what I've seen in other components, the index.ts wraps the screen component with observables and in the results fetching, we will need the currentTeamId from watermelonDB.

If you start working on the the code again, you can ping me in Mattermost.  If the notification wakes me, I'll get up to help! Thanks! :)


feat(protocol-parser): add protocol parser package

(waiting on https://github.com/latticexyz/mud/pull/1020 to merge first)

@holic noticed you have a stacked pr here.   You should check out graphite sometime.   It's so useful for handling stacks of prs.
Also if you make the tracking branch the previous pr, as long as you have the "delete branches on merge" checked github will be smart enough to make the tracking branch main after the previous pr merges


Update XrmExtensions.cs

Without this change, using multi select option sets fail due to the value parameter is a enumerable of an array containing the enum values and not the actual array of enums.
The following test fails with a unable to cast dca_targetphone[] to int without the purposed change.
            client.Create(new dca_CallListMember
            {
                 dca_List = campaign.First().dca_telemarketinglist,
                 dca_Name = contact.FullName,
                 dca_Target = contact.ToEntityReference(),
                 dca_TargetPhone = new[] { dca_targetphone.Landline, dca_targetphone.MobilePhone, dca_targetphone.WorkPhone }
            });

@magesoe @TomMalow  :) Have you guys used multi option set with xrmcontext without running into the problem i am running into?
This fix makes it work for me.


doc: [sgx] theoretically, the screencast of the SGX demo is not replicable

Though I don't have the hardware platform to try out, but it looks like some files are missing which prevents screencast-sgx.sh from running successfully. Specifically:

In screen6, I know users can save the docker images in local registry to files, but this must be done in advance, otherwise there will be no sgx-aesmd.tar and sgx-demo.tar to be loaded.

@dbolshak thanks for the detailed feedback. I haven't paid too much attention to the script(s) it but looks like they are useful to many. I'll get at least this issue fixed at some point.
Is there something blocking you to set things up?

Unfortunately, I didn't notice at the beginning that it requires CPU with Flexible Launch Control support (or it's not mentioned in
docs), so now I am awaiting another server to repeat all steps.

Yeah, this is the requirement in the upstream driver. Our plugin only recognizes the device nodes provided by that driver. FLC is mentioned in the very first sentence of our README.

But I have a question which is not directly related to my issues in first message. Could you please point me to documentation
which covers remote attestation of an application running inside a pod on SGX aware k8s cluster using sgx-caching-service,
or it's not kubernetes specific?

It's not kubernetes specific as such but we have some helpers that could be used. "PCCS" normally runs somewhere in the datacenter and serves connections from the sgx quote provider lib ("default" is provided by Intel, Azure has "dcap client" for example). This lib needs to be configured to use the network address of that PCCS. The screencast and our sample deployments give examples how to configure the provider lib in case it's used by "aesmd" (for "out-of-proc" quote generation) and the app itself (for "in-proc" quote generation).
In the screencast I have PCCS (sgx-caching-service) in a single-node k8s cluster serving localhost connections so the pods just use HostNetwork: true but normally you'd have PCCS running somewhere else.
DCAP attestation overview doc is here.

lsmod | grep sgx gives the following
intel_sgx              32768  0

but empty output in
cat /boot/config-5.4.0-109-generic | grep -i sgx

but empty output in cat /boot/config-5.4.0-109-generic | grep -i sgx

that's the problem. quick fix is to kubectl edit nodefeaturerule intel-dp-devices and drop that kernel.config match.

Thanks for quick response and provided w/around, I will test it.
But I see that I need kernel version 5.11 or above, so after testing w/around I will check full fix

@mythi
Hello,
I feel myself very terrible for distrusting you again and again. But I am so close to success!
My current problem appears on the following step
kubectl apply -f https://raw.githubusercontent.com/intel/intel-device-plugins-for-kubernetes/main/deployments/operator/samples/deviceplugin_v1_sgxdeviceplugin.yaml -n sgx-ecdsa-quote

So, as the success of it, I expect to see sgxdeviceplugin-sample pod in sgx-ecdsa-quote namespace. But I don't.
Of course I have the desired namespace and all necessary labels on my node
kubectl describe node | grep -i sgx
                    feature.node.kubernetes.io/cpu-sgx.enabled=true
                    intel.feature.node.kubernetes.io/sgx=true
                    nfd.node.kubernetes.io/extended-resources: sgx.intel.com/epc
  sgx.intel.com/enclave:    10
  sgx.intel.com/epc:<PHONE_NUMBER>
  sgx.intel.com/provision:  10
  sgx.intel.com/enclave:    10
  sgx.intel.com/epc:<PHONE_NUMBER>
  sgx.intel.com/provision:  10
  inteldeviceplugins-system   intel-sgx-plugin-4pdrg                                    0 (0%)        0 (0%)      0 (0%)           0 (0%)         58m
  sgx.intel.com/enclave    0           0
  sgx.intel.com/epc        0           0
  sgx.intel.com/provision  0           0

What I've done to debug so far.
I checked the deployed sgxdeviceplugin, and it looks by the following way
kubectl describe sgxdeviceplugin
Name:         sgxdeviceplugin-sample
Namespace:
Labels:       <none>
Annotations:  <none>
API Version:  deviceplugin.intel.com/v1
Kind:         SgxDevicePlugin
Metadata:
  Creation Timestamp:  2022-05-12T15:07:17Z
  Generation:          1
  Managed Fields:
    API Version:  deviceplugin.intel.com/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:enclaveLimit:
        f:image:
        f:initImage:
        f:logLevel:
        f:nodeSelector:
          .:
          f:intel.feature.node.kubernetes.io/sgx:
        f:provisionLimit:
    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2022-05-12T15:07:17Z
    API Version:  deviceplugin.intel.com/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:controlledDaemonSet:
          .:
          f:apiVersion:
          f:kind:
          f:name:
          f:namespace:
          f:resourceVersion:
          f:uid:
        f:desiredNumberScheduled:
        f:nodeNames:
        f:numberReady:
    Manager:         intel_deviceplugin_operator
    Operation:       Update
    Subresource:     status
    Time:            2022-05-12T15:07:18Z
  Resource Version:  5710
  UID:               ceda107e-4f6b-44a0-8c38-13bc05e85567
Spec:
  Enclave Limit:  10
  Image:          intel/intel-sgx-plugin:0.24.0
  Init Image:     intel/intel-sgx-initcontainer:0.24.0
  Log Level:      4
  Node Selector:
    intel.feature.node.kubernetes.io/sgx:  true
  Provision Limit:                         10
Status:
  Controlled Daemon Set:
    API Version:             apps/v1
    Kind:                    DaemonSet
    Name:                    intel-sgx-plugin
    Namespace:               inteldeviceplugins-system
    Resource Version:        5688
    UID:                     98078e21-abf7-4059-b761-d91fb51412f6
  Desired Number Scheduled:  1
  Node Names:
    euclid-4
  Number Ready:  1
Events:          <none>

I see no events here, also there are no any issues with controlled daemon set. Pod intel-sgx-plugin-4pdrg in inteldeviceplugins-system namespace works fine.
But logs of an operator pod (pod inteldeviceplugins-controller-manager in inteldeviceplugins-system namespace) have the following lines
I0512 15:01:28.422447       1 reconciler.go:231] "intel-device-plugins-manager/controller/sgxdeviceplugin: " reconciler group="deviceplugin.intel.com" reconciler kind="SgxDevicePlugin" name="sgxdeviceplugin-sample" namespace="" ="(MISSING)"
I0512 15:01:28.503111       1 reconciler.go:231] "intel-device-plugins-manager/controller/sgxdeviceplugin: " reconciler group="deviceplugin.intel.com" reconciler kind="SgxDevicePlugin" name="sgxdeviceplugin-sample" namespace="" ="(MISSING)"

It's not clear why namespace is empty. And I see another issues with namespace (probably they are both related to each other), if I removed device plugin by kubectl delete -f https://raw.githubusercontent.com/intel/intel-device-plugins-for-kubernetes/main/deployments/operator/samples/deviceplugin_v1_sgxdeviceplugin.yaml -n sgx-ecdsa-quote I see the following warning warning: deleting cluster-scoped resources, not scoped to the provided namespace, but it does not effect result of the operation and plugin is going to be deleted without any issues.
Only hope on your help.
I use v0.24.0 and my kuber cluster v1.24.0

It's not clear why namespace is empty

@dbolshak looks like you have everything correct. SgxDevicePlugin is a cluster scoped resource so just deploy it without the namespace (-n sgx-ecdsa-quote).

Ok, I've deployed without specifying namespace, but it changes nothing, I still don't see sgxdeviceplugin-sample and sections with events of the following command is empty
kubectl describe sgxdeviceplugin sgxdeviceplugin-sample
...
....
Spec:
  Enclave Limit:  110
  Image:          intel/intel-sgx-plugin:0.24.0
  Init Image:     intel/intel-sgx-initcontainer:0.24.0
  Log Level:      4
  Node Selector:
    intel.feature.node.kubernetes.io/sgx:  true
  Provision Limit:                         110
Status:
  Controlled Daemon Set:
    API Version:             apps/v1
    Kind:                    DaemonSet
    Name:                    intel-sgx-plugin
    Namespace:               inteldeviceplugins-system
    Resource Version:        80318
    UID:                     e80dc977-8956-424f-9f27-151cd987a144
  Desired Number Scheduled:  1
  Node Names:
    euclid-4
  Number Ready:  1
Events:          <none>

I still don't see sgxdeviceplugin-sample and sections with events of the following command is empty

I don't think we report events for xDevicePlugins  objects today so empty Events is expected AFAICS. Other than that, is there something else missing?

Screencast shows that there is pod with name sgxdeviceplugin-sample should be appeared, I don't have it.

Screencast shows that there is pod with name sgxdeviceplugin-sample should be appeared, I don't have it.

I see. That posted video seems to be outdated but the latest "script" with up-to-date information is in our demo folder. With ./screencast-play.sh play it runs you trough the steps (beware of some of the problems reported in this issue though).
The video shows the plugin running in that namespace when SgxDevicePlugin was still namespace scoped but we moved it to cluster scoped.
Apologies for some of the outdated information.

Thanks for clarification!


chore(*): enable more revive linter rules

Some rules have been disabled, them will enable in future pr.


Zsh to zsh

Since https://github.com/kachick/dotfiles/pull/452, I should consider macOS
Too old bash in darwin is harmful🤔 https://github.com/kachick/asdf-zigmod/issues/139

Checked in container, the zsh in Linux is not broken...

darwin keeps newer zsh as 5.9 zsh 5.9 (x86_64-apple-darwin23.0) , almost same as nixpkgs zsh 5.9 (x86_64-apple-darwin23.3.0)
hard for me 💨