3DES fix and multi cert stance

Corrected Signature Algorithm and PFX Encryption bug as per https://github.com/MicrosoftDocs/azure-docs/issues/16426
(As per bug raised by Dell: https://msazure.visualstudio.com/One/_workitems/edit/3213031)
Included guidance to steer customers to use:

individual certificates for production environments
a single certificate across for endpoints for development environment only.

A single certificate across all endpoints gives an attacker a single asset to target/steal. Once compromised, Admin/Tenant/All RPs & AnyOther endpoints using that certificate are owned by an attacker. Since the breadth of a compromise is fully maximised, the scope of remediation ends up much much broader.

@johnerskine : Thanks for your contribution! The author, @mattbriggs, has been notified to review your proposed change.

@ktoliver : Thanks for your contribution! The author, @mattbriggs, has been notified to review your proposed change.


Improve Managed Process Stop() signaling/waiting

Half of these changes are in the modular resources PR already, but as I hit more issues, it felt cleaner to make this a new PR and make things configurable.
This PR makes both the stop signal and the timeout configurable, and stops in three steps. To start, the child process is signaled directly. After 1/3 of the timeout has passed, it then signals the entire process group (process and its children) in case the parent isn't managing its own child processes. Lastly, after the remaining 2/3 of the timeout interval, all processes in the process group are killed.
The one potentially "breaking" change is using SIGTERM instead of SIGINT by default. To be clear, I don't think this will actually break anything, and will actually improve/fix some uses.
Reasoning: Under linux and macos, SIGTERM is the correct signal for requesting a program to stop, whereas SIGINT is meant for keyboard interrupts (CTRL+C), and doesn't always indicate that a program should exit (for example, python triggers a traceback on SIGINT, vs ending normally on SIGTERM.) The "kill" command and process managers like systemd also signal with SIGTERM, so many programs only ever expect that.

Ugh, this breaks the config diffing stuff in RDK when I just tested... hold off on review.

Okay, NOW it's passing in RDK as well, and therefore ready for review I believe.
Also, opened an issue to add the protobuf support in RDK afterwards. https://viam.atlassian.net/browse/RSDK-1596


Ivan/intermediate table

Hi @toru-takahashi. I've added some more details to the docs for intermediate table as we had discussed. Please let me know if I missed anything or if I need to change anything.

Got it, thank you. I'll and a section explaining why.

Thanks.
Having a link to this article would be good: https://blog.treasuredata.com/blog/2017/07/25/analyze-infinitely-growing-data-incremental-queries/
Or, adding a knowledge in this article to this example would be nice.

ok great, I'll incorporate that article as well. thank you

Great! Thank you!


fix issue where listing inventory is not saved on first save

closes #1244

@rmisio can you fix the lint error in InventoryManagement? It doesn't use the _ any more.
Otherwise this looks good to go.


[Device map] nn.Parameter don't have children

This is needed to allow to use the "device_map" for models that have nn.Parameter at the top level, such as the safety checker of diffusers: https://github.com/huggingface/diffusers/pull/772/files#r990269773

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

What's a reproducer? I'm not sure how you get to a parameter here since we only apply the children method.

Haha that was fast. Here a repro:
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker

pipe = StableDiffusionSafetyChecker.from_pretrained('CompVis/stable-diffusion-safety-checker', device_map='auto')

Which branch should I check? On main I just get an error telling me device_map auto is not supported yet

Ah sorry just updated it above, can you try:
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker

StableDiffusionSafetyChecker._no_split_modules = ["CLIPEncoderLayer"]
pipe = StableDiffusionSafetyChecker.from_pretrained('CompVis/stable-diffusion-safety-checker', device_map='auto')

Awesome! Can I merge after one :heavy_check_mark: here or wait for another reviewer?

Nope, you can go ahead and merge!


Roll Plugins from f4ca73237db8 to 99aa799ea07a (11 revisions)

https://github.com/flutter/plugins/compare/f4ca73237db8...99aa799ea07a
2022-05-23<EMAIL_ADDRESS>[google_maps_flutter] Updates platform interface to new analysis options (flutter/plugins#5793)
2022-05-23<EMAIL_ADDRESS>[Camera] Return all possible cameras on iOS (flutter/plugins#5636)
2022-05-23<EMAIL_ADDRESS>[google_sign_in, in_app_purchase_android] Add availability to mock models (flutter/plugins#5642)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from de7c23e7e963 to ec20ea80ad98 (1 revision) (flutter/plugins#5805)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from b8b0c807bbe5 to de7c23e7e963 (1 revision) (flutter/plugins#5804)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from 4654fd011d13 to b8b0c807bbe5 (1 revision) (flutter/plugins#5803)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from 6aaabf6d5695 to 4654fd011d13 (2 revisions) (flutter/plugins#5802)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from 1e10ceceb036 to 6aaabf6d5695 (1 revision) (flutter/plugins#5800)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from 1e1f4bcfb561 to 1e10ceceb036 (6 revisions) (flutter/plugins#5799)
2022-05-21<EMAIL_ADDRESS>Roll Flutter from a4a8e73bce15 to 1e1f4bcfb561 (65 revisions) (flutter/plugins#5795)
2022-05-20<EMAIL_ADDRESS>[google_sign_in] Suppress deprecation warnings (flutter/plugins#5049)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-plugins-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.

Reopening and rebasing on main, will hopefully close https://github.com/flutter/plugins/pull/5793 by picking up https://github.com/flutter/plugins/pull/5793

Adding reviewers so I can merge manually when https://ci.chromium.org/p/flutter/builders/try/Linux flutter_plugins/26159 passes.

https://ci.chromium.org/p/flutter/builders/try/Linux flutter_plugins/26159 still failed:
   info - example/integration_test/google_maps_controller_test.dart:148:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:149:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:162:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:163:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:176:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:177:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:190:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_controller_test.dart:191:17 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:236:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:237:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:246:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:247:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:256:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:257:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:266:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables
   info - example/integration_test/google_maps_plugin_test.dart:267:11 - Prefer const literals as parameters of constructors on @immutable classes. - prefer_const_literals_to_create_immutables

Yea, it looks like google_maps_flutter_web was missed in the PR: https://github.com/flutter/plugins/pull/5793

I can create a PR, but I'm not sure why our CI didn't catch this

I can create a PR, but I'm not sure why our CI didn't catch this

Actually I already got it in https://github.com/flutter/plugins/pull/5811.
Updated this roll to that SHA.

Woot analysis passed https://ci.chromium.org/p/flutter/builders/try/Linux plugin_test/16601.
Merging.


Update proxy resources labels to include test metadata

:tada: This issue has been resolved in version 0.13.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Expense tracker

HTML Structure:
Header: Displays the title of the application, clearly indicating its purpose. Input fields for income and expenses. Includes buttons to submit entries. Shows current income, expenses, and balance in an organized manner.
Footer: Provides additional information or copyright details, enhancing the overall professionalism.
CSS Styling:
Adds depth to the main container and list items, making them visually appealing.
Header and Footer: Styled with a soft, semi-transparent background to maintain clarity while keeping them present. Background Color: A pleasant background color creates a calming atmosphere for users.
Button Styles: Rounded corners and smooth hover effects. Color change on hover provides immediate feedback.
Delete Button: Features opacity change on hover, clearly indicating its function.
JavaScript Functionality: Allows users to input income and expenses with real-time calculations for totals. Automatically updates displayed figures when a new transaction is added. Each expense entry includes a delete button for easy removal. The delete button lights up on hover, indicating available actions.

Overall Experience: Combines user-friendly design with robust functionality, making it a practical tool for financial management.

@MohakBajaj  I have made changes due to cooyright of images. Can you please review it.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:18: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:27: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:28: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:29: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:32: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:33: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:71: missing_pip_check: For pypi packages, pip check should be present in the test commands
WARNING: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:79: missing_description: The recipe is missing a description
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:79: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:79: missing_license_family: The recipe is missing the about/license_family key.
ERROR: /tmp/abs_49oy0jnyx4/clone/recipe/meta.yaml:79: missing_documentation: The recipe is missing a doc_url or doc_source_url
Errors were found

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:18: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:27: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:28: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:29: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:32: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:33: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:71: missing_pip_check: For pypi packages, pip check should be present in the test commands
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:79: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:79: missing_license_family: The recipe is missing the about/license_family key.
ERROR: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:79: missing_documentation: The recipe is missing a doc_url or doc_source_url
WARNING: /tmp/abs_19w46nbfkp/clone/recipe/meta.yaml:79: missing_description: The recipe is missing a description
Errors were found


Chore: Update the husky hooks and .releaserc tags

We will update the husky hooks in the package.json

Remove the git add -u from the pre-commit hook and add npm run lint to the pre-commit
hook
Add the npm run test command to pre-push hook

Remove the Doc, Chore and Build from the release tags as we don't have to release the carbon
graphs if we have any of those tags

Chore: Changes to the build process or auxiliary tools and libraries such as documentation
generation
Docs - changes to documentation only.
Build - changes to build process only.

Update the documentation for the commit message formats in the carbon repo

I believe 1.ii is to add npm run test to pre-push hook.

:tada: This issue has been resolved in version 2.6.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


blink.js: Add null check in thumbnail loader to avoid process crash

Thumbnails are crashing the process, and it seems that it is due to a null object being called upon.
TypeError: Cannot read properties of null (reading 'replace')
Refer to tickets #135 #120 #110 on the main parent repo
Tested on my Homebridge server and I am able to obtain Thumbnails again. Although not the best as we are limited by the Blink API, this restores functionality to the Homebridge plugin.

Sorry, i changed the blink.js, but is still not working - all cameras offline


additionalTextEdits runs before selection is added to document

VSCode Version: 1.10.1
OS Version: Windows 7 64 SP1

Steps to Reproduce:

Create a completion item like this:

    const completionItem = new CompletionItem("test", CompletionItemKind.Property);
    completionItem.additionalTextEdits = [TextEdit.insert(position, " = ")]
    return completionItem;

I was expecting to see =  inserted after the test keyword was added, but actually the text inserted from the CompletionItem replaces the additionalTextEdits actions. If I CTRL+Z I can see the selected completion item replaced it.

In my case, I want to run the additionalTextEdits after the keyword selected in the autocomplete is added to the document, so it would be good if we had additionalTextEditsBeforeSelectionAdded and additionalTextEditsAfterSelectionAdded

dupe of #19694. Long story short is that it's unexpected for to have additional text edits that modify text around the cursor. We advise to keep that in the main edit


fix extra arguments being passed to zfs create when ISO's already loaded (issue #190)

Thanks! Nice catch!


Enhancing module

Added the ability to have all Access variables present, but allow for null or empty.

This change is

Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.

DscResources/MSFT_xSmbShare/MSFT_xSmbShare.psm1, line 189 at r1 (raw file):

                Write-Verbose "Parameter ChangeAccess is null or empty, removing from collection."
                # Remove the parameter
                $psboundparameters.Remove("ChangeAccess")

Curious why we need to do this. If the parameter is not passed to Set-TargetResource then is it not already not part of $PSBoundParameters?

Comments from Reviewable

Holy cow, I did not see that anyone had looked at this!  My apologies.
If the parameters were empty or null, the setting was failing completely.  If they weren't part of the parameters being passed in, then it safely applied what was being requested.

Maybe we should use ValidateNotNullOrEmpty instead on the parameters? If we should not allow empty values, that should be changed on both the Set- and Test-TargetResource.
Would that work for the intended behavior?

Also, is there a scenario where any of the parameters need to be assigned an empty value? So we don't do a breaking change.

The ValidateNotNullOrEmpty would prevent anyone passing in null or empty.  The scenario that I am using is
				xSmbShare "Share-$($Folder.Share.Name)"
				{
					Name = $Folder.Share.Name
					Ensure = "Present"
					FullAccess = $Folder.Share.FullAccess
					ReadAccess = $Folder.Share.ReadAccess
					ChangeAccess = $Folder.Share.ChangeAccess
					Path = $Folder.PhysicalPath
				}

In my data document, I may or may not have anything specified for ChangeAccess, for example, so that would be a null.  I wanted the data document to be flexible enough so that you don't have to specify all of the different levels, only the ones you wanted to change.  Does that make sense?

Ah, I see what you are trying to do. I don't think this is the right approach. If a property should not be checked to be in a consistent state it should not be part of the configuration. This way if ChangedAccess on the target node would be anything other than an empty value the configuration would never become in a desired state.
The configuration should be built so that only the properties that should be in desired state is present.

I think I understand, but I'm going to paraphrase to make sure we're on the same page.  Given the scenario where User A has ChangeAccess and we set ChangeAccess to null, the configuration won't do anything with ChangeAccess and User A will retain the permission.  Your point is that in this case, User A ChangeAccess should be removed, is that correct?

I think User A's change access should be removed yes, because that is the desired state we want.
Let say we add a share 'TestShare', and we say the ChangeAccess should be $null (none). Then we want the desired state to be that no one should have change access.
If user A would be added manually to the share for change access. Then our configuration should remove user A, for the configuration to be in desired state.
If we want to keep user A that was added manually, we should not add the property ChangeAccess to the configuration. If the property is not present in the configuration the resource should not determine that properties state.

Gotcha.  You are correct, my solution does not currently handle that.  The removing of the parameters is still necessary because the SMS Share cmdlets will fail otherwise.  However, I need to change my solution so that users that have existing permissions that are not included in the specified desired state are added to the NoAccess collection, which will then remove their permissions.

That is incorrect, adding them to the NoAccess list only sets them to an explicit Deny versus removing them from the list.  I found that the original author checked to see if collection was null, if it wasn't, they removed all users with that access level and replaced it with the collection.  I have moved the removal out of the if statement and have it removing and then adding if the collection has anything in it.  This should ensure the correct desired state.

Review status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @twerthi)

a discussion (no related file):
There are currently no unit tests for this resource. Could you please add unit tests, for at least the functionality that this change affect?
The unit tests should be added to \Tests\Unit, and the unit test template is here https://github.com/PowerShell/DscResources/blob/master/Tests.Template/unit_template.ps1

Comments from Reviewable

I've not done these before, so it might take a little while as I work it into my schedule.  Thank you for providing the template that should help speed things up :)

@johlju, I'm wondering if I can get a little guidance as I've not done this before.  The template calls a function Initialize-TestEnvironment, which isn't included in the script, may I assume it's a known method that creates a test VM of some sort?  If so, is there documentation that describes what this VM looks like in terms of drives so that I can perform the setup of a share to test with?

@twerthi absolutely, happy too! 😃 Let me know if you have any further questions..
Tests are run using AppVeyor - AppVeyor provides build workers (VM's) and if not specified, by using image keyword in the appveyor.yml file in the root of the repository, then the default build worker name is (for now) 'Visual Studio 2015'.
The build worker is a normal Windows Server 2012 R2, with a bunch of tools installed to help building and testing. But see it as a clean Windows Server 2012 R2 for this purpose.
Tests are started by appveyor.yml (AppVeyor control file) and tests is run under the test framework DscResources.Tests which is cloned on run-time (even when you run tests locally with Invoke-Pester). Initialize-TestEnvironment is a helper function in the test environment. So everything in the header and footer of the test templates can safely be ignored, it just to get the prerequisite in place.
The test framework also has some common tests (for all resource modules) that needs to pass.
For example, you can find the test run for your PR if you click 'Details' on this (just below here).

In  AppVeyor you could create a free account (using your GitHub account) and can connect your fork to AppVeyor (add your fork as a project under Projects in AppVeyor). That way you can test your working branches, and send in PR's when you see they are passing tests.
There are two types of tests - unit test and integration tests. I will only expect you to write a unit test. But if you want to give an integration tests a go it would be much appreciated.
Unit test does not actually perform any actions, it just mocks the calls so it's possible to assert that the call mas wade. Integration tests actually performs the action, for example actually creates the share.  Due to the limitations of AppVeyor some integration tests can not be done, for example it is not possible to restart the build worker during testing.
Example of unit tests for a resource: https://github.com/PowerShell/SqlServerDsc/blob/dev/Tests/Unit/MSFT_SqlServerDatabaseMail.Tests.ps1
Example of integration tests for a resource: https://github.com/PowerShell/SqlServerDsc/blob/dev/Tests/Integration/MSFT_SqlServerDatabaseMail.Integration.Tests.ps1 and the accompanying configuration https://github.com/PowerShell/SqlServerDsc/blob/dev/Tests/Integration/MSFT_SqlServerDatabaseMail.config.ps1
I realized that we don't have that much information around this in DSC Resource Kit. But below is what I could find (created an issue to update the documentation).
More information around AppVeyor: https://github.com/PowerShell/DscResources/blob/master/CONTRIBUTING.md#tests-in-appveyor
Test guidelines: https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md
Test framework (just for reference, normally only necessary read for new resource modules): https://github.com/PowerShell/DscResource.Tests

Ah!!  Thank you, this helps tremendously!

The pieces are finally fitting together in my head.  I've only been able to work on this sporadically so it wasn't quite clicking.  Spent some time on the 4th and I believe I understand now.  Sorry it's taking so long.

@twerthi No worries, take your time. 🙂 If you get stuck, or need pointers, ping me and I try to help the best I can.

@johlju would you mind looking at the AppVeyor results?  It's complaining that there are tab characters, but I cannot seem to find any.  It also failed because there wasn't a manifest file, what is that?

Absolutely. I will do that as soon as I have time, tomorrow hopefully.

Can you move the unit tests to the folder \Tests\Unit (create 'Unit')  and see if that solves the problem with the unit test?
Regarding the tab-error, there must be some tab in the file MSFT_xSmbShare.psm1. Search for the tab-character and replace with four spaces instead.
If you still got error after that I will take a look again :)

I appreciate the continued assistance.  I was able to get past those errors, but have encountered a new one.  From the error message, it looks like it may be absolutely expecting a { after some of the statements.  Typically I put these on the next line so that I can line them up for readability, do the curly braces have to be on the same line?  Or are there specific statements where this is a requirement?

We should write the open brace on the next row, that’s also according to the style guideline. But, for Pester tests that is not possible due to how Pester is built. So for InModuleScope-, Describe-, Context- and It-blocks the open brace needs to be on the same line. :)

Got past that, looks like I've got some more work to do.  It's past lunch so I have to get back to work, I'll see if I can get further tomorrow.

Happy to help! 😃 Debugging your code showed that you tested apples and pears 🙂

First, the property returned from the Get-TargetResource is an array of strings, so we should check $result.ChangeAccess[0] (since the mock object we comparing to only have one value). Secondly, the row $mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Change'} returned an array of objects, because the Where-Object was never evaluated. If we use parenthesis around the block then Where-Object is evaluated, but then we return the mock object, which does not match the string returned by $result.ChangeAccess[0]. So if we instead change that part of the code to ($mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Change'}).AccountName we will test apple against apple 🙂
If you change the code to this, the Get-TargetResource test will pass.
$result.ChangeAccess[0] | Should Be ($mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Change'}).AccountName
$result.ReadAccess[0] | Should Be ($mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Read'}).AccountName
$result.FullAccess[0] | Should Be ($mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Full'}).AccountName
$result.NoAccess[0] | Should Be ($mockSmbShareAccess | Where-Object {$_.AccessRight -eq 'Deny'}).AccountName

Also, I saw that there are no mock object for the  $_.AccessRight -eq 'Deny', so this is essentially testing result.NoAccess[0] | Should BeNullOrEmpty

Ah!  Okay, I see what you're saying.

@twerthi on the Assert-MockCalled you have -ModuleName $script:DSCResourceName, that is not neccessary as you already are in an InModuleScope-block.

@twerthi You are doing an awesome job with these tests! Great work! 😃

Thanks!  Quick question regarding your feedback, you said to change the -Scope to It and move the $result =  into each It block, would that mean the Mock statements move as well?

The mock statements should normally not be in an It-block (there are exceptions). The mocks should be added in the Context-block, preferably in a BeforeAll-block or BeforeEach-block (which run before It-block).
I saw that in the unit test template we don't have an example of where to normally place the mocks. I submit an issue for that so we can update the unit test template.

Aha!  Yes, I see the problem now.  Thank you for the clarification.  Your help is most appreciated.  Almost there :)

@johlju it is still saying that I did not declare a mock of Get-SmbShare for Set in the context of When the system is not in the desired state, but passing for context When the system is in the desired state.  In both instances the Mocks are set up exactly the same way within the context block, what am I missing?

@twerthi If you referring to the Assert-MockCalled you should add -Scope 'It' to the calls so it only count's the mock calls inside the It-block.

Yeah, that makes sense ... feel kinda silly on that one :)

@johlju made some progress today, down to 2 failing issues.  In the Test-TargetResource of the module, I see that it's calling Get-TargetResource for the current state.  I'm thinking I need to Mock this method call, but I'm not sure if the Get-TargetResource section of the unit test is in play or not.  Would you mind taking a look?

Each function has a separate Describe-block so the describe block are not working together, but are separate instances with mocks and tests. Since you are testing the Get-TargetResource in one describe block, and you are testing that it returns the proper values, then you can just mock Get-TargetResource in the Test-TargetResource Describe-block to simplify the (number of) mocks.

I haven't forgotten about this, been bogged down by work.

@johlju The test for Test-TargetResource when not in desired state is failing and I cannot figure out why.  I mocked the Get-TargetResource method, setting the data shape to what is returned by the actual method.  I set the parameters to make sure that the list of users for the different access levels were different from the returned Get-TargetResource values.  It keeps returning true.  I've gone over the logic in the Test-TargetResource of the actual module and it should be returning false.  I'm stumped.

@twerthi Let me know if my comments above helped you, or if can help you more 🙂

@johlju Will do.  I can only work on this as I have time, I'm bogged down at work at the moment, but will see if I can use my lunch hour soon.

No worries. There is no hurry, just wanted to check if it helped you continue :) Take the time you need

I'll need to spend some more time locally before pushing anything else.  Looks like something is definitely not working the way it should.

@twerthi If you are not debugging with VSCode (and the PowerShell extension) then I highly suggest using VSCode (it can start a specific describe block) and stop at a break point, and then you can step through each line and see what the result is, and you will probably find the problem soon.

Not sure why the build is failing, @johlju, can you see why?

@johlju Don't accept this yet, I think I may have missed something.

@johlju Never mind, it's there.

I thought I'd done everything necessary for this PR, did I miss something?

@johlju this has been marked as stale.  I know that you've only recently come back from vacation and this is probably one of many on your list.

Yes there are a long backlog. :/ And have a lot of stuff to do at the day work currently, so can’t really catch up yet.
But this and all others are not forgotten. :smile:

That make sense :)  Thanks for getting back to me so quickly.

Is this one acceptable?

We all good now?

Checking in, anything that I'm missing?

Hi @twerthi,
Thanks for pinging us.
I'll see if @johlju as time for a final review or I'll ask him to fill me in and finish that off.
Do @ me tomorrow if it hasn't moved forward.

On it.

@gaelcolas can you merge this one as I have no permission to merge. :)

@twerthi can you add an entry in the changeling describing your change? I'll use it to merge the pr first thing tomorrow.

This project doesn't appear to have a CHANGELOG.md file in the root, do I need to add one or is it located somewhere else?

@twerthi some repos have not split the change log into a seperate file. Then you find the unreleased section under the header changelog in the file README.md.

Oh!  I had fully planned on making the updates as requested, but got busy at work and am prepping for an event.  Thank you very much for taking care of that :)

No worries. Given we're all in different timezone I thought it'd be nice to close it before the monthly release tomorrow.


libssl.1.1.dylib' not found for mysql2

test.rb file:
#!/usr/bin/ruby
#
require "mysql2"

mysql_client = Mysql2::Client.new(
    :host =>  'localhost',
    :username => 'root',
    :password => 'xxxxx',
    :database => 'xxxx',
    :encoding => 'utf8'
)

ruby test.rb

terminal print error:
Traceback (most recent call last):
	2: from test.rb:4:in `<main>'
	1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- mysql2 (LoadError)
	6: from test.rb:4:in `<main>'
	5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
	4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
	3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
	2: from /Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2.rb:36:in `<top (required)>'
	1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): dependent dylib 'libssl.1.1.dylib' not found for '/Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle'. relative file paths not allowed 'libssl.1.1.dylib' - /Library/Ruby/Gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle (LoadError)

system: macOS 10.15.4 (19E287)
ruby version: ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
~/.bash_profile:
MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
export<EMAIL_ADDRESS>export<EMAIL_ADDRESS>
The openssl1.1 has been install by brew install openssl.

Marking as inactive, to be closed at the end of 3.4 dev, barring further input


Further MLE baselines in the paper?

Hi,
Thank you for providing this wonderful repo!
We are very interested in your paper Efficient (Soft) Q-Learning for Text Generation with Limited Good Data and would like to replicate the experimental results therein.
We notice that in the paper you have some baselines that combine MLE training with the reward function, such as (1) using the reward function to filter examples; and (2) MLE weighted by rewards (page 6). However, we don't find implementations for these two baselines in this repo and don't quite know how to implement them ourselves. Specifically, since the paper assumes a sparse reward ( $r_t = 0, \ \forall \ t < T$ on page 3), when using the rewards to weight the MLE, it appears that almost all the likelihood values will get a weight 0, i.e., $r_t \cdot \log \pi(a_t \mid s_t) = 0 \cdot \log \pi(a_t \mid s_t) = 0, \ \forall \ t < T$. This problem seems to also hold for the MLE+reward baseline.
Could you please kindly let us know how these two baselines can be implemented?
Thank you so much!

Hi Shentao,
Thanks for being interested in this work!
Those are good questions, and thanks for pointing out the confusion. For the filtering case, you could simply filter examples based on the rewards. For the weighting case, you could use the reward to weigh the loss. In both cases, they operate on the sequence level (instead of the token level).
Hope this helps!

Thank you so much for the clarification. Yes, sequence-level rewards make sense to me!


how can i use Sequential to achieve the process of Forward propagation

I really want know how to use Sequential to achieve the process of Forward propagation,like sess,run

i find it ，to use np.expand_dims then predict

i find it ，to use np.expand_dims then predict


Fix incorrect statement about GCE network load balancing

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/53dfbfc0f20a8e32e701e6abe76b2d313ae109ee/


🍒 Cherry pick PR #18604 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/18604 to staging 🍒

🚀 Cherry-picked to staging by https://github.com/OSBotify in version: 1.3.14-13 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


V1 - Not able to access V1 Project console and Corporate Console UI's

Launch V1 landing page
Click Proceed for Project Console
Login
User is redirected back to landing page
Clicked Proceed and again user is redirected back to landing page. Observed same issue for Corporate Console

@nirupamav this should be resolved now.

Verified that the issue is fixed


Can Python or R scripts run with Incremental Refresh?

This was an issue in the past regarding Python scripts not being able to automatically refresh unless you are using a personal on-premise data gateway. Does incremental refresh using a non-personal in-premise data gateway support Python and R scripts to run after being Published?

Hi, @duncangrace -- are you referring to a specific article? If you let me know which one, I can refer your question to the author. Thanks!

Hi, @duncangrace -- perhaps you're referring to this article, https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts? Assigning to that author to answer your question.

Hello @duncangrace,, you would still need on-premises data gateway in personal mode to be able to refresh Python (or R) scripts. It is currently not supported in standard (also known as enterprise) mode. It's mainly due to security and permissions with which personal vs standard modes are run. Personal mode runs as an application with your credentials. Enterprise mode runs as a service with administrator privileges.
Let me know if this answers your question.


Update Validation Messages

Feature Request
Desired behaviour
Lots of validation messages need to be added to UI2.  Currently, there are only a 8 fields with a set of validation messages.

Note to self: see what has validation and close if not applicable

Notes:

Dockerfile validation message not quite right, says "Invalid Dockerfile Path format. Dockerfile Path must begin with '/' and end with '/Dockerfile'. " but "/test.Dockerfile" and "/Dockerfile.test" are accepted as they should be.
WDL Test Parameter File(s) has no message
Workflow path and label validation warnings use big red warnings, the other valdiations just use black text on the regular background. Seems inconsistent.

I tried 3 dialogs -- let me know if there are more I should test.
Add Tag
A Tag Name may only consist of alphanumeric characters and internal hyphens, periods and underscores.

The label for the control is Version Tag, not Tag Name.
The word and is in there twice; I suggest A Tag Name may only consist of alphanumeric characters, internal hyphens, periods and underscores.

Invalid Git Reference format. An Git Reference path may only consist of alphanumeric characters, '-' and '_', with interior '/' and '.' separators.

Should be A Git Reference....

Invalid Descriptor Path format. Descriptor Path must begin with '/' and end with '*.cwl', '*.yml', or'*.yaml'.

No space after or in or'*.yaml
I would lean towards not having the asterisks, although I can see why you do, to indicate something must go before the .cwl.

Register Tool
The namespace and name of the image repository, separated by a '/'. Use '_' for an empty namespace. Currently, only Quay.io and Docker Hub are supported third-party platforms.

Is this correct? The dropdown also shows Gitlab and Amazon ECR, but the error message doesn't mention them. If it's correct, I suppose makes sense, although what am I supposed to do with the other two choices in the dropdown?; if we support all 4, then I don't think that should be part of the message at all.

No validation for Docker registry path and tool name

Register Workflow
Source Code Repository Path is too short. (Min. 3 characters.) The namespace and name of the Git repository, separated by a '/'. Currently, only GitHub, Bitbucket and GitLab are supported third-party platforms.

Similar to my previous comment, I don't think you should have Currently, only GitHub, Bitbucket and GitLab are supported third-party platforms. -- that's informational, not an error, and the dropdown already indicates what platforms are supported.

Looks much improved


add precommit hook

https://towardsdatascience.com/getting-started-with-python-pre-commit-hooks-28be2b2d09d5

PyCharm is not compatible with pre-commit hooks, so removing for the time being


x/tools/oracle does not install into $GOPATH/bin on OS X El Capitan

What version of go are you using?
go version go1.5.1 darwin/amd64
What operating system and processor architecture are you using?
Macbook Air OS X El Capitan version 10.11 (15A284)
What did you do?
go get -u -v golang.org/x/tools/oracle
What did you expect to see?
As per the oracle manual, I expect an installation of oracle to appear in $GOPATH/bin.
What did you see instead?
$GOPATH/bin is unchanged; no binary appears there.
To ensure that this was not simply a problem with my go installation, I performed the same procedures with go get github.com/tools/godep, which successfully led to the godep binary appearing in $GOPATH/bin

go get golang.org/x/tools/cmd/oracle, not go get golang.org/x/tools/oracle – You're fetching the oracle library, not the actual tool.

I checked the manual, and the command listed there is correct.


Issue with dynamic routes and draftMode

Describe the bug
The site works well with live preview mode fully functional except for on dynamic routes where I get this error:
Error: `draftMode` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context

sanity/lib/client.ts (29:32) @ draftMode
  27 |   tags?: string[];
  28 | }) {
> 29 |   const isDraftMode = draftMode().isEnabled;
     |                                ^
  30 |   if (isDraftMode && !token) {
  31 |     throw new Error("Missing environment variable SANITY_API_READ_TOKEN");
  32 |   }

I checked issue #1598 which recommends using the client.fetch library instead of sanityFetch inside of generateStaticParams however I was following along with the guide and was already using client.fetch, still seeing the error though.
To Reproduce
Steps to reproduce the behavior:

Follow guide until dynamic pages
Try to open dynamically generated route

Expected behavior
Post should load and display without errors.
Which versions of Sanity are you using?
@sanity/cli (global)        3.51.0 (up to date)
@sanity/icons                3.3.0 (latest: 3.3.1)
@sanity/image-url            1.0.2 (up to date)
@sanity/preview-url-secret  1.6.18 (up to date)
@sanity/react-loader        1.10.4 (up to date)
@sanity/vision              3.51.0 (up to date)
@sanity/visual-editing       2.1.6 (up to date)
sanity                      3.51.0 (up to date)

What operating system are you using?
macOS 15
Which versions of Node.js / npm are you running?
v20.15.1
10.7.0

Problem solved, I was utilising a siteSettings schema type to define metadata within a Next.js generateMetadata function which did utilise sanityFetch instead of client.fetch.


Color TUI for live view mode.

Now TUI for --live-view is colorful. We use own fork of ansi-terminal-game because of conflicts in QuickCheck dependencies.

bors r+


Device ADR proposal

Some thoughts from office conversations at ISIS (@rerpha):

We feel the procedural option is nicer / more supportable / less magical (basically in agreement with ADR 6)
In most of our cases we probably could write our devices using the declarative approach, but in a few places it would probably get a bit messy and much harder to read than the declarative approach

Slightly worried about loss of flexibility / explicitness of the declarative approach

How would a type-generic device be written using the declarative approach? If I have a Generic[T] device would the T typevar be a valid datatype to pass to the declarative signal datatype? I'm a bit worried about getting tied in typing knots here and it's all very not-obvious I feel, whereas the explicit approach makes it quite obvious...

Would appreciate being involved in the discussion if it looks like we might be going towards declarative route.

One key point that came out of the discussion is that we should always be free to drop to procedural. We should always be able to have an __init__ method that does epics_signal_rw calls. This should be used for any of the DeviceVector cases, and any tricky generics (although I think they could mostly be made to work in the declarative approach). This means we should never be writing a formatted string in the declarative approach, if we need it we should drop to an __init__ method.
The question here is should we support the declarative approach for a subset of the EPICS devices. I think the large number of areaDetector drivers and plugins we are writing are good use case for this, they have no logic, only interface, and are more naturally written in the declarative style. This would allow us to teach the declarative style first, then introduce the procedural style when we need the more complicated examples.
Happy to discuss this in more detail on a zoom call

@coretl and I discussed on zoom but will add the result of the discussion here:

One key point that came out of the discussion is that we should always be free to drop to procedural.

This is fine from our perspective then - I was worried that the annotation style would be enforced, as long as procedural is still a supported option this is fine for us.

I echo @Tom-Willemsen's thoughts. Prefer the more explicit procedural approach but happy if ophyd_async supports both. Could I suggest we add a line in the ADR that explicitly says something like "This is not a step towards only supporting the declarative approach and there are no plans to drop the procedural approach"


ci: enabling Linux tests missing

Description
Related to #1151
Issue linked
Closes #1151
Checklist

[X] I have tested my changes locally.
[X] I have added necessary documentation or updated existing documentation.
[X] I have followed the coding style guidelines of this project.
[X] I have added appropriate unit tests.
[X] I have reviewed my changes before submitting this pull request.
[X] I have linked the issue or issues that are solved to the PR if any.
[X] I have assigned this PR to myself.
[X] I have added the minimum version decorator to any new backend method implemented.
[X] I have made sure that the title of my PR follows Conventional commits style (e.g. feat: extrude circle to cylinder)

Tests activated:
test_project_and_imprint_curves()
test_copy_body()
test_boolean_body_operations()
test_boolean_body_operations()
test_body_mapping()
test_sweep_sketch()
test_sweep_chain()
test_material_creation()
test_extrude_dummy_gear()
test_extrude_spur_gear()
test_body_tessellate()
test_component_tessellate()


Incorrect types

Description
Hello! 👋
I'm unable to migrate to the PIXI v6 probably because of the incorrect library types. I get the following error for the most of components:

Type 'InteractionEvents'.
Property 'any property' is incompatible with index signature.
Type 'any type' is not assignable to type '((event: InteractionEvent) => void) | undefined'.

The error happens as soon as you add at least one property to a component.
It's really strange that my kind of an issue still wasn't opened before so I'm probably doing something wrong on my side.
Here's a sandbox.
Steps to reproduce

yarn add pixi.js @inlet/react-pixi

Additional info

@inlet/react-pixi version: 6.2.0
React version: 17.0.1
ReactDOM version: 17.0.1
PIXI version: 6.0.0

Yes I’m aware of this, I’ll update the types once I have the time (probably early this week). Please feel free to create a PR with the updated types, thanks!

Fixed in v6.2.1


Add support for HA PROXY v1

This commit adds a flag (--haproxy1) which causes tlstunnel to send
connection details to the destination upon connection.
This is useful if running nginx, Varnish or similar behind tlstunnel in order
to obtain the IP of the client.
Example of a TCP/IPv4 connection from <IP_ADDRESS>:39837 to <IP_ADDRESS>:4433:
PROXY TCP4 <IP_ADDRESS> <IP_ADDRESS> 39837 4433

this looks great, thanks... I'll merge tomorrow after I tried it somehow

Example usage for testing:
Run tlstunnel:
user@localhost:~/tlsping (master)$ ../tlstunnel/tlstunnel.native --cert proxy.public.certificate --key proxy.secret.key --haproxy1
[2016-02-04T00:22:33Z] listener started on <IP_ADDRESS>:4433, forwarding to <IP_ADDRESS>:8080
[2016-02-04T00:22:52Z] <IP_ADDRESS>:54508: connection established (TLS version 1.2, TLS_DHE_RSA_WITH_AES_256_CCM)

netcat listener:
user@localhost:~$ nc -v -l -p 8080
listening on [any] 8080 ...
connect to [<IP_ADDRESS>] from localhost [<IP_ADDRESS>] 50062
PROXY TCP4 <IP_ADDRESS> <IP_ADDRESS> 54508 4433

connect using tlsclient:
user@localhost:~/tlsclient $ ./tlsclient.native localhost:4433


ValueError: axes (YXC) must be of length 2

Describe the bug
I'm trying to do cell segmentation on a .tif image (HE) which I'm cropping to have shape (5012, 5012), but I keep getting an error that ValueError: axes (YXC) must be of length 2.. If I put axes="YX", it simply shows this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/work/RO_src/venv/stardist_venv/lib/python3.10/site-packages/stardist/models/base.py", line 788, in predict_instances
    for r in self._predict_instances_generator(*args, **kwargs):
  File "/mnt/work/RO_src/venv/stardist_venv/lib/python3.10/site-packages/stardist/models/base.py", line 740, in _predict_instances_generator
    for res in self._predict_sparse_generator(img, axes=axes, normalizer=normalizer, n_tiles=n_tiles,
  File "/mnt/work/RO_src/venv/stardist_venv/lib/python3.10/site-packages/stardist/models/base.py", line 551, in _predict_sparse_generator
    self._predict_setup(img, axes, normalizer, n_tiles, show_tile_progress, predict_kwargs)
  File "/mnt/work/RO_src/venv/stardist_venv/lib/python3.10/site-packages/stardist/models/base.py", line 392, in _predict_setup
    self.config.n_channel_in == x.shape[channel] or _raise(ValueError())
  File "/mnt/work/RO_src/venv/stardist_venv/lib/python3.10/site-packages/csbdeep/utils/utils.py", line 89, in _raise
    raise e
ValueError

To reproduce
# %%
import numpy as np
from stardist.models import StarDist2D
from stardist.plot import render_label
from csbdeep.utils import normalize
import matplotlib.pyplot as plt
from PIL import Image

# Load the image
img = Image.open("/40x_BF_01.tif")

# Define the crop size
crop_size = (5012, 5012)

# Define the top-left corner of the cropping box
top_left_x = 300  # Example x coordinate
top_left_y = 300  # Example y coordinate

# Calculate the bottom-right corner based on the crop size
bottom_right_x = top_left_x + crop_size[0]
bottom_right_y = top_left_y + crop_size[1]

# Crop the image using the defined box
crop_box = (top_left_x, top_left_y, bottom_right_x, bottom_right_y)
cropped_img = img.crop(crop_box)

# Convert to grayscale and numpy array if needed
cropped_img = cropped_img.convert("L")  # Convert to grayscale (2D image)
cropped_img = np.array(cropped_img)  # Convert to numpy array

# Normalize the image
cropped_img = normalize(cropped_img)
# Load the pretrained StarDist model for H&E
model = StarDist2D.from_pretrained("2D_versatile_he")
# %%
# Predict instances with the correct axes specified
labels, _ = model.predict_instances(cropped_img, axes="YX")

# %%
# Plot the results
plt.subplot(1, 2, 1)
plt.imshow(cropped_img, cmap="gray")
plt.axis("off")
plt.title("Cropped Input Image")
# %%
plt.subplot(1, 2, 2)
plt.imshow(render_label(labels, img=cropped_img))
plt.axis("off")
plt.title("Prediction + Input Overlay")
plt.show()

Data and screenshots
If applicable, add data (e.g. images) or screenshots to help explain your problem.
I'm able to see the greyed out image using the L formatting, so the image is being loaded:

Environment (please complete the following information):
Latest packages for stardist and tensorflow

The 2D_versatile_he model expects the input to be a (normalized) RGB array, i.e. img.shape=(N,M,3)


double reward

Spark link
No response
Plugin Version
CrazyCrates v1.21-74
Server Version
1.21
Server Platform
Purpur
Describe the bug

receives twice the amount of diamonds from itemstack and name+lore
'3':
DisplayName: 'Diamond x32'
DisplayItem: DIAMOND
DisplayAmount: 32
DisplayLore: []
MaxRange: 100
Chance: 90
Firework: false
Glowing: false
Player: ''
Unbreakable: false
Items: []
Editor-Items:

==: org.bukkit.inventory.ItemStack
v: 2227
type: DIAMOND
amount: 32
Commands: []
Messages: []
BlackListed-Permissions: []
Alternative-Prize:
Toggle: false
Commands: []
Items: []
Messages: []

Crate Type
None
Steps to reproduce

open creates
you will receive a double reward

Additional context
this error appears when the option is enabled
true -> uses the old one
false -> uses the new one
use-old-editor: true
when use-old-editr is true you get double rewards from itemstack and name+lore
Agreements

[X] I have searched for and ensured there isn't already an open issue regarding this.
[X] I ticked all the boxes without actually reading them
[X] My version of Minecraft is supported by CrazyCrew.

Fixed


Add upgrade path file for 2.7.0 to 3.0.0 in babelfishpg_common

Description
This commit introduces an upgrade path file for upgrading version 2.7.0 to 3.0.0 in the babelfishpg_common module.
Issues Resolved
Test Scenarios Covered

Use case based -

Boundary conditions -

Arbitrary inputs -

Negative test cases -

Minor version upgrade tests -

Major version upgrade tests -

Performance tests -

Tooling impact -

Client tests -

Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 73.045%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
41453

Relevant Lines:
56750

💛  - Coveralls


Missing required RBAC permission in helm template

Do you want to request a feature or report a bug?

Bug

What did you do?
Created v2.2 traefik on k3s via the official helm template

What did you expect to see?
No errors
What did you see instead?
Errors in the service about missing permissions.
Resolved by adding
  - apiGroups:
      - extensions
      - networking.k8s.io
    resources:
      - ingresses
      - ingressclasses
    verbs:
      - get
      - list
      - watch

to  templates/rbac/clusterrole.yaml
Output of traefik version: (What version of Traefik are you using?)

± kubectl exec -it traefik-85d7c864fb-hw64j traefik version
Version: 2.3.0-rc4
Codename: picodon
Go version: go1.15
Built: 2020-08-19T16:02:03Z
OS/Arch: linux/arm64

What is your environment & configuration (arguments, toml, provider, platform, ...)?
not relevant
If applicable, please paste the log output in DEBUG level (--log.level=DEBUG switch)
$ kubectl logs service/traefik-udp | tail -n 1
E0831 15:26:55.935478       1 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.2/tools/cache/reflector.go:125: Failed to list *v1beta1.IngressClass: ingressclasses.networking.k8s.io is forbidden: User "system:serviceaccount:default:traefik" cannot list resource "ingressclasses" in API group "networking.k8s.io" at the cluster scope

Fixed by #267


WIP - Adapt static analysis for CoAxialRotor

Related to issues #443 and #454.
Some improvements to .run_static():

Supports CoAxialRotor class (multiple shafts)
More information when returning disks and bearing forces. The user can choose to return a dict with nodal position for each force or with a element tag.
Remove some repetitive calculus on code.

Some improvements to StaticResults:

StaticResults now supports plotting results for multiple shafts.
Multiple shafts are plotted in the same figure (.plot_free_body_diagram() will display multiple figures).
New: the user can ommit a result by clicking on the respective legend (not valid for .plot_free_body_diagram()).

Codecov Report

Merging #455 into master will increase coverage by 4.63%.
The diff coverage is 75.22%.

@@            Coverage Diff             @@
##           master     #455      +/-   ##
==========================================
+ Coverage   75.73%   80.37%   +4.63%
==========================================
  Files          15       15
  Lines        4010     4132     +122
==========================================
+ Hits         3037     3321     +284
+ Misses        973      811     -162

Impacted Files
Coverage Δ

ross/api_report.py
88.45% <100%> (ø)
:arrow_up:

ross/disk_element.py
97.29% <100%> (+0.86%)
:arrow_up:

ross/bearing_seal_element.py
90.62% <100%> (+35.97%)
:arrow_up:

ross/results.py
46.09% <3.33%> (-1.59%)
:arrow_down:

ross/rotor_assembly.py
89% <88.26%> (-1.49%)
:arrow_down:

ross/shaft_element.py
95.14% <0%> (+0.37%)
:arrow_up:

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 dbc2736...314e993. Read the comment docs.


Fix two README.md typos

Sorry if short little PRs like this aren't welcome - I just blindly copied the dependencies from the readme and was met with a few seconds of sadness, so I figured I'm make a PR to prevent that for other people.

Hey thanks! Managed to miss especially the latter one somehow huh.


How to customize CN?

I need a certificate with a specific Common Name. I didn't find any doc about that. Is it possible to customize? Thanks.

We don't support this, you can see some of the reasons at #205

Thanks for your answer.
We understood that trying to use mkcert for our particular case was not a good idea for quite a few reasons.
We opt for a quite simple custom script that automates the creation of the CA root + a star-domain certificate and their addition to proxy server, java-truststore, FF trustore, etc.


fix: Refactor Inline Styles to Local CSS in Component Files

Description
Refactored inline styles in component files to utilize local CSS for improved maintainability and readability.
This PR fixes #37
Changes Made

Removed inline styles present within component files.
Introduced local CSS files corresponding to each component where necessary.
Updated the component logic to import and utilize the local CSS classes instead of inline styles.

@Arindam200 there are a few changes here, can you make these updates?

Sure.
I'm updating this.


Mouse click on integrated terminal doesn't give it focus

Works on Ctrl-w-j

Thanks for logging the issue @inferno-umar , can reproduce


Fix hotkey bugs.

This fixes the iOS bug and the resize performance issue.

Automated message from Dropbox CLA bot
@showell, it looks like you've already signed the Dropbox CLA. Thanks!

This makes sense and is a lot cleaner than the old checks in the keydown/keypress handlers.  Merged, thanks @showell!!


AIX builds fail to fork clang process

Thank you for reporting a broken build! Please fill in the following details:

Jenkins link to the failing log:
https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk11u/job/jdk11u-aix-ppc64-temurin/229/consoleFull
Which platforms (OS+arch) are affected?:
AIX
If you look at the historic logs, does the problem appear to be specific to one machine?:
There are three AIX machines that can run JDK11 builds:

build-osuosl-aix72-ppc64-1 - sees this issue.
test-osuosl-aix72-ppc64-1 - fails in configuration step due to lack of freetype.
test-osuosl-aix72-ppc64-2 - Fails due to "current object file mode" as mentioned here

So while it's possible the issue is limited to only one AIX machine, we cannot say this for certain until the build starts passing somewhere else.

Since the log will disappear, the error is:
18:28:08  === Output from failing command(s) repeated here ===
18:28:08  * For target support_native_jdk.jdwp.agent_libjdwp_static_ArrayReferenceImpl.o:
18:28:08  /opt/IBM/xlC/16.1.0/bin/.orig/xlclang: error: 1501-222 cannot fork process - Resource temporarily unavailable
18:28:08
18:28:08  * All command lines available in /home/jenkins/workspace/build-scripts/jobs/jdk11u/jdk11u-aix-ppc64-temurin/workspace/build/src/build/aix-ppc64-normal-server-release/make-support/failure-logs.
18:28:08  === End of repeated output ===

Also note that the issue with building on the test- machine is covered at https://github.com/adoptium/infrastructure/issues/3038


Datastore Paging and Sorting Repo functions

related to #1054. @dmitry-s is doing the REST repo support and that requires these two functions.

This was completed along with #1054


UnexpectedParameter: Unexpected key 'TimeToLiveSpecification'

Actual Behaviour
When running with the following serverless config for Dynamo:
    TodosDynamoDbTable:
      Type: 'AWS::DynamoDB::Table'
      DeletionPolicy: Delete
      Properties:
        AttributeDefinitions:
          -
            AttributeName: eviSessionId
            AttributeType: S
        KeySchema:
          -
            AttributeName: eviSessionId
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 50
          WriteCapacityUnits: 15
        TableName: ${self:provider.environment.DYNAMODB_TABLE}
        TimeToLiveSpecification:
            AttributeName: expiresOn
            Enabled: true

I get this error as a result of the TimeToLiveSpecification field:
UnexpectedParameter: Unexpected key 'TimeToLiveSpecification' found in params
    at ParamValidator.fail (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/param_validator.js:50:37)
    at ParamValidator.validateStructure (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/param_validator.js:77:14)
    at ParamValidator.validateMember (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/param_validator.js:88:21)
    at ParamValidator.validate (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/param_validator.js:34:10)
    at Request.VALIDATE_PARAMETERS (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/event_listeners.js:125:42)
    at Request.callListeners (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at callNextListener (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
    at /Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/event_listeners.js:85:9
    at finish (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/config.js:320:7)
    at /Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/config.js:338:9
    at Credentials.get (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/credentials.js:126:7)
    at getAsyncCredentials (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/config.js:332:24)
    at Config.getCredentials (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/config.js:352:9)
    at Request.VALIDATE_CREDENTIALS (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/event_listeners.js:80:26)
    at Request.callListeners (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/sequential_executor.js:101:18)
    at Request.emit (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at Request.runTo (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/request.js:403:15)
    at Request.send (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/request.js:367:10)
    at makeRequest (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/service.js:193:27)
    at svc.(anonymous function) [as createTable] (/Users/lilith.saer/Projects/session-access-cache/node_modules/aws-sdk/lib/service.js:499:23)
    at BbPromise (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:200:26)
    at ServerlessDynamodbLocal.createTable (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:199:16)
    at BbPromise.each (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:122:55)
From previous event:
    at ServerlessDynamodbLocal.migrateHandler (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:122:26)
    at BbPromise.resolve.then (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:157:45)
From previous event:
    at ServerlessDynamodbLocal.startHandler (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless-dynamodb-local/index.js:157:10)
    at BbPromise.reduce (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/lib/classes/PluginManager.js:372:55)
From previous event:
    at PluginManager.invoke (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/lib/classes/PluginManager.js:372:22)
    at PluginManager.run (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/lib/classes/PluginManager.js:403:17)
    at variables.populateService.then (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/lib/Serverless.js:102:33)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
    at Serverless.run (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/lib/Serverless.js:89:74)
    at serverless.init.then (/Users/lilith.saer/Projects/session-access-cache/node_modules/serverless/bin/serverless:42:50)

Expected Behaviour
This should start up without issue.
Steps to reproduce it
Run npm start with the following field included in the DynamoDB specs:
        TimeToLiveSpecification:
            AttributeName: expiresOn
            Enabled: true

Would you like to work on the issue?
I would like to work on resolving this myself, but do not know where to start. If someone can point me in the right direction I would not mind taking the time to attempt a resolution.

Hi @DrakkenSaer Following links might be good starting points for TTL. I was under the impression that it was already fixed. Can you have a look at it then? I will assign the issue to you

Hi @DrakkenSaer is it connected with #110 ? If so it should be fixed. If not you can refer the implementation of the same PR and take things forward?


Training Script stablity 3B and 7B

`# Developed by Aamir Mirza
create a conda virtual environment python 3.9
install PyTorch 1.13.1 ( not 2.0)
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
install the latest transformers
conda install -c conda-forge transformers
install deepspeed  from GitHub not pip install
build deepspeed with CPU Adam optimiser support like this
git clone https://github.com/microsoft/DeepSpeed
DS_BUILD_CPU_ADAM=1 pip install .
accelerate via pip
pip  install Ninja
conda install -c conda-forge mpi4py
train via commandline for example
deepspeed  train_gptNX_v2.py  --num_gpus=2
In my case I have 2x 3090 24GB
from transformers import GPTNeoXForCausalLM, GPTNeoXTokenizerFast, TextDataset,
DefaultDataCollator, DataCollatorForLanguageModeling, DataCollatorWithPadding
from transformers import Trainer, TrainingArguments
from datasets import load_dataset
import os
os.environ['OMPI_MCA_opal_cuda_support'] = 'true'
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
If you got a single GPU then change this to one
os.environ["WORLD_SIZE"] = "2"
Change this to your requirement for example 4096 (MAX)
MAX_LEN = 1024
stage2_config = """{
"bf16": {
"enabled": "auto",
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"optimizer": {
    "type": "AdamW",
    "params": {
        "lr": "auto",
        "betas": "auto",
        "eps": "auto",
        "weight_decay": "auto"
    }
},

"scheduler": {
    "type": "WarmupLR",
    "params": {
        "warmup_min_lr": "auto",
        "warmup_max_lr": "auto",
        "warmup_num_steps": "auto"
    }
},

"zero_optimization": {
    "stage": 2,
    "offload_optimizer": {
        "device": "cpu",
        "pin_memory": true
    },
    "allgather_partitions": true,
    "allgather_bucket_size": 2e8,
    "overlap_comm": true,
    "reduce_scatter": true,
    "reduce_bucket_size": 2e8,
    "contiguous_gradients": true
},

"gradient_accumulation_steps": "auto",
"gradient_clipping": "auto",
"train_batch_size": "auto",
"train_micro_batch_size_per_gpu": "auto"

} """
class CustomTrainer(Trainer):
def compute_loss(self, model_a, inputs_a, return_outputs=False):
strd = ' '
outputs = model_a(**inputs_a, labels=inputs_a["input_ids"])
loss = outputs.loss
return (loss, outputs) if return_outputs else loss
tokenizer = GPTNeoXTokenizerFast.from_pretrained("stabilityai/stablelm-base-alpha-3b")
def process_data(examples):
texts = examples["text"]
# Remove empty lines
texts = [text for text in texts if len(text) > 0 and not text.isspace()]
# Remove lines that are too long
texts = [text for text in texts if len(text) < 512]
# Remove lines that are too short
texts = [text for text in texts if len(text) > 16]
# add newline character
texts = [text + ' ' + '\n' for text in texts]
examples["text"] = texts
return examples
process dataset columns [text] use tokenizer to get input_ids and attention mask
def process_data_add_mask(examples):
text = examples['text']
tokenizer.pad_token = tokenizer.eos_token
# Tokenize text
encoded_dict = tokenizer(
text,
padding=True,
truncation=True,
max_length=MAX_LEN
)
# Add input_ids and attention_mask to example
examples['input_ids'] = encoded_dict['input_ids']
examples['attention_mask'] = encoded_dict['attention_mask']
return examples
imdb_dataset = load_dataset('imdb')
imdb_dataset_train = imdb_dataset['train']
imdb_dataset_train = imdb_dataset_train.shuffle()
imdb_dataset_train = imdb_dataset_train.map(process_data, batched=True, remove_columns=['label'])
imdb_dataset_val = imdb_dataset['test']
imdb_dataset_val = imdb_dataset_val.shuffle()
imdb_dataset_val = imdb_dataset_val.map(process_data, batched=True, remove_columns=['label'])
train_dataset = imdb_dataset_train.map(process_data_add_mask, remove_columns=["text"], batched=True)
val_dataset = imdb_dataset_val.map(process_data_add_mask, remove_columns=["text"], batched=True)
strs = " "
model = GPTNeoXForCausalLM.from_pretrained("stabilityai/stablelm-base-alpha-3b")
absolute path required for deepspeed config
you can use the JSON above to create your own config
z_optimiser = '/two-tb/train_GPTNX/zeromq_config/stablelm-base-alpha-3b_config.json'
data_collator = DataCollatorWithPadding(tokenizer=tokenizer,
return_tensors="pt")
training_args_v2 = TrainingArguments(
output_dir="./trained_model",
learning_rate=2e-5,
save_total_limit=2,
fp16=True,
per_device_train_batch_size=1,
per_device_eval_batch_size=12,
evaluation_strategy="epoch",
deepspeed=z_optimiser,
num_train_epochs=1
)
Set up the trainer
trainer = CustomTrainer(
model=model,
args=training_args_v2,
train_dataset=train_dataset,
eval_dataset=val_dataset,
data_collator=data_collator,
tokenizer=tokenizer,
)
trainer.train()
trainer.save_model()
`

Are you able to train 7B using dual RTX3090s? Do you think you could setup a notebook on Colab? Thank you!!!!!!

Yes I can, the script provided does it all, If you wish to train on collab then a single 24GB RAM GPU would be required.

i'm using V100 on aws. 2 GPU 8 CPU 96GB Ram, and its failing on oom.
and idea why?

Send me the output you are getting on  python consiole
On Fri, May 19, 2023 at 4:15 AM snirbenyosef @.***>
wrote:

i'm using V100 on aws. 2 GPU 8 CPU 96GB Ram, and its failing on oom.
and idea why?
—
Reply to this email directly, view it on GitHub
https://github.com/Stability-AI/StableLM/issues/72#issuecomment-1553438776,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJA2ECORXIUDFMIZGOEUWMTXGZRLPANCNFSM6AAAAAAXT2ZR7E
.
You are receiving this because you authored the thread.Message ID:
@.***>

--
Kind Regards
Aamir Mirza

Send me the output you are getting on python consiole
…
On Fri, May 19, 2023 at 4:15 AM snirbenyosef @.> wrote: i'm using V100 on aws. 2 GPU 8 CPU 96GB Ram, and its failing on oom. and idea why? — Reply to this email directly, view it on GitHub <#72 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJA2ECORXIUDFMIZGOEUWMTXGZRLPANCNFSM6AAAAAAXT2ZR7E . You are receiving this because you authored the thread.Message ID: @.>
-- Kind Regards Aamir Mirza

You're using a GPTNeoXTokenizerFast tokenizer. Please note that with a fast tokenizer, using the __call__ method is faster than using a method to encode the text followed by a call to the pad method to get a padded encoding.
Traceback (most recent call last):
File "train_gptNX_3B_v3.py", line 163, in
trainer.train()
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py", line 1664, in train
return inner_training_loop(
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py", line 1940, in _inner_training_loop
tr_loss_step = self.training_step(model, inputs)
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py", line 2751, in training_step
loss = self.deepspeed.backward(loss)
File "/opt/conda/lib/python3.8/site-packages/deepspeed/utils/nvtx.py", line 15, in wrapped_fn
ret_val = func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/deepspeed/runtime/engine.py", line 1851, in backward
self.optimizer.backward(loss, retain_graph=retain_graph)
File "/opt/conda/lib/python3.8/site-packages/deepspeed/runtime/zero/stage_1_and_2.py", line 1884, in backward
buf_0 = torch.empty(int(self.reduce_bucket_size),
RuntimeError: CUDA out of memory. Tried to allocate 764.00 MiB (GPU 0; 15.77 GiB total capacity; 15.23 GiB already allocated; 54.88 MiB free; 15.25 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
0%|                                                                                | 0/1248 [00:00<?, ?it/s]
[2023-05-20 08:50:35,224] [INFO] [launch.py:428:sigkill_handler] Killing subprocess 1348
[2023-05-20 08:50:35,718] [INFO] [launch.py:428:sigkill_handler] Killing subprocess 1349
[2023-05-20 08:50:35,719] [ERROR] [launch.py:434:sigkill_handler] ['/opt/conda/bin/python3.8', '-u', 'train_gptNX_3B_v3.py', '--local_rank=1', '--num_gpus=2'] exits with return code = 1
@aamir-gmail
what am i doing wrong?
i got 2 GPUS, 8 CPU, 96GB Ram.

Did you follow the instructions, I can see that you are using Python 3.8,
(instead of 3.9)  did you build deep speed from sources, with CPU Adam
optimizer support,
reduce your batch size to 1 and try from there, Follow the instruction like
mentioned and then come back to me.
On Sat, May 20, 2023 at 6:51 PM snirbenyosef @.***>
wrote:

Send me the output you are getting on python consiole
… <#m_8640391334241798899_>
On Fri, May 19, 2023 at 4:15 AM snirbenyosef @.> wrote: i'm using V100
on aws. 2 GPU 8 CPU 96GB Ram, and its failing on oom. and idea why? — Reply
to this email directly, view it on GitHub <#72 (comment)
https://github.com/Stability-AI/StableLM/issues/72#issuecomment-1553438776>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJA2ECORXIUDFMIZGOEUWMTXGZRLPANCNFSM6AAAAAAXT2ZR7E
https://github.com/notifications/unsubscribe-auth/AJA2ECORXIUDFMIZGOEUWMTXGZRLPANCNFSM6AAAAAAXT2ZR7E
. You are receiving this because you authored the thread.Message ID: @.>
-- Kind Regards Aamir Mirza
You're using a GPTNeoXTokenizerFast tokenizer. Please note that with a
fast tokenizer, using the call method is faster than using a method
to encode the text followed by a call to the pad method to get a padded
encoding.
Traceback (most recent call last):
File "train_gptNX_3B_v3.py", line 163, in
trainer.train()
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py",
line 1664, in train
return inner_training_loop(
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py",
line 1940, in _inner_training_loop
tr_loss_step = self.training_step(model, inputs)
File "/opt/conda/lib/python3.8/site-packages/transformers/trainer.py",
line 2751, in training_step
loss = self.deepspeed.backward(loss)
File "/opt/conda/lib/python3.8/site-packages/deepspeed/utils/nvtx.py",
line 15, in wrapped_fn
ret_val = func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/deepspeed/runtime/engine.py",
line 1851, in backward
self.optimizer.backward(loss, retain_graph=retain_graph)
File
"/opt/conda/lib/python3.8/site-packages/deepspeed/runtime/zero/stage_1_and_2.py",
line 1884, in backward
buf_0 = torch.empty(int(self.reduce_bucket_size),
RuntimeError: CUDA out of memory. Tried to allocate 764.00 MiB (GPU 0;
15.77 GiB total capacity; 15.23 GiB already allocated; 54.88 MiB free;
15.25 GiB reserved in total by PyTorch) If reserved memory is >> allocated
memory try setting max_split_size_mb to avoid fragmentation. See
documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
0%| | 0/1248 [00:00<?, ?it/s]
[2023-05-20 08:50:35,224] [INFO] [launch.py:428:sigkill_handler] Killing
subprocess 1348
[2023-05-20 08:50:35,718] [INFO] [launch.py:428:sigkill_handler] Killing
subprocess 1349
[2023-05-20 08:50:35,719] [ERROR] [launch.py:434:sigkill_handler]
['/opt/conda/bin/python3.8', '-u', 'train_gptNX_3B_v3.py',
'--local_rank=1', '--num_gpus=2'] exits with return code = 1
@aamir-gmail https://github.com/aamir-gmail
what am i doing wrong?
i got 2 GPUS, 8 CPU, 96GB Ram.
—
Reply to this email directly, view it on GitHub
https://github.com/Stability-AI/StableLM/issues/72#issuecomment-1555865958,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJA2ECLWITM7YBNQS3GIWSTXHCA2TANCNFSM6AAAAAAXT2ZR7E
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Kind Regards
Aamir Mirza


Website doesn't show info.

Hello! I thought bStats is a cool service and that I should try that too. I did.
My plugin sent data bu the website doesn't show it. (https://bstats.org/plugin/bukkit/ChatColorz)
That's the log:
[10:13:58 INFO]: [ChatColorz] Sending data to bStats: {"onlineMode":0,"bukkitVersion":"git-Spigot-dcd1643-e60fc34 (MC: 1.12.2)","serverUUID":"2290cb74-e38a-49a4-b946-23abd9150d29","osVersion":"4.18.0-15-generic","playerAmount":1,"javaVersion":"10.0.2","plugins":[{"pluginVersion":"1.0","pluginName":"ChatColorz","customCharts":[]}],"osArch":"amd64","osName":"Linux","coreCount":4} [10:13:58 INFO]: [ChatColorz] Sent data to bStats and received response: {"status":"OK"}

Data is only shown for online servers and since you have shut down your test server, there is no data to display.

Past data does exist.
Like @DoNotSpamPls said: When you shutdown your server, the server will no longer be counted on bStats (with a ~30 minute delay).


📖 Finish doc updates wrt E2E test on OCP

Summary
This PR makes two updates to documentation, which should have been done in #2137.

Update test/e2e/multi-cluster-deployment/README.md on how to invoke the test.
Update docs/content/direct/release.md, removing updates to the self-references removed here.

Related issue(s)
Fixes #

/cc @dumb0002
/cc @ezrasilvera

/lgtm

/approve


driver._send_packet can be called from two different threads at the same time

As far as I can see, it can only happen during shutdown, but I saw this happen several times in the tests.  I can work around this in the tests but we should rectify this as it's a real race condition.
First stack trace - being called for each frame from the layout update thread.
  File "/development/BiblioPixel/bibliopixel/util/threads/animation_threading.py", line 35, in target
    self.run()
  File "/development/BiblioPixel/bibliopixel/animation/animation.py", line 104, in run_all_frames
    for i in self.generate_frames():
  File "/development/BiblioPixel/bibliopixel/animation/animation.py", line 110, in generate_frames
    self._run_one_frame()
  File "/development/BiblioPixel/bibliopixel/animation/animation.py", line 137, in _run_one_frame
    self.layout.push_to_driver()
  File "/development/BiblioPixel/bibliopixel/layout/layout.py", line 168, in push_to_driver
    self.threading.push_to_driver()
  File "/development/BiblioPixel/bibliopixel/util/threads/update_threading.py", line 93, in push_to_driver
    self.update_colors()
  File "/development/BiblioPixel/bibliopixel/util/threads/update_threading.py", line 83, in update_colors
    d.update_colors()
  File "/development/BiblioPixel/bibliopixel/drivers/driver_base.py", line 167, in update_colors
    self._send_packet()

Second stack trace: during shutdown
  File "/development/BiblioPixel/test/bibliopixel/control/artnet_test.py", line 31, in test_artnet_integration
    project.run()
  File "/development/BiblioPixel/bibliopixel/project/project.py", line 100, in run
    self.cleanup()
  File "/development/BiblioPixel/bibliopixel/project/project.py", line 85, in cleanup
    self.animation.cleanup()
  File "/development/BiblioPixel/bibliopixel/animation/animation.py", line 81, in cleanup
    self.layout.cleanup()
  File "/development/BiblioPixel/bibliopixel/layout/layout.py", line 93, in cleanup
    self.push_to_driver()
  File "/development/BiblioPixel/bibliopixel/layout/layout.py", line 168, in push_to_driver
    self.threading.push_to_driver()
  File "/development/BiblioPixel/bibliopixel/util/threads/update_threading.py", line 93, in push_to_driver
    self.update_colors()
  File "/development/BiblioPixel/bibliopixel/util/threads/update_threading.py", line 83, in update_colors
    d.update_colors()
  File "/development/BiblioPixel/bibliopixel/drivers/driver_base.py", line 167, in update_colors
    self._send_packet()

Moved this to 4.x because I'm the only one who has complained about this.


Also return null if the string is empty

This fixes an issue where the input being empty causes the time component to have an 'empty' model instead of null

Pair reviewed.  :shipit:


source tars

The downloads on http://rg3.github.io/youtube-dl/download.html don't contain source downloads. Only mixed downloads. I'd like to see a source only file on the downloads page.
Anyone downloading the source doesn't need the binary anyway, so no point in including it, but here are one million 4 hundred thirty one thousand and four hundred reasons for a source only download:
# wget -nv https://yt-dl.org/downloads/2017.06.12/youtube-dl-2017.06.12.tar.gz && gzip -cd youtube-dl-2017.06.12.tar.gz | tar x && rm youtube-dl/youtube-dl && tar c youtube-dl | gzip -c6 > youtube-dl-2017.06.12.src.tar.gz && gzip -cd youtube-dl-2017.06.12.tar.gz | gzip -c6 >youtube-dl-2017.06.12.bin.tar.gz && ls -l
2017-06-16 09:47:00 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/1039520/495761be-4f16-11e7-8c38-4efeffc58f2e?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170616%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170616T074646Z&X-Amz-Expires=300&X-Amz-Signature=ba4d32fba3cc651495ba85ad1fe9a621a6f2b8d1440ad39640d5bc2fb6a6166a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dyoutube-dl-2017.06.12.tar.gz&response-content-type=application%2Foctet-stream [2727978/2727978] -> "youtube-dl-2017.06.12.tar.gz.1" [1]
insgesamt 9272
drwxr-xr-x 7 root root    2048 16. Jun 09:47 youtube-dl
-rw-r--r-- 1 root root 2727978 16. Jun 09:47 youtube-dl-2017.06.12.bin.tar.gz
-rw-r--r-- 1 root root 1296578 16. Jun 09:47 youtube-dl-2017.06.12.src.tar.gz
-rw-r--r-- 1 root root 2727978 11. Jun 21:24 youtube-dl-2017.06.12.tar.gz

Oh, and a tip: lzma is much better (and widely used by now), and -9 also:
 # gzip -cd youtube-dl-2017.06.12.src.tar.gz | lzma -c9 >youtube-dl-2017.06.12.src.tar.lzma
-rw-r--r-- 1 root root  902691 16. Jun 09:47 youtube-dl-2017.06.12.src.tar.lzma

Download it from github https://github.com/rg3/youtube-dl/archive/master.tar. gz

Ok. How do I get version 2017.06.12 from there?

Ok. How do I get version 2017.06.12 from there?

https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz
For lzma - I think a 1.2MB tarball is not a problem for machines used to download videos and audios :) Of course pull requests are welcome.

To download specific version download using a specific  commit https://github.com/rg3/youtube-dl/archive/cb1e6d898532e86b0752117337b7519d22c63274.tar.gz (in this case i used the commit when 2017.06.12 was released)

Ok, thank you very much.
About the "pull requests are welcome" part: I investigated the Makefile but only found the code to generate https://yt-dl.org/downloads/2017.06.12/youtube-dl-2017.06.12.tar.gz. How is the other file https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz generated?
Also, the exclude list of that make target names "__pycache" but the directories are called "pycache" (maybe they were called "__pycache" in the past?). So the archive ends up with 5 (luckily empty) directories:
# find -name __pycache__ -exec ls -lA {} +
./youtube-dl/test/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/downloader/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/extractor/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/postprocessor/__pycache__:
insgesamt 0

./youtube-dl/youtube_dl/__pycache__:
insgesamt 0

And about the "1.2 MB is not much" thing. Please remember, stuff adds up:
# du -sh /var/cache/portage/distfiles
60G     /var/cache/portage/distfiles

So, if all packages there could be shrunk by 50%, you can calculate for yourself how many more videos I could download. Also, there are people, who only download videos temporarily to not needing to watch them in browser.

FYI: https://bugs.gentoo.org/show_bug.cgi?id=621958

How is the other file https://github.com/rg3/youtube-dl/archive/2017.06.12.tar.gz generated?

It's automatically created by Github.
To create xz tarballs for each release, I guess the possible way is: Add a new target in Makefile and modify devscripts/release.sh

Also, the exclude list of that make target names __pycache but the directories are called __pycache__

That's a real bug! Thanks for finding this; I've fixed it in 4f90d2aea

And about the "1.2 MB is not much" thing. Please remember, stuff adds up:

I bet 60G contains something other than youtube-dl tarballs. There are < 1000 releases since 2008, so the total won't be more than 3G :)


[Feature request] Better experience for multi files by splitting editor or tearable tags

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When you open multi files and try to compare them, it seems I must open two windows. That is inconvenient for an editor with support of tags.
多文件只能打开多个窗口去并列比较，略麻烦，多标签页等于说只能一次看一个标签
Describe the solution you'd like
A clear and concise description of what you want to happen.
It will be better if I can drag down a tag to start a new window just like Edge, or I can split the editor (horizontally or vertically) like VSCode. It will be even better to support diff, but this may be conflict with your purpose to make this editor simple.
要么可以跟浏览器一样拆一个tab下来变成新窗口，这样就可以直接并列两个窗口
要么就跟VSCode一样支持拆分，就跟写markdown的时候preview一样布局
要是能支持VSCode那种diff也好，但是可能就没那么简洁了，权当建议
Additional context
Add any other context or screenshots about the feature request here.

你新建一个空的标签，然后拖动这个空的标签出去可以直接打开一个新的notepads 窗口，然后你可以把第一个窗口里面的任何文件直接拖动过去

你新建一个空的标签，然后拖动这个空的标签出去可以直接打开一个新的notepads 窗口，然后你可以把第一个窗口里面的任何文件直接拖动过去


CipherText not serializable?

Hi, I was trying to transmit a ipcl::CipherText object between 2 servers but found that it does not seem to be serializable. It would be nice to add a serialization interface for ipcl::CipherText since both the public key and cipher text will get transmitted in many HE based applications. Thanks.

Hi @PTRFmX
Thank you very much for the suggestion. Serialization and deserialization support for PlainText and CipherText has been added in PR #75, and the PR is merged into development branch. Please update your code and have a try.

Thanks for the update!


hi i am not able to implement oauth2

**i am using oauth2 from discord **
When I try it with the admin, it redirects me to the admin page. However, when I use it for the storefront, it gets stuck on this page for hours

this is my plugin file
` {
    resolve: "medusa-plugin-auth",
    /** @type {import('medusa-plugin-auth').AuthOptions} */
    options: [
      {
        type: "oauth2",
        strict: "store",
        identifier: "oauth2",
        authorizationURL: OAuth2AuthorizationURL,
        tokenURL: OAuth2TokenURL,
        clientID: OAuth2ClientId,
        clientSecret: OAuth2ClientSecret,
        scope: OAuth2Scope.split(","),
        store: {
          callbackUrl: `${BACKEND_URL}/store/auth/oauth2/cb`,
          failureRedirect: `${STORE_URL}/login`,
          successRedirect: `${STORE_URL}/`,
        },
      },
    ],
  },
`

and this is env
const BACKEND_URL = process.env.BACKEND_URL || "http://localhost:9000";
const ADMIN_URL = process.env.ADMIN_URL || "http://localhost:7001";
const STORE_URL = process.env.STORE_URL || "http://localhost:3000";

const OAuth2AuthorizationURL =process.env.OAUTH2_AUTHORIZATION_URL ||"https://discord.com/api/oauth2/authorize";
const OAuth2TokenURL =process.env.OAUTH2_TOKEN_URL || "https://discord.com/api/oauth2/token";
const OAuth2ClientId = process.env.OAUTH2_CLIENT_ID || "";
const OAuth2ClientSecret =process.env.OAUTH2_CLIENT_SECRET || "";
const OAuth2Scope = process.env.OAUTH2_SCOPE || "identify,email,guilds";

and in storefront
     <a
        type="button"
        href={`${process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL}/store/auth/oauth2/`}
        className="text-white bg-[#4285F4] hover:bg-[#4285F4]/90 focus:ring-4 focus:outline-none focus:ring-[#4285F4]/50 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-[#4285F4]/55 mr-2 mb-2"
      >
        Login with Discord
      </a>

HERE ARE MORE IMAGES FOR CONTEXT

Could you provide your logs please? alos, one thought, depending what discord provides you with you might need to implement the parseProfile function in your config to return something the plugin can consume

**IT IS THERE FOR LIFETIME **

Have you looked at what i ve answered you please? Also, i am talking about the server logs not the client... plus, this type of message with all uppercase is not very welcome here please be respectful


Chip sizing and overflow differs between browsers

The default chip sizing and label overflow differs slightly between Firefox and Chrome. In Chrome there seems to be a right-most padding and the label cuts off into ellipses at some point. These characteristics are absent in Firefox.
Firefox:

Chrome:

Code:

    <paper-chip>

Short

    </paper-chip>
    <paper-chip>

Slightly Longer

    </paper-chip>

Chrome 59.0.3071.115 (Official Build) (64-bit)
Firefox 54.0 (64-bit)
On Fedora Linux

Hi @mbierlee thanks for your notice,
the css selector :host(*:not([removable])) #label ::slotted([slot="label"]) doesn't work on Firefox.
The issue seem solved if I use :host(:not([removable])) #label ::slotted([slot="label"]) selector.
A patch coming soon.


syslog-forwarder continue after logrotate

logrotate configured by this image has delaycompress and daily on /var/log/syslog. Which means, that upon logrotate, /var/log/syslog is renamed to syslog.1 (this is the file being tailed by forwarder). New /var/log/syslog is forwarded no more. (dramatic music)

Agreed. tail should be called with -F instead of -f.


Update for documentation

[x] Update C# sample
[x] Add C++/CLI sample
[x] Add VB.Net sample

Closes: #60

Not sure about [lang=c] as it is C++/CLI although

Thanks!