Error building aomp "... not on branch aomp-11.5-0"

Hello,
I am trying to build aomp 11.5-0. When I execute "build_project.sh" I get:
ERROR:  The repository at /home/wilfried/git/aomp11/amd-llvm-project is not on branch aomp-11.5-0
          It is on branch (no

Executing "git branch --list" in "~/git/aomp11/amd-llvm-project" gives:
* (no branch)

"aomp-11.5-0" is a tag not a branch.

[AMD Official Use Only - Internal Distribution Only]
Make sure to first run
./clone_aomp.sh
Then the build command
Also the aomp repo needs to be on branch amd-stg-openmp
Get Outlook for iOShttps://aka.ms/o0ukef

From: Wilfried Holzke<EMAIL_ADDRESS>Sent: Saturday, May 30, 2020 10:04:14 AM
To: ROCm-Developer-Tools/aomp<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [ROCm-Developer-Tools/aomp] Error building aomp "... not on branch aomp-11.5-0" (#106)
[CAUTION: External Email]
Hello,
I am trying to build aomp 11.5-0. When I execute "build_project.sh" I get:
ERROR:  The repository at /home/wilfried/git/aomp11/amd-llvm-project is not on branch aomp-11.5-0
It is on branch (no
Executing "git branch --list" in "~/git/aomp11/amd-llvm-project" gives:

(no branch)

"aomp-11.5-0" is a tag not a branch.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FROCm-Developer-Tools%2Faomp%2Fissues%2F106&data=02|01|ron.lieberman%40amd.com|5549cfbcc59247f1350a08d804aab818|3dd8961fe4884e608e11a82d994e183d|0|0|637264478571376517&sdata=mg9dXwBap8CWjDBQ%2FKuPJCoI6obwWU6kjefvLjVJUeE%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD3EYZ7AGXXUCJGHDEOCXC3RUEN65ANCNFSM4NOXJJMQ&data=02|01|ron.lieberman%40amd.com|5549cfbcc59247f1350a08d804aab818|3dd8961fe4884e608e11a82d994e183d|0|0|637264478571376517&sdata=76gsWhMg820QBLiOrW1T%2Bf9NXaaKWLgj%2FYobVpjRhyU%3D&reserved=0.

This depends what you are trying to do. If you want our current 11.5-1 dev build then yes the AOMP repo needs to be on amd-stg-openmp.
git checkout amd-stg-openmp
git pull
./clone_aomp.sh
./build_aomp.sh

If you are trying to recreate 11.5-0 (our most recent release) from source, you will indeed have the AOMP repo set to a tag. To get past your error you can use:
AOMP_CHECK_GIT_BRANCH=0 ./build_aomp.sh continue project //this will start at project and finish the rest of the components.

or if you want to build a single component:
AOMP_CHECK_GIT_BRANCH=0 ./build_project.sh

I checked out "aomp" with tag "rel_11.5-0".
Then I executed "./clone_aomp.sh" using all default repositories and branches from "aomp_common_vars".
Followed by building step by step "roct", "rocr" and stuck at "project".
Ok, by skipping the check I can proceed.


Set up Redux to integrate game state with React

The RTK Toolkit and react-redux libraries are installed via package.json, but they're not yet configured as part of the app.
Tutorials:

https://redux.js.org/tutorials/essentials/part-1-overview-concepts
https://redux.js.org/tutorials/essentials/part-2-app-structure

Template to potentially draw from: https://github.com/reduxjs/redux-templates/tree/master/packages/vite-template-redux

Most of the setup is under src/app/ - https://github.com/reduxjs/redux-templates/tree/master/packages/vite-template-redux/src/app
I won't need the API middleware or other stuff related to async/RTK Query right now.
main.tsx will need to be modified to hook up the store to a <Provider>.

Notes:

The FAQ suggests using simple action creators, with actions that represent high-level user actions; the complexity goes in the reducers. See https://redux.js.org/faq/code-structure#how-should-i-split-my-logic-between-reducers-and-action-creators-where-should-my-business-logic-go and https://redux.js.org/faq/actions#is-there-always-a-one-to-one-mapping-between-reducers-and-actions.

More notes on using Redux:

Normalizing state in the Redux store - https://redux-toolkit.js.org/usage/usage-guide#normalizing-with-createentityadapter
Tutorial series - https://blog.isquaredsoftware.com/series/practical-redux/

Series is a few years old:

Uses older libraries like Redux-ORM - I should be able to get by with Redux Toolkit
Uses older tooling (like the way it sets up absolute imports)
Includes a fair bit of generic helper code for managing state - not sure how much that's still necessary, especially with createEntityAdapter() from Redux Toolkit

Notable nontrivial state management from that series:

Data on different tabs - switching tabs shouldn't clear data on the previous tab - https://blog.isquaredsoftware.com/2016/11/practical-redux-part-4-ui-layout-and-project-structure/#handling-tab-state-with-redux
Toggling whether an input field is editable, might be usable for some things - https://blog.isquaredsoftware.com/2017/01/practical-redux-part-6-connected-lists-forms-and-performance/#adding-edit-mode-toggles
Editing entities, keeping draft/work-in-progress values in state as well as existing values (potentially useful when creating cards?) - https://blog.isquaredsoftware.com/2017/01/practical-redux-part-8-form-draft-data-management/#managing-draft-data-for-forms
Having one action creator dispatch multiple actions (though this seems like having lower-level actions instead of actions that represent high-level events, as well as putting a bit more complexity in action creators)

https://blog.isquaredsoftware.com/2017/01/practical-redux-part-8-form-draft-data-management/#displaying-the-copied-pilot-entry
https://github.com/markerikson/project-minimek/blob/4576f5d878988a69a6a098cbb258346805b6f3ec/src/features/pilots/pilotsActions.js#L45-L47

Managing modals with Redux state (tracking whether modal(s) are displayed, displaying them, getting inputs from modals); also includes context menus  - https://blog.isquaredsoftware.com/2017/07/practical-redux-part-10-managing-modals/
Not sure if this style of managing it all through Redux is still recommended
Using React Portals - current API is https://react.dev/reference/react-dom/createPortal
Nested data - https://blog.isquaredsoftware.com/2018/01/practical-redux-part-11-nested-data-trees/

Forms:

In the tutorial series, some data from forms goes into Redux state
https://blog.isquaredsoftware.com/2017/01/practical-redux-part-7-forms-editing-reducers/#buffering-form-changes-and-dispatches - has a FormEntityWrapper that keeps most form state local and dispatches a smaller number of Redux actions
I'm not sure what form state I'd want in the Redux store, if any.
From current Redux docs - "Most form state probably shouldn't be kept in Redux. Instead, keep the data in your form components as you're editing it, and then dispatch Redux actions to update the store when the user is done."
Current Redux docs on handling basic form state (editing a post using mostly component-local state), using react-router, using custom action creator logic in RTK's createSlice() function with a prepare callback - https://redux.js.org/tutorials/essentials/part-4-using-data

For this project - don't worry too much about fancy validation logic, definitely don't bring any additional libraries in; handwrite any simple validation logic that's absolutely necessary.


Augmentation

Hello
Is there augmentation possibility? I mean first step make labeling of all objects and then make augmentation all images and no need re-label new images

augmentation is done by yolo during training. you can set the augmentation parameters beforehand

Cool. Thank you


add cron for data migrate

Ⅰ. Describe what this PR does
add cron for data migrate
design doc: https://docs.google.com/document/d/1oUYBxaTNfS8VTzAHPVKAlIxp-z_k8TZHQJvL3iDV2f0/edit#heading=h.5h3q4m8xdjv2
Ⅱ. Does this pull request fix one issue?

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

/test fluid-e2e

/test fluid-e2e

/test fluid-e2e

/retest

/lgtm


Inliner moves

I believe this is now not necessary and in fact causes problems with gmail - gmail will not see the

<style> can be in the <body>, this is allowed.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style

The


Accessing a property of an uninitialized instance results in a Runtime error

Description
The code produces a runtime error instead of a compile-time error. I would anticipate this to be an error that could be identified during compile-time.
It's worth mentioning that removing the print and having just instance.x allows the compiled binary to execute without any runtime errors (exit code 0).
Reproduction
class SomeClass {
    let x: Int = 0
}

print(instance.x)
var instance = SomeClass()

Expected behavior
I expect this to be a compile-time error
Environment
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-<IP_ADDRESS>.108 clang-15<IP_ADDRESS>)
Target: arm64-apple-macosx14.0
Additional information
No response

same issue as https://github.com/apple/swift/issues/70380 i believe

Duplicate of #70323


Fatal error - Uncaught TypeError thrown on initial start

I am new to phpDocumentor and installed v2.9.0 via "PEAR". I followed the official introduction to install phpDocumentor. Installation ended successfully but when I want to generate the documentation, I get the following error:

Load cache                                                         ..    2.205s
Preparing template "clean"                                         ..    0.174s
Preparing 17 transformations                                       ..    0.000s
Build "elements" index                                             ..    0.024s
Replace textual FQCNs with object aliases                          ..    0.136s
Resolve @link and @see tags in descriptions                        ..    0.013s
Enriches inline example tags with their sources                    ..    0.013s
Build "packages" index                                             ..    0.061s
Build "namespaces" index and add namespaces to "elements"          ..    0.002s
Collect all markers embedded in tags                               ..    0.003s
Transform analyzed project into artifacts                          ..
Applying 17 transformations
Initialize writer "phpDocumentor\Plugin\Core\Transformer\Writer\FileIo"
Initialize writer "phpDocumentor\Plugin\Twig\Writer\Twig"
Initialize writer "phpDocumentor\Plugin\Graphs\Writer\Graph"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "twig"
[2017-06-13 14:32:06] phpDocumentor.ALERT: Fatal Error (E_ERROR): Uncaught TypeError: Argument 1 passed to Monolog\ErrorHandler::handleException() must be an instance of Exception, instance of Error given in H:\UwAmp\bin\php\pear\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHandler.php:122 Stack trace: #0 [internal function]: Monolog\ErrorHandler->handleException(Object(Error)) #1 {main}   thrown {"file":"H:\UwAmp\bin\php\pear\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHandler.php","line":122} []
[.. LOADS OF LINES OF HTML ...]
Fatal error: Uncaught TypeError: Argument 1 passed to Monolog\ErrorHandler::handleException() must be an instance of Exception, instance of Error given in H:\UwAmp\bin\php\pear\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHandler.php:122
Stack trace:
#0 [internal function]: Monolog\ErrorHandler->handleException(Object(Error))
#1 {main}
thrown in H:\UwAmp\bin\php\pear\pear\phpDocumentor\vendor\monolog\monolog\src\Monolog\ErrorHandler.php on line 122

The error appears when the final generation starts and all the HTML-stuff is shown on the cmd.
I used this command to initialize:

phpdoc -d H:\UwAmp\www\ -t H:\UwAmp\www\Documentation

Please let me know what else I can provide in order to help you on tracking this issue.

I am getting what seems to be exactly the same error on a new PEAR install of phpDocumentor 2.9.0
The environment is IIS 8.5 on Windows server 2012 r2 running PHP 7.0.19

Can you try the installation via the phar file? And report back if you have any issues with that as well.

Thank you, it works with the phar file installation.

@mvriel think we need to repack the pear build. There was some Dependency mismatch in the past.

Just ran into the same issue (PHP 7.1.10, Arch Linux) and I was about to look for a different library until I came across this.
Running the .phar file works for me.
Perhaps mention this in the documentation, even if it's only a temporary issue, since most users will follow the recommended install via Pear.

Same issue here – when do you think a fixed version will be available via pear?

PHP 7.0.30-0+deb9u1 (cli) (built: Jun 14 2018 13:50:25) ( NTS )
Linux DESKTOP-4UOV9JE 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 GNU/Linux (debian)
Applying 17 transformations
Initialize writer "phpDocumentor\Plugin\Core\Transformer\Writer\FileIo"
Initialize writer "phpDocumentor\Plugin\Twig\Writer\Twig"
Initialize writer "phpDocumentor\Plugin\Graphs\Writer\Graph"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "FileIo"
Execute transformation using writer "twig"
PHP Notice:  Array to string conversion in /usr/share/php/phpDocumentor/vendor/erusev/parsedown/Parsedown.php on line 894
PHP Notice:  Undefined property: Parsedown::$Array in /usr/share/php/phpDocumentor/vendor/erusev/parsedown/Parsedown.php on line 894
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Monolog\ErrorHandler::handleException() must be an instance of Exception, instance of Error given in /usr/share/php/phpDocumentor/vendor/monolog/monolog/src/Monolog/ErrorHandler.php:122
Stack trace:
#0 [internal function]: Monolog\ErrorHandler->handleException(Object(Error))
#1 {main}
thrown in /usr/share/php/phpDocumentor/vendor/monolog/monolog/src/Monolog/ErrorHandler.php on line 122
[2018-07-29 08:04:20] phpDocumentor.ALERT: Fatal Error (E_ERROR): Uncaught TypeError: Argument 1 passed to Monolog\ErrorHandler::handleException() must be an instance of Exception, instance of Error given in /usr/share/php/phpDocumentor/vendor/monolog/monolog/src/Monolog/ErrorHandler.php:122 Stack trace: #0 [internal function]: Monolog\ErrorHandler->handleException(Object(Error)) #1 {main}   thrown {"file":"/usr/share/php/phpDocumentor/vendor/monolog/monolog/src/Monolog/ErrorHandler.php","line":122} []

Closing this, as we dropped support for phpDocumentor v2.


Publish logs readme to docs/VictoriaLogs folder in Main Issue

Please add automation and publish the docs to site
Update VictoriaLogs docs and mention datasource there

@tenmozes I suppose it is related to https://github.com/VictoriaMetrics/victorialogs-datasource/pull/39 ?

@hagen1778 Yes, exactly. We can close this one as it was alredy merged

Docs are now automatically synced to https://docs.victoriametrics.com/victorialogs/victorialogs-datasource/index.html
See https://github.com/VictoriaMetrics/victorialogs-datasource/pull/39 for details


[BUG] Service Bus: Memory leak if session based consumer is closed and (re)started

Describe the bug
There is a memory leak is a session-based processor client is closed and then restarted.
Closing and restarting the processor client was done in an attempt to work around #18122. Closing and restarting does cause the SDK to pull the messages from the active sessions; however, this leak is causing the application to OutOfMemory.
Stopping I.e. stop() and restarting the client does not work as it does not retrieve the latest messages from a session as per #18122 so Closing is the only option whilst #18122 exists.
To Reproduce
Steps to reproduce the behavior:

Create a session based processor, call start.
After some time, call close().
Call start on the processor.
Goto 2.

E.g. see code snippet.
Code Snippet
ScheduledExecutorService es = Executors.newSingleThreadScheduledExecutor();
es.scheduleAtFixedRate(() -> {
    try {
        System.out.println("Restarting client");
        if (processorClient != null) {
            processorClient.close();
        } else {
            processorClient = buildClient();
        }
        processorClient.start();
    } catch (Throwable t) {
        t.printStackTrace();
    }
}, 1, 30, TimeUnit.SECONDS);

private ServiceBusProcessorClient buildClient() {
        return new ServiceBusClientBuilder()
                .connectionString("<< connection string >>")
                .sessionProcessor()
                .queueName("<< queue >>")
                .maxConcurrentSessions(10)
                .processMessage(this::processMessage)
                .processError(this::processError)
                .buildProcessorClient();
    }

Expected behavior
No memory leak.
Setup (please complete the following information):

OS: MacOS
IDE : Netbeans
Version of the Library used: 7.0.0

@alewis001 We have released new version of library which has fix for #18122 ,  You can download it from here https://search.maven.org/artifact/com.azure/azure-messaging-servicebus
Can you try and let us know if you still see any issue ?

@alewis001 We have released new version of library which has fix for #18122 ,  You can download it from here https://search.maven.org/artifact/com.azure/azure-messaging-servicebus
Can you try and let us know if you still see any issue ?

Thanks @hemanttanwar, I'll give it a try ASAP and let you know.

Thanks @hemanttanwar, I'll give it a try ASAP and let you know.

Hi @hemanttanwar, #18122 is fixed at least in my testing. Thank you again.
This specific issue about a memory leak when restarting the client is still present in 7.0.1; however, I can see how you may consider that lower priority as it's maybe an unusual thing to do to keep restarting the client every 30s. The important one for us was #18122 and that has been resolved now so we no longer need to do the restart loop.
Thanks again and pass my thanks on to the team.

Hi @hemanttanwar, #18122 is fixed at least in my testing. Thank you again.
This specific issue about a memory leak when restarting the client is still present in 7.0.1; however, I can see how you may consider that lower priority as it's maybe an unusual thing to do to keep restarting the client every 30s. The important one for us was #18122 and that has been resolved now so we no longer need to do the restart loop.
Thanks again and pass my thanks on to the team.

@alewis001 I appreciate you working with our library.
Also If you feel like you can contribute to our library in terms of documentation, fixes etc Contributing guide .
I will close this ticket now.

@alewis001 I appreciate you working with our library.
Also If you feel like you can contribute to our library in terms of documentation, fixes etc Contributing guide .
I will close this ticket now.


Add Device exposure as an entry option

Is there a way to query the device domain in the same way we query observations or procedures?

I have not added it yet...will add on the next release! Thanks @albertpratsu


masonry: More efficient set of PointerButtons.

This brings code over from glazier for a set of PointerButtons that just uses a single value and bit flags rather than a HashSet.

This is done now, I think ... I didn't add tests, but probably will in the future. But right now, this code is barely even used! (But definitely should be used more.)


Fixed logical error in readPiData function.

Main Changes
There was a logical mistake in readPiData function in radio.cpp. The error got fixed.
The for loop was supposed to be
for (int i = 0; i < NUM_RADIO_CHANNELS && allDataFromPi != ""; i++, data_count++)
instead of
for (int i = 0; i < NUM_RADIO_CHANNELS || allDataFromPi != ""; i++, data_count++)

This code is tested just now.

Chandra, thanks for fixing this. I'm just wondering about the thread that prints out the output of ESP. I guess the idea is that if we want to deactivate the printing (e.g., when flying) we need to do so on the ESP; is that right?

Yes, professor. The Pi just checks if data is available via serial.


Possible bug in to_hstring()

If you pass an unsigned value without a leading 0x into this function, it will print alpha characters that exceed the letter F.
Try running this in your kernel:
newRenderer.Print( to_hstring((uint64_t)375896) );

On my running instance, this will print:
000000000005LM58

Which is clearly not a decimal nor hexadecimal value.
You might want to consider allowing this function to by default accept 0x***** and perform it normally, and to also accept a regular unsigned decimal value, but when it does, convert that decimal value into a hex value first.
Here's a link to compiler explorer, and this is producing the same output that I'm seeing printed when running my kernel: https://godbolt.org/z/ef1qrE

Okay, for those coming to this github repo, the actual posted code on this github is correct, there is no bug within the to_hstring() function. However, within the YouTube video when you come across it for the first time, there is a bug in the code.
Within the ternary expression, he is comparing ( tmp > 9 ? 'A' : '0' ); and this will give the wrong result if you pass a regular decimal value to it without a preceding 0x in the value. In the source code on for this repository, he does have the correct implementation. He does have: ( tmp > 9 ? 55 : '0' );  which does produce the correct output.


Fix carousel in iOS with react-native 0.28

Do you know if this issue was also present on Android?

I test carousel with android and ios, only in 0.28 ios version fail (carousel is locked)

Thanks, good to know! I'll also check it out tomorrow!
I actually did read that there were some breaking layout changes in 0.28 that weren't in the release notes, so this could be the reason why! Some code could be replying on these bugs to work!


Expense - Reply in thread option is missing for system message after rejoining thread

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

Version Number: v9.0.19-0
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : https://github.com/Expensify/App/pull/46640
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:

Go to staging.new.expensify.com
Go to workspace chat.
Submit an expense.
Go to transaction thread.
Edit any field and save it.
Right click on system message > Reply in thread.
Click on the report header > Leave.
Right click on system message > Join thread.
Right click on system message again.

Expected Result:
The system message will have Reply in thread option after rejoining thread.
Actual Result:
Reply in thread option is missing for system message after rejoining thread.
Workaround:
Unknown
Platforms:

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

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

Screenshots/Videos
https://github.com/user-attachments/assets/60cd22b4-d3b7-4ff0-9447-c0639fd22cf4

View all open jobs on GitHub

We think this issue might be related to the #collect project.

Production
https://github.com/user-attachments/assets/9728a16e-4d69-4a31-9e58-28709fc10169

This comes from my PR. Opened up a new PR to fix this.

@bernhardoj @mkhutornyi any update here? Looks like https://github.com/Expensify/App/pull/47234 was started to fix this bug, but @mkhutornyi thinks there might be some other bug, right? What's next?

@Beamanator I think @mkhutornyi just asking for confirmation, which I replied on the PR.

ahaa ok great! Looks like y'all are moving this along, thanks! 🙏

Working well in staging!

Just clarifying @bernhardoj @Beamanator - was there a regression here or is full payment due for the PR?

This issue was discovered after my PR, but the issue actually existed before, so I'm not sure if a payment is eligible here. It would be nice if there is though 😄
cc: @Beamanator @mkhutornyi

Double checking on this one internally before moving forward with payments.

@mkhutornyi and @bernhardoj we're discussing the regression internally, I commented

I think this falls into here in the C+ doc

If regressions are found that “should have”* been caught after the PR has been approved,

and

*“Should have” = C+ should have caught the bug by fully following the checklist.  If C+ skips a step or completed the checklist incompletely, payment will be cut in half. Exceptions can be made by the assigned internal engineer for large PRs that introduce new functionality.

and @Beamanator commented

Yeah that sounds like it to me too - I'm pretty sure in the checklist we have some points about testing any changes to a component everywhere that that component is used - which soundsssssss like is what they admitted to missing

@mkhutornyi @bernhardoj do you agree the regression was caused because something was missed that you should have caught?

I don't think it's easy to catch since the issue only happens in a one-expense report, while we are testing on a transaction thread level. The issue is also happening in prod, but on a normal message, not on a system message since we are not able to reply in thread a system message before.

Thanks for the discussion! We've decided to pay as normal.
Payment Summary:

Contributor: $250 @bernhardoj (Please request in NewDot)
Reviewer: $250 @mkhutornyi (To be paid in Upwork)

Thanks! Requested in ND.

$250 approved for @bernhardoj


Add docker image to the repo

I think it makes sense to have the Dockerfile
in the repository itself.
Resolves #739
resolves #
docs dbt-labs/docs.getdbt.com/#

Problem

Solution

Checklist

[ ] I have read the contributing guide and understand what's expected of me
[ ] I have run this code in development and it appears to resolve the stated issue
[ ] This PR includes tests, or tests are not required/relevant for this PR
[ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

cc @JCZuurmond

cc @emmyoop Sorry for the long wait!


Bug fix 3.7/cursor write indexed results

Scope & Purpose
This PR changes (for VelocyPack based protocols) the result field of cursors to an indexed array in all cases. The Java driver (as of v6.9.0) accesses those entries with linear runtime each, resulting in degraded performance as reported in #13476. The Java driver will be fixed in an upcoming version, too: https://github.com/arangodb/arangodb-java-driver/commit/5c8324aa5d62f5e468e8b0e2dd0fe8c60e243172
This change won't make it into 3.8; instead, this is only a temporary workaround for older versions of the Java driver.
devel/3.8 PR, which does the opposite of this: https://github.com/arangodb/arangodb/pull/13620

[X] :hankey: Bugfix (requires CHANGELOG entry)
[ ] :pizza: New feature (requires CHANGELOG entry, feature documentation and release notes)
[ ] :fire: Performance improvement
[ ] :hammer: Refactoring/simplification
[ ] :book: CHANGELOG entry made

Backports:

[ ] No backports required
[ ] Backports required for: (Please specify versions and link PRs)

Related Information

[ ] Docs PR:
[ ] Enterprise PR:
[X] GitHub issue: #13476
[ ] Design document:

Testing & Verification

[ ] This change is a trivial rework / code cleanup without any test coverage.
[ ] The behavior in this PR was manually tested
[ ] This change is already covered by existing tests, such as (please describe tests).
[X] This PR adds tests that were used to verify all changes:

[X] Added new C++ Unit tests
[ ] Added new integration tests (e.g. in shell_server / shell_server_aql)
[ ] Added new resilience tests (only if the feature is impacted by failovers)

[ ] There are tests in an external testing repository:
[ ] I ensured this code runs with ASan / TSan or other static verification tools

http://<IP_ADDRESS>:8080/view/PR/job/arangodb-matrix-pr/14184/


[stable/stackdriver-exporter] Feature apiVersion compatibility switch

What this PR does / why we need it:

Add apiVersion compatibility switch for deployment
Bump nginx-ingress chart version

Ran into some issues using this chart when slowing moving K8S clusters from version 1.15 to 1.16.
Didn't hit the same issues with the nginx-ingress chart, so used the same solution for this chart.
Based on the work in stable/nginx-ingress
ref: https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16
ref: https://github.com/helm/charts/commit/1a2989849c9a115d43ed28842472e9e214ccccf8
Special notes for your reviewer:
@apenney
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

Signed-off-by: Daniel Lawrence<EMAIL_ADDRESS>

/ok-to-test

/assign @apenney

/assign @sameersbn


New version: CloudWatchLogs v1.2.0

Registering package: CloudWatchLogs
Repository: https://github.com/invenia/CloudWatchLogs.jl
Created by: @mjram0s
Version: v1.2.0
Commit: cc4d777191e5cb82ffe0fe9146dde00836f45b58
Reviewed by: @mjram0s
Reference: https://github.com/invenia/CloudWatchLogs.jl/commit/cc4d777191e5cb82ffe0fe9146dde00836f45b58#commitcomment-38563117

One job failed due to a timeout. Can this pls be manually merged?
curl: (22) The requested URL returned error: 504 Gateway Time-out
ERROR: LoadError: LoadError: InitError: Unable to automatically install 'Gettext' from '/home/travis/.julia/packages/Gettext_jll/iBSFh/Artifacts.toml'


gui: project settings

This is meant to capture the requirements of having projects settings in the GUI module, it is based on the discussion of #524.
Currently, the GUI opens a single API at a time, and I guess this won't change soon. So, accordingly a project is associated with one APK.
What is needed:

A way to store the project
Projects settings, e.g. APK, open tabs, 'renamed' methods are saved.
User can switch between projects (saved internally in Java Preferences)

The main questions are:

Should we have an actual file (e.g. with jadx extension), or should we store this as we are using Java Preferences for the settings?
If a file, what would be the format, XML/Json/custom?
When a user changes some setting, should it automatically be saved, or there is save project option.

I prefer an actual file. I don't like to save tons of settings in Windows registry )) Also opening project will be just opening file, this is simple and intuitive.
'json' is nice and I already use it for 'global' settings
This is discussable and there are many scenarios. I think for initial file creation user must explicitly 'save project' and if project already saved in file, we can autosave it on close, or save sometimes on important changes (like new 'rename').

P.S. Now jadx-gui opens only one file at a time because of high memory usage, so several apks might not fit in memory. To overcome this jadx must save decompilation result somehow (this was requested in #444)
Also as requested in #359 jadx will use project file for saving code comment.

Question: I updated the original post few times, was a notification sent?

@asashour I am subscribed to this issue, but I don't receive updates on edits (as far as I know this the common way to handle edits).

For me today all notifications from github are delayed like for hours, and some of them are missing. Maybe something wrong with github?
For the update:
Maybe we also leave Exclude packages in global settings, because now it is working nice, you don't need exclude same common packages again on every apk.


wmenu-run: capture keyboard events before loading completes

If I start typing quickly after running wmenu-run, the initial letters seem to be ignored, resulting with the wrong program being selected.
Is there a way to start capturing the keyboard before program loading begins and/or stream stdin in wmenu after initializing?

Oof. Wrong project :sweat_smile:


2 networks which shared same weight on some layers

hello,
I have two datasets different with differents kind of label different. So I have two different networks but I want to shared some layers (the first convolutional) between them during the training.
Exemple :
Input 1 dataset 1  -> | VGG16 convolutional layers shared | -> | VGG16 layers 1 unshared | -> output 1
Input 2 dataset 2 -> | VGG16 convolutional layers shared | -> | VGG16 layers 2 unshared | -> output 2

For the training step I was looking for trained the layers shared batch by batch alternating the dataset 1 and the dataset 2.
something like that :
# one iteration
net1.forward(batch1.next())
net1.backward()
net1.update
net2.forward(batch2.next())
net2.backward()
net2.update()

How can I shared the weight with two networks? (and not only one network because I have two different datasets)

@Shiro-mx you can refer to #6909

@Ldpe2G  thank you for your help
I am maybe wrong but it seems that there is only one output, instead of the number of input. The function feedforward can do this ? Because my goal was to train the shared weight of the different networks but also to train the unshared weight ( the 2 or 3 last layers)

@Shiro-mx I suggest you to use the module api which is more flexible. The triplet loss example shows how to share weight between nets by define the weight variable with specific name, and use them in both nets.

I create a small network but I have a problem regarding binding. I also want to use the sgd optimizer but I don't know where to put it. I read some topic but I do not really understand what I have to do.
def get_shared_network(data, fc1_weight, fc1_bias, fc2_weight, fc2_bias):
    fc1 = mx.symbol.FullyConnected(data=data, name='fc1', num_hidden=128, weight=fc1_weight, bias=fc1_bias)
    act1 = mx.symbol.Activation(data=fc1, name='relu1', act_type="relu")
    fc2 = mx.symbol.FullyConnected(data=act1, name='fc2', num_hidden=64, weight=fc2_weight, bias=fc2_bias)
    act2 = mx.symbol.Activation(data=fc2, name='relu2', act_type="relu")

    return act2

def get_two_network():
    data1 = mx.sym.Variable('data1')
    data2 = mx.symbol.Variable('data2')

    fc1_w = mx.sym.Variable('fc1_w', init=mx.init.Constant(0.02))
    fc2_w = mx.symbol.Variable('fc2_w', init=mx.init.Constant(0.01))
    fc1_b = mx.sym.Variable('fc1_b', init=mx.init.Constant(0.08))
    fc2_b = mx.symbol.Variable('fc2_b', init=mx.init.Constant(0.09))

    act2_1 = get_shared_network(data1, fc1_w, fc1_b, fc2_w, fc2_b)
    act2_2 = get_shared_network(data2, fc1_w, fc1_b, fc2_w, fc2_b)
    fc3_1 = mx.symbol.FullyConnected(data=act2_1, name='fc3_1', num_hidden=5)
    fc3_2 = mx.symbol.FullyConnected(data=act2_2, name='fc3_2', num_hidden=5)
    softmax1 = mx.sym.SoftmaxOutput(data=fc3_1, name='softmax1')
    softmax2 = mx.sym.SoftmaxOutput(data=fc3_2, name='softmax2')
    return [softmax1, softmax2]

# Data
imgrec_train1 = 'mnistasjpg/train_data1' + '.rec'
imglist_train1 = 'mnistasjpg/train_data1' + '.lst'

imgrec_test1 = 'mnistasjpg/test_data1' + '.rec'
imglist_test1 = 'mnistasjpg/test_data1' + '.lst'

imgrec_train2 = 'mnistasjpg/train_data2' + '.rec'
imglist_train2 = 'mnistasjpg/train_data2' + '.lst'

imgrec_test2 = 'mnistasjpg/test_data2' + '.rec'
imglist_test2 = 'mnistasjpg/test_data2' + '.lst'

# # load dataset
train_dataiter1 = mx.io.ImageRecordIter(
        path_imgrec=imgrec_train1,
        data_shape=(3, x, y),
        batch_size=batch_size,
        path_imglist=imglist_train1,
        preprocess_threads=1,
        label_width=1,
        data_name='data1',
        label_name='softmax1_label',
        # shuffle=True,
        # shuffle_chunk_seed=100,
        # seed=100,
        # rand_mirror=True,
        # rand_mirror_prob=0.5,
        # random_crop=True
)
print('testing Dataset ...')
# Data validation
test_dataiter1 = mx.io.ImageRecordIter(
    path_imgrec=imgrec_test1,
    data_shape=(3, x, y),
    batch_size=batch_size,
    path_imglist=imglist_test1,
    preprocess_threads=1,
    label_width=1,
    data_name='data1',
    label_name='softmax1_label'
)

def get_shared_network(data, fc1_weight, fc1_bias, fc2_weight, fc2_bias):
    fc1 = mx.symbol.FullyConnected(data=data, name='fc1', num_hidden=128, weight=fc1_weight, bias=fc1_bias)
    act1 = mx.symbol.Activation(data=fc1, name='relu1', act_type="relu")
    fc2 = mx.symbol.FullyConnected(data=act1, name='fc2', num_hidden=64, weight=fc2_weight, bias=fc2_bias)
    act2 = mx.symbol.Activation(data=fc2, name='relu2', act_type="relu")

    return act2

def get_two_network():
    data1 = mx.sym.Variable('data1')
    data2 = mx.symbol.Variable('data2')

    fc1_w = mx.sym.Variable('fc1_w', init=mx.init.Constant(0.02))
    fc2_w = mx.symbol.Variable('fc2_w', init=mx.init.Constant(0.01))
    fc1_b = mx.sym.Variable('fc1_b', init=mx.init.Constant(0.08))
    fc2_b = mx.symbol.Variable('fc2_b', init=mx.init.Constant(0.09))

    act2_1 = get_shared_network(data1, fc1_w, fc1_b, fc2_w, fc2_b)
    act2_2 = get_shared_network(data2, fc1_w, fc1_b, fc2_w, fc2_b)
    fc3_1 = mx.symbol.FullyConnected(data=act2_1, name='fc3_1', num_hidden=5)
    fc3_2 = mx.symbol.FullyConnected(data=act2_2, name='fc3_2', num_hidden=5)
    softmax1 = mx.sym.SoftmaxOutput(data=fc3_1, name='softmax1')
    softmax2 = mx.sym.SoftmaxOutput(data=fc3_2, name='softmax2')
    return [softmax1, softmax2]

# Data
imgrec_train1 = 'mnistasjpg/train_data1' + '.rec'
imglist_train1 = 'mnistasjpg/train_data1' + '.lst'

imgrec_test1 = 'mnistasjpg/test_data1' + '.rec'
imglist_test1 = 'mnistasjpg/test_data1' + '.lst'

imgrec_train2 = 'mnistasjpg/train_data2' + '.rec'
imglist_train2 = 'mnistasjpg/train_data2' + '.lst'

imgrec_test2 = 'mnistasjpg/test_data2' + '.rec'
imglist_test2 = 'mnistasjpg/test_data2' + '.lst'

# # load dataset
train_dataiter1 = mx.io.ImageRecordIter(
        path_imgrec=imgrec_train1,
        data_shape=(3, x, y),
        batch_size=batch_size,
        path_imglist=imglist_train1,
        preprocess_threads=1,
        label_width=1,
        data_name='data1',
        label_name='softmax1_label',
        # shuffle=True,
        # shuffle_chunk_seed=100,
        # seed=100,
        # rand_mirror=True,
        # rand_mirror_prob=0.5,
        # random_crop=True
)
print('testing Dataset ...')
# Data validation
test_dataiter1 = mx.io.ImageRecordIter(
    path_imgrec=imgrec_test1,
    data_shape=(3, x, y),
    batch_size=batch_size,
    path_imglist=imglist_test1,
    preprocess_threads=1,
    label_width=1,
    data_name='data1',
    label_name='softmax1_label'
)

train_dataiter2 = mx.io.ImageRecordIter(
        path_imgrec=imgrec_train2,
        data_shape=(3, x, y),
        batch_size=batch_size,
        path_imglist=imglist_train2,
        preprocess_threads=1,
        label_width=1,
        data_name='data2',
        label_name='softmax2_label',
        #shuffle=True,
        # shuffle_chunk_seed=100,
        # seed=100,
        #rand_mirror=True,
        #rand_mirror_prob=0.5,
        #random_crop=True
)
print('testing Dataset ...')
# Data validation
test_dataiter2 = mx.io.ImageRecordIter(
    path_imgrec=imgrec_test2,
    data_shape=(3, x, y),
    batch_size=batch_size,
    path_imglist=imglist_test2,
    preprocess_threads=1,
    label_width=1,
    data_name='data2',
    label_name='softmax2_label'
)

sgd = mx.optimizer.create('sgd', learning_rate=.001, momentum=0.9, wd=0.0005)
name_model = get_two_network()

# load network
mod1 = mx.mod.Module(name_model[0], context=mx.cpu(), data_names=['data1'], label_names=[output_name])
mod1.bind(data_shapes=[('data1', (1, 3, x, y))], label_shapes=[(output_name, (1,))] )
mod1.init_params()
mod2 = mx.mod.Module(name_model[1], context=mx.cpu(), data_names=['data2'], label_names=[output_name2])
mod2.bind(data_shapes=[('data2', (1, 3, x, y))], label_shapes=[(output_name2, (1,))] )
mod2.init_params()

# train

batch = train_dataiter1.next()
mod1.forward(batch, is_train= True)
result = mod1.get_outputs()[0]
print(result.asnumpy())
#mod1.backward(sgd)
mod1.update()

The error :
Traceback (most recent call last):
  File "mxnet_shared.py", line 164, in <module>
    mod1.update()
  File "/usr/local/lib/python3.5/dist-packages/mxnet-0.10.1-py3.5.egg/mxnet/module/module.py", line 610, in update
    assert self.binded and self.params_initialized and self.optimizer_initialized
AssertionError

It solved the binding error, but it seems that the weight are not shared.
print('AFTER TRAIN')
print(mod1.get_params()[0]['fc2_b'].asnumpy())
print(mod2.get_params()[0]['fc2_b'].asnumpy())

it gives me :
BEFORE TRAIN
[ 0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093]
[ 0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093]
[[  9.96710181e-01   4.97425392e-15   6.05048997e-11   3.28975217e-03
    9.74552383e-12]]
[[ 1.  0.  0.  0.  0.]]
[[ 1.  0.  0.  0.  0.]]
AFTER TRAIN
[ 0.00929993  0.00930007  0.00930124  0.00930121  0.0092996   0.00930087
  0.00930096  0.00930125  0.00929955  0.0093001   0.00930067  0.00929943
  0.00929947  0.00930002  0.00929987  0.00929933  0.00930128  0.00929914
  0.00929966  0.00930015  0.00930036  0.00929985  0.00929992  0.00929972
  0.00930061  0.00929911  0.00929995  0.00930028  0.00929933  0.0092998
  0.00929865  0.00929941  0.00929879  0.00930045  0.00930095  0.00930034
  0.00929994  0.00929952  0.00930084  0.00930035  0.00930017  0.0093004
  0.00930039  0.00930087  0.00929925  0.00929921  0.00930016  0.00930016
  0.00929892  0.00930011  0.00930025  0.00930009  0.00929855  0.00930055
  0.00930054  0.00930065  0.00930017  0.00929909  0.00929966  0.0093
  0.00930044  0.00929949  0.00930084  0.00930004]
[ 0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093  0.0093
  0.0093]

why the shared weight did not work ?

remove the asnumpy then you might get its object id, which can help you debug. It should be consistent if your code is correct.
print('AFTER TRAIN')
print(mod1.get_params()[0]['fc2_b'])
print(mod2.get_params()[0]['fc2_b'])

@zihaolucky Thank your for the help.
How can I obtain the id ? I get that after removing asnumpy:
AFTER TRAIN
<NDArray 64 @cpu(0)>
<NDArray 64 @cpu(0)>

Oops, my bad. Could you try compare two objects with Python operator is ?
BTW, did you just use two different mod? I suppose theses models are different, although they have same name for the weight.

@zihaolucky
It doesn't seem the same. Yes, I use two mod one for each input and output.

I think calling two mod and then bind it input/output separately even if it is the "same" symbol create two different network. Is there a way correct this ? (maybe I am doing something wrong).
If it's not, is it possible to train only  one input and one output  a network which have two intput/output ? I did not find a topic about it.

I am having the same issue - I would really like to be able to share parameters across two modules, because each module will be reading from a distinct data stream and training a distinct network with only some shared components. A someone minimal example appears below:
import logging
import mxnet as mx

mnist = mx.test_utils.get_mnist()

batch_size = 100
train_iter = mx.io.NDArrayIter(mnist['train_data'], mnist['train_label'], batch_size, shuffle=True)
val_iter = mx.io.NDArrayIter(mnist['test_data'], mnist['test_label'], batch_size)
data = mx.sym.var('data')
data = mx.sym.flatten(data=data)

# Set up variables to share parameters for all layers
w1 = mx.sym.Variable('1_weight')
w2 = mx.sym.Variable('2_weight')
w3 = mx.sym.Variable('3_weight')
b1 = mx.sym.Variable('1_bias')
b2 = mx.sym.Variable('2_bias')
b3 = mx.sym.Variable('3_bias')

# Build network 1 with explicit weight pointers
fc1 = mx.sym.FullyConnected(data=data, num_hidden=128, weight=w1, bias=b1)
act1 = mx.sym.Activation(data=fc1, act_type="relu")
fc2 = mx.sym.FullyConnected(data=act1, num_hidden=64, weight=w2, bias=b2)
act2 = mx.sym.Activation(data=fc2, act_type="relu")
fc3 = mx.sym.FullyConnected(data=act2, num_hidden=10, weight=w3, bias=b3)
mlp = mx.sym.SoftmaxOutput(data=fc3, name='softmax')
# Build module 1
mlp_model = mx.mod.Module(symbol=mlp, context=mx.cpu())

# Now build a second, identical graph that shares the same weight pointers
fc1s = mx.sym.FullyConnected(data=data, num_hidden=128, weight=w1, bias=b1)
act1s = mx.sym.Activation(data=fc1s, act_type="relu")
fc2s = mx.sym.FullyConnected(data=act1s, num_hidden=64, weight=w2, bias=b2)
act2s = mx.sym.Activation(data=fc2s, act_type="relu")
fc3s = mx.sym.FullyConnected(data=act2s, num_hidden=10, weight=w3, bias=b3)
mlps = mx.sym.SoftmaxOutput(data=fc3s, name='softmax')
# Build module 2
mlp_models = mx.mod.Module(symbol=mlps, context=mx.cpu())

# Train module 1
logging.getLogger().setLevel(logging.DEBUG)  # logging to stdout
print("\n===Training module1===\n")
mlp_model.fit(train_iter,  # train data
              eval_data=val_iter,  # validation data
              optimizer='sgd',  # use SGD to train
              optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
              eval_metric='acc',  # report accuracy during training
              batch_end_callback=mx.callback.Speedometer(batch_size, 100),
              num_epoch=5)  # train for at most 10 dataset passes

# Train module 2
# We expect the shared module to start where the first module finished
print("\n===Training module2===\n")
mlp_models.shared_group = mlp_model._exec_group
mlp_models.fit(train_iter,  # train data
               eval_data=val_iter,  # validation data
               optimizer='sgd',  # use SGD to train
               optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
               eval_metric='acc',  # report accuracy during training
               batch_end_callback=mx.callback.Speedometer(batch_size, 100),
               num_epoch=5)  # train for at most 10 dataset passes

# Making sure that fit doesn't always overwrite parameters by returning to module 1
print("\n===Training module1===\n")
mlp_model.fit(train_iter,  # train data
              eval_data=val_iter,  # validation data
              optimizer='sgd',  # use SGD to train
              optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
              eval_metric='acc',  # report accuracy during training
              batch_end_callback=mx.callback.Speedometer(batch_size, 100),
              num_epoch=5)  # train for at most 10 dataset passes

@cherryc Great, maybe you can write a tutorial or example to help more people with this feature.

No, sorry - I wasn't clear - the above code does not work as intended! Where I say, "We expect the shared module to start where the first module finished," instead the shared module starts over from random initialization, indicating that the two modules do not share parameters. I haven't yet been able to find a way to make them.

Does it work if we recreate module from symbol before each fit ?
mlp_model = mx.mod.Module(symbol=mlp, context=mx.cpu())
mlp_model.fit(...)

mlp_models = mx.mod.Module(symbol=mlps, context=mx.cpu())
mlp_models.fit(...)

mlp_model = mx.mod.Module(symbol=mlp, context=mx.cpu())
mlp_model.fit(...)

@piiswrong how can we realize this feature? What if we name a param with the same name in a different module? Does it use the same NDArray?

I test with get_params() to transfert weight between model and it seems to work.
But I'm not sure if both network have different layer after shared layer, the weight transfers will work correctly (fit function will overwrite other layer with their default initialization).
This method don't use the shared weight functionality of MXNet.
# Train module 1
mlp_model = mx.mod.Module(symbol=mlp, context=mx.cpu())
logging.getLogger().setLevel(logging.DEBUG)  # logging to stdout
print("\n===Training module1===\n")
mlp_model.fit(train_iter,  # train data
              eval_data=val_iter,  # validation data
              optimizer='sgd',  # use SGD to train
              optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
              eval_metric='acc',  # report accuracy during training
              batch_end_callback=mx.callback.Speedometer(batch_size, 100),
              num_epoch=1)  # train for at most 10 dataset passes

# Train module 2
# We expect the shared module to start where the first module finished
print("\n===Training module2===\n")
arg_param, aux_param = mlp_model.get_params()
mlp_models = mx.mod.Module(symbol=mlps, context=mx.cpu())
#mlp_models.shared_group = mlp_model._exec_group
mlp_models.fit(train_iter,  # train data
               eval_data=val_iter,  # validation data
               optimizer='sgd',  # use SGD to train
               optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
               eval_metric='acc',  # report accuracy during training
               batch_end_callback=mx.callback.Speedometer(batch_size, 100),
               num_epoch=1,# train for at most 10 dataset passes
               arg_params=arg_param)

arg_param, aux_param = mlp_models.get_params()
# Making sure that fit doesn't always overwrite parameters by returning to module 1
print("\n===Training module1===\n")
mlp_model.fit(train_iter,  # train data
              eval_data=val_iter,  # validation data
              optimizer='sgd',  # use SGD to train
              optimizer_params={'learning_rate': 0.1},  # use fixed learning rate
              eval_metric='acc',  # report accuracy during training
              batch_end_callback=mx.callback.Speedometer(batch_size, 100),
              num_epoch=1,
              arg_params=arg_param)  # train for at most 10 dataset passes

For param sharing I think you just need to use the shared_module option during mod.bind when you have 2 modules sharing the some parameters
One detail is that you need a "master_module" which has all symbols that you need, and pass it as the shared_module to the mod1.bind() and mod2.bind(), where mod1 and mod2 has a subset of the param/symbols.

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!
Also, do please check out our forum (and Chinese version) for general "how-to" questions.


[Do Not Merge] Pydantic v2 second attempt

This pr address #790

[x] Transition all pydantic models to v2
[x] Adapt validators
[x] Correct metadata in test/data
[x] Adapt tests

Checklist before merging

[x] I added an appropriate entry to CHANGELOG.md

@tcompa the v2 model conversion is ready. It pass all tests not related to manifest creation.
There is still a bit of work to do on my side to update some deprecated APIs like .dict

This is now the main PR that is meant to be reviewed, polished and eventually merged to fully move from Pydantic V1 to V2 - both in core-library/tasks and in JSON-Schema tools.
Note that releasing these changes won't be strictly useful until we address https://github.com/fractal-analytics-platform/fractal-web/issues/531.

Here is the current situation for external packages:
fractal-helper-tasks
The only diff in the new manifest is the switch from pydantic_v1 to pydantic_v2. Other than that, the new manifest has not changed.
APx_fractal_task_collection
Manifest generation fails, since the package uses Pydantic-v1 methods and should be updated (ref https://github.com/Apricot-Therapeutics/APx_fractal_task_collection/issues/5).
scMultiplex
Manifest generation fails with ModuleNotFoundError: No module named 'image_registration'. I need to debug this further.

Manifest generation fails with ModuleNotFoundError: No module named 'image_registration'. I need to debug this further.

This is unrelated to the current PR, see https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/803.

Latest update about external packages:

fractal-helper-tasks is fully under control (the diff only includes the args_schema_version field)
A recent branch of APX is fully under control (all details in https://github.com/Apricot-Therapeutics/APx_fractal_task_collection/issues/5)
scmultiplex has the diff reported below, which does not seem to include anything breaking

diff --git a/src/scmultiplex/__FRACTAL_MANIFEST__.json b/src/scmultiplex/__FRACTAL_MANIFEST__.json
index 6fd5f0c..0b34938 100644
--- a/src/scmultiplex/__FRACTAL_MANIFEST__.json
+++ b/src/scmultiplex/__FRACTAL_MANIFEST__.json
@@ -1,5 +1,5 @@
 {
-  "args_schema_version": "pydantic_v1",
+  "args_schema_version": "pydantic_v2",
   "has_args_schemas": true,
   "manifest_version": "2",
   "task_list": [
@@ -35,8 +35,7 @@
         "type": "object"
       },
       "args_schema_parallel": {
-        "additionalProperties": false,
-        "definitions": {
+        "$defs": {
           "InitArgsRegistration": {
             "description": "Registration init args.",
             "properties": {
@@ -52,11 +51,12 @@
             "type": "object"
           }
         },
+        "additionalProperties": false,
         "properties": {
           "init_args": {
-            "$ref": "#/definitions/InitArgsRegistration",
+            "$ref": "#/$defs/InitArgsRegistration",
             "description": "Intialization arguments provided by `_image_based_registration_hcs_init`. They contain the reference_zarr_url that is used for registration. (standard argument for Fractal tasks, managed by Fractal server).",
-            "title": "Init_Args"
+            "title": "Init Args"
           },
           "iou_cutoff": {
             "default": 0.2,
@@ -140,8 +140,7 @@
         "type": "object"
       },
     {
       "args_schema_parallel": {
-        "additionalProperties": false,
-        "definitions": {
+        "$defs": {
           "ChannelInputModel": {
             "description": "A channel which is specified by either `wavelength_id` or `label`.",
             "properties": {
               "label": {
-                "description": "Name of the channel.",
+                "description": "Name of the channel. Can only be specified if wavelength_id is not set.",
                 "title": "Label",
                 "type": "string"
               },
               "wavelength_id": {
-                "description": "Unique ID for the channel wavelength, e.g. `A01_C01`.",
+                "description": "Unique ID for the channel wavelength, e.g. `A01_C01`. Can only be specified if label is not set.",
                 "title": "Wavelength Id",
                 "type": "string"
               }
@@ -1311,6 +1310,7 @@
             "type": "object"
           }
         },
+        "additionalProperties": false,
         "properties": {
           "allow_duplicate_labels": {
             "default": false,
@@ -1326,7 +1326,7 @@
           },
           "input_channels": {
             "additionalProperties": {
-              "$ref": "#/definitions/ChannelInputModel"
+              "$ref": "#/$defs/ChannelInputModel"
             },
             "description": "Dictionary of channels to measure. Keys are the names that will be added as prefixes to the measurements, values are another dictionary containing either wavelength_id or channel_label information to allow Fractal to find the correct channel (but not both). Example: {\"C01\": {\"wavelength_id\": \"A01_C01\"}. To only measure morphology, provide an empty dict",
             "title": "Input Channels",

The last missing check on the produced manifests is the one for fractal-tasks-core, which is also under control (full details at https://github.com/fractal-analytics-platform/fractal-web/issues/531).

This PR is now mostly ready, and could be merged any time.
Minor reviews can still take place, before or after merging:

With @lorenzocerrone we plan to test the JSON Schema tools on yet another package
Before using the newly-generated schema, a (minor) fix and a new version are required in fractal-web - https://github.com/fractal-analytics-platform/fractal-web/issues/531

Once we merge this PR, it will be a bit cumbersome to switch back to Pydantic V1 (cc @jluethi)

I found a minor issue in handling tuples in pydantic v2 that can be potentially problematic.
If I have the following tuple definition in a pydantic model:
patch: tuple[int, int, int] = (80, 160, 160)

The schema generated is slightly different between v2 and v1
V1:
"patch": {
                "title": "Patch",
                "default": [
                  80,
                  160,
                  160
                ],
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "items": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "description": "The patch size."
              },

V2:
"patch": {
                ...
                "prefixItems":: [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  },
                  {
                    "type": "integer"
                  }
                ]
               ...
              },

The V2 version is not shown in the fractal web UI.
@tcompa, should this be addressed on fractal web or as a custom schema generation?

I found a minor issue in handling tuples in pydantic v2 that can be potentially problematic.

Great, thanks for catching it!

should this be addressed on fractal web or as a custom schema generation?

This is one of the new features in JSON Schema Draft 2020-12, which pydantic2-generated JSON Schemas should comply with.
Therefore I guess it's best to adapt fractal-web, rather than sticking with some old JSON Schemas.

Therefore I guess it's best to adapt fractal-web, rather than sticking with some old JSON Schemas.

Ref https://github.com/fractal-analytics-platform/fractal-web/issues/534


Assets hardcoded, should be overridable

Assets are hardcoded to be served from http://cdn.clappr.io/ but I would want to be able to set where it is being served from.
https://github.com/clappr/clappr/search?utf8=✓&q=cdn.clappr.io+language%3Ajavascript+language%3Ascss&type=Code

Also this would make it possible to server assets from a secure https server

i would like too ...

After looking to it, it can be easy for swf assets, but how can we do for scss files, because they are compiled ...
We have to extract all the lines working with assets from the scss to dynamically generates them into the app from new parameters , is that true ?

@irongomme We solve this problem in some of our internal plugins, I think we can apply the same solution to clappr. I'll take a look on this now.

https://github.com/clappr/clappr/commit/19740cd8a3a7a5ecab3b9a7bed96d2ad20c08920 adds a new baseUrl param to use a custom host, if no baseUrl is passed it will try to get it from the current host.


A Scan has a failure.. Please approve to proceed

Approval required for following Workflow to proceed.

WorkflowName
Workflow#
BranchName
TriggerEvent
LastCommitUser

build-test
101
refs/heads/main
push
Yog4Prog

Issue Details
Found an Issue while performing SCA Scan
:point_right: You are required to Approve (or) Reject the issue
Approve or Reject by commenting in the below section with any of the following keywords
:green_book:  Approved Keys: approved approve lgtm goahead proceed yes
:closed_book: Reject Keys: denied deny reject rejected no abort cancel exit
:point_right: Note: If left uncommented the issue will be closed after the timeout period and the workflow will be marked unsuccessful.

Commented here

Approval waiting period elapsed. Approval request is automatically closed and workflow status is marked to Failed.


Add pull request template

Pull request template borrows from babel. 😄

@olga193580  Oa ha, thank you for your approval, but I need 1 approving review from redux-saga collaborators.


Same Origin Error in Chrome

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://app.zeplin.io') does not match the recipient window's origin ('http://localhost:6006').
Our project config is pretty gnarly, so I figured I was doing something wrong.
Then I opened storybook in Firefox and everything worked fine.
The Firefox console shows the same message, but does show the corresponding Zeplin addon etc. Chrome behaves as though there's no Zeplin addon registered. So, I'm not 100% sure that Chrome's failure is due to the postMessage, but that's all I have to go on at the moment.

Hmm... cleared all cookies, local storage, etc and everything is fine so closing.

@jonwilliams-bluescape Glad you figured it out 😄

Hmm... cleared all cookies, local storage, etc and everything is fine so closing.

Im having exactly same problem, clearing cookies and local storages not solve my problem. Any suggestion here @mertkahyaoglu

@mertkahyaoglu Facing the same issue. https://github.com/mertkahyaoglu/storybook-zeplin/issues/54
Is there a fix for the same?

Replied about the issue here: https://github.com/mertkahyaoglu/storybook-zeplin/issues/54#issuecomment-1228462813


Is it possible to know a paragraph on which page

Is it possible to know a paragraph on which page
I want to auto gen the TOC with page num
i've read the document.xml there isn't some sign

No. If you search on "python-docx TOC" you'll find more detailed explanation.

thanks for your information
i edit document.xml but always get a broken notice before i open it
is there some useful way to avoid it ?

It's my mistakes !!!
when i use python-docx it work's very well
Thanks for your work,
Is there some lower api  document like
In [10]: a._element.xpath("/w:document/w:body/w:sdt")
Out[10]: [<Element {http://schemas.openxmlformats.org/wordprocessingml/2006/main}sdt at 0x1116a6748>]

In [11]: from copy import deepcopy

In [12]: wp = a._element.xpath("/w:document/w:body/w:sdt/w:sdtContent/w:p")

In [13]: tmp_xml = deepcopy(wp[6])

In [14]: sdct = a._element.xpath("/w:document/w:body/w:sdt/w:sdtContent")

In [15]: sdct
Out[15]: [<Element {http://schemas.openxmlformats.org/wordprocessingml/2006/main}sdtContent at 0x111689488>]

In [16]: sdct = sdct[0]

In [17]: sdct.insert(3, tmp_xml)

In [18]: a.save('testx.docx')


Support for wildcard enabled GetServices

Hi
would it be possible to add method with a following signature?
IEnumerable<ServiceController> GetServices(string wildcardName)
Similar to what is possible with powershell
PS C:\Get-Service Xbox*
Status   Name               DisplayName
------   ----               -----------
Stopped  XboxGipSvc         Xbox Accessory Management Service
Stopped  XboxNetApiSvc      Xbox Live Networking Service

ServiceController doesn't expose that method and I don't want to switch to Powershell. I've added the following alias to v0.3.1
List<ServiceController> GetServices(string computer = "")
You could use LINQ to filter the response from this.

Nice, that should be enough 👍


Uncaught Exception: Attempting to call a function in a renderer window that has been closed or released. Function provid

An uncaught exception was reported.
Info:
OS: win32
Arch: ia32
GPMDP Version: 3.0.1
Time: Thu Mar 17 2016 21:58:22 GMT-0400 (Eastern Daylight Time)
Error:
Attempting to call a function in a renderer window that has been closed or released. Function provid
Error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Users\raror\AppData\Local\GPMDP_3\app-3.0.1\resources\app\build\inject\GPMInject\interface\mouseButtonNavigation.js:8:8.
    at BrowserWindow.callIntoRenderer (C:\Users\raror\AppData\Local\GPMDP_3\app-3.0.1\resources\atom.asar\browser\lib\rpc-server.js:201:19)
    at emitTwo (events.js:92:20)
    at BrowserWindow.emit (events.js:172:7)
    at Function.<anonymous> (C:\Users\raror\AppData\Local\GPMDP_3\app-3.0.1\resources\app\build\index.js:59:48)

This issue was created automatically inside the uncaughtException handler

Closing this automatically reported issue as a duplicate of #470


Fix logo in react icons README.md

Fixes #400
Fix logo in react icons README.md

@AshutoshDash1999 please review this PR!


keymanager error

Microsoft PowerToys version
0.63.0
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce

✔ Expected Behavior
Use the TAB+ALT key to switch applications
❌ Actual Behavior
Sometimes it works, sometimes it doesn't
Other Software
win11

Hello and thanks for your message. Do you press the physical left or right Alt and Windows keys? Quick idea is that the right Alt could be acting like AltGr.

/needinfo


[SPARK-21055][SQL] replace grouping__id with grouping_id()

What changes were proposed in this pull request?
spark does not support grouping__id, it has grouping_id() instead.
But it is not convenient for hive user to change to spark-sql
so this pr is to replace grouping__id with grouping_id()
hive user need not to alter their scripts
How was this patch tested?
test with SQLQuerySuite.scala

Test build #77893 has started for PR 18270 at commit 6fd567c.

Test build #77893 has finished for PR 18270 at commit 6fd567c.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77893/
Test FAILed.

Test build #77913 has started for PR 18270 at commit f532d9f.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/77913/
Test FAILed.

why it failed？

Retest this please.

Test build #78305 has started for PR 18270 at commit f532d9f.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78305/
Test FAILed.

Merged build finished. Test FAILed.

i will retrigger this once jenkins restart

test this please

Test build #78312 has started for PR 18270 at commit f532d9f.

Thank you, @shaneknapp .

Test build #78312 has finished for PR 18270 at commit f532d9f.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78312/
Test FAILed.

Test build #78582 has started for PR 18270 at commit 3b361d7.

Test build #78582 has finished for PR 18270 at commit 3b361d7.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78582/
Test FAILed.

Retest this please.

Ping, @cenyuhai .

Test build #80086 has started for PR 18270 at commit 3b361d7.

Test build #80086 has finished for PR 18270 at commit 3b361d7.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80086/
Test FAILed.

Jenkins, retest this please.

Test build #80905 has started for PR 18270 at commit 3b361d7.

Test build #80905 has finished for PR 18270 at commit 3b361d7.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80905/
Test FAILed.

@cenyuhai
Are you still working on this? Could please fix the test?

I realize the reason that leads to UTs failure is that the query result has a fixed order even though a sql statement doesn't include order by, such as the output of query 16 in group-analytics.sql.out.

Just modifying the output order will work.

@cenyuhai Could you update this PR? I will review it then.

Ok，I will update it

Test build #81257 has started for PR 18270 at commit 1423875.

Test build #81257 has finished for PR 18270 at commit 1423875.

This patch fails to build.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81257/
Test FAILed.

Test build #81258 has started for PR 18270 at commit e49742b.

Test build #81258 has finished for PR 18270 at commit e49742b.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81258/
Test FAILed.

@gatorsmile
Could you please give some ideas why the value of grouping_id() generated in Spark is different from grouping__id Hive? Is it designed on purpose? A lot of our users are using grouping__id in if(...) clause. The incompatibility between Spark and Hive is making our migration very difficult.

retest this please

Test build #81262 has started for PR 18270 at commit 36ff72a.

@jinxing64 https://github.com/apache/spark/pull/10677 made the changes. Hive generates a wrong result. See the JIRA opened by Davies: https://issues.apache.org/jira/browse/HIVE-12833

Thank you so much !

See the commit I made here: https://github.com/apache/spark/commit/77d4f7c4842d1b27f5a48a18fa55fa6c01016d42

Test build #81262 has finished for PR 18270 at commit 36ff72a.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81262/
Test FAILed.

Merged build finished. Test FAILed.

I can't see any comment at 77d4f7c?

That commit is the code changes I suggested.

Test build #81289 has started for PR 18270 at commit 2c6ed67.

Test build #81289 has finished for PR 18270 at commit 2c6ed67.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81289/
Test FAILed.

why failed? Couldn't I add order by？
org.scalatest.exceptions.TestFailedException: Expected "...Y CUBE(course, year)[ ORDER BY grouping__id, course, year]", but got "...Y CUBE(course, year)[]" SQL query did not match for query #16 SELECT course, year, grouping__id FROM courseSales GROUP BY CUBE(course, year) ORDER BY grouping__id, course, year

@gatorsmile I had already tried to resolve grouping__id in  ResolveFunctions. But ResolveFunctions is behind ResolveGroupingAnalytics. grouping__id may change in ResolveGroupingAnalytics.

Test build #81342 has started for PR 18270 at commit 059d486.

Test build #81342 has finished for PR 18270 at commit 059d486.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81342/
Test FAILed.

Test build #81345 has started for PR 18270 at commit e4d6d48.

@jinxing64  I think you may revert the changes in Spark, and use the same logic of grouping__id as hive. Keep the wrong result consistently as hive did.

Test build #81345 has finished for PR 18270 at commit e4d6d48.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/81345/
Test FAILed.

Thanks for notification. Actually we implement the same logic with hive, though there's a bug ...

Test build #82540 has started for PR 18270 at commit 1202bfa.

Test build #82540 has finished for PR 18270 at commit 1202bfa.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82540/
Test PASSed.

Test build #82543 has started for PR 18270 at commit eac37f0.

Test build #82543 has finished for PR 18270 at commit eac37f0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82543/
Test PASSed.

@gatorsmile

@cenyuhai Could you also address this comment: https://github.com/apache/spark/pull/18270/files#r136121931?

retest this please

Test build #82925 has started for PR 18270 at commit eac37f0.

Test build #82925 has finished for PR 18270 at commit eac37f0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82925/
Test PASSed.

LGTM
Let us resolve the issue as the follow-up PR.

Thanks! Merged to master.


262 support entity creation with keyvalues

closes #262

@tstorek can you have a look at this? https://github.com/RWTH-EBC/FiLiP/blob/262-Support-entity-creation-with-keyvalues/examples/ngsi_v2/e12_ngsi_v2_use_case_models.py
Here are some backgrounds of this implementation: In an ongoing research, I have faced the trade-off between the usability of the Pydantic models and the FIWARE- or Filip-compatibility. Therefore, I want to have a way to keep the Pydantic model simple, reusable, while FIWARE- or Filip-compatible.

@RCX112 Thank you for the review, the code has been revised accordingly


Steambot can't login on mono.

Hi i saw bot offline at morning and i try re-start bot and i can't open mono throw there errors  http://pastebin.com/qzt6FUE Bot can work perfectly on windows

Working just fine under mono here.
When you provide a paste, make sure we can actually see it...

No need to mirror reddit posts. Next time post here only if the problem is confirmed to be actual issue or a bug.
Also, obligatory #427 & #527.


Uno v5 support

Describe the bug
Hi @HavenDV!
I get the following error by just installing H.OxyPlot.Uno NuGet package on an Uno v5 project.
Project "D:\Andrew.nuget\packages\uno.ui\4.4.13\buildTransitive\net6.0-android30.0\Uno.UI.SourceGenerators.props" was not imported by "D:\Andrew.nuget\packages\uno.ui\4.4.13\buildTransitive\net6.0-android30.0\uno.winui.common.targets" at (17,2), due to the file not existing.
It seems that Uno v4 is supported but v5 is not. Any plans for v5 support?
Steps to reproduce the bug

Create an Uno v5 project.
Install H.OxyPlot.Uno.

Expected behavior
Works on Uno Platform apps.
Screenshots
No response
NuGet package version
No response
Platform
Uno
IDE
Visual Studio 2022-preview
Additional context
No response

I'll try to do this over the weekend


RuntimeError: Unsupported statement 'Try'.

Traceback (most recent call last):
File "train.py", line 808, in
train(hyp, opt)
File "train.py", line 236, in train
_, loss_item, grads, grads_finite = train_step(imgs, labels, ns, True)
File "/root/miniconda3/lib/python3.8/site-packages/mindspore/common/api.py", line 559, in staging_specialize
out = _MindsporeFunctionExecutor(func, hash_obj, input_signature, process_obj, jit_config)(*args)
File "/root/miniconda3/lib/python3.8/site-packages/mindspore/common/api.py", line 98, in wrapper
results = fn(*arg, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/mindspore/common/api.py", line 360, in call
phase = self.compile(args_list, self.fn.name)
File "/root/miniconda3/lib/python3.8/site-packages/mindspore/common/api.py", line 323, in compile
is_compile = self._graph_executor.compile(self.fn, compile_args, phase, True)
RuntimeError: Unsupported statement 'Try'.

The Traceback of Net Construct Code:

In file /root/miniconda3/lib/python3.8/site-packages/mindspore/context.py(412)
    try:

C++ Call Stack: (For framework developers)

mindspore/ccsrc/pipeline/jit/parse/parse.cc:725 ParseStatement

The Traceback of Net Construct Code:
In file /root/miniconda3/lib/python3.8/site-packages/mindspore/context.py(412)
    try:

C++ Call Stack: (For framework developers)
mindspore/ccsrc/pipeline/jit/parse/parse.cc:725 ParseStatement

This problem has been fixed in the later MindSpore version. You can try version 1.9.0

Thank You!


jpeg encoded zarr/n5 chunks

Would you have any interest in adding support to decoding zarr/n5 array chunks as jpegs? Adding jpeg compression to zarr is simple enough (I think we would have to agree on C or F ordering for re-arranging 3D images to big 2D images...) and I think I could get the n5 maintainer on board with the idea.

It would be very easy to support in Neuroglancer since there is already jpeg decoding support used for other formats.  I don't see any issue adding it to Neuroglancer, provided that it is upstreamed into the zarr/numcodecs repositories as well, since I want to avoid incompatibility.  Not sure if there is a single canonical n5 implementation at this point, but zarr/n5.py might serve as one.
I think for C or F order there is already a reasonably clear answer --- for zarr, use the order specified in the metadata, and for n5, use F order.  Presumably you would require data type to be uint8.  However, there are other variables relevant to jpeg encoding: which dimensions, if any, to stuff into the width, height, and channel dimensions.  Also jpeg has various color space and subsampling options that have a pretty major impact.  So your jpeg compression codec may need quite a few parameters.

Regarding the planarization of 3D images, how do you do it in the precomputed format?

width dimension corresponds to x,
height dimension corresponds to y and z, where consecutive y values correspond to consecutive rows of the image.
The channels of the precomputed format map directly to jpeg channels, and there must be 1 or 3 channels.  I've only ever used 1 channel, and in the case of 1 channel the subsampling/color options aren't an issue.

I can generate n5 / zarr chunks that would conform to this specification. Because this is a pretty specialized use-case (uint8 only, XYZC only), I doubt it would be in-scope for addition to the core zarr-python library, but zarr makes it very easy to define custom codecs. I'd be happy open-sourcing the codec (potentially we could merge it into the neuroglancer python library).

I see numcodecs has a few codecs but is fairly limited and doesn't have any image codecs, so I imagine you may be right that the authors may not want to include jpeg.
I just want to avoid fragmentation --- by defining a codec for zarr or n5 you will also be claiming a codec id (e.g. "jpeg"), but even if you pick a qualified name like "dvb_jpeg" or "neuroglancer_jpeg", in the future other software may need to interoperate with this format anyway.
I think I would suggest using the codec id of "jpeg" but trying to define the format parameters in a way that avoids problems later, and also at least running it by the n5 and numcodecs authors to hear any objections they may have to claiming the jpeg codec id.
The best way to avoid problems later is to start with the simplest form that you need, and doesn't define any parameters at all.
If you don't need multi-channel jpeg, I'd suggest just supporting grayscale for now.  If order == "C", the last dimension goes into the width, and the remaining dimensions go into height.  If order == "F", the first dimension goes into width and the remaining dimensions go into height.  (For N5, order == "F", but note that zarr/n5.py does a confusing transpose.)
Just have a single "quality" parameter (integer from 0 to 100) that is used for encoding (no effect on decoding).
This is simple enough that it is unlikely to create headaches later, and could be extended easily enough to add more parameters.

we have tentative java and python implementations of jpeg compression for chunks. The current implementation of n5 in zarr-python only allows a specific set of chunk encodings (of which our jpeg encoding is not a member); I submitted a PR to fix this, but it could take a long time before that gets addressed.
Both implementations only support jpeg and the only parameter is quality (0-100). I haven't added support for "F" ordered arrays but this is easy enough to add.


Experiment with buffering the pty data to improve performance

Related: https://github.com/Microsoft/vscode/issues/53974

For a terminal 140x66 on my Linux box (canvas_2d disabled)
Before buffering time ls -lR . was ~22s
After buffering time ls -lR . was ~8s (before https://github.com/Microsoft/vscode/issues/53974 it was around 7-8s)

140x19
Before: 4s
After: 4s

The gains appear to mostly be beneficial when rendering takes longer

On my macbook the differences seem minimal, going to hold off on this for now.

Closing, ext host buffering tracked in https://github.com/microsoft/vscode/issues/48513 and this would be more relevant if the proc was out of the renderer (https://github.com/microsoft/vscode/issues/74620).


Feature suggestion: SideTitle inside the chart

is there some way i can put the left tiles inside the chart? like the one in the picture

Hi, unfortunately, there isn't a way to do this,
but we will implement it ASAP.

Thank you for the reply :). Goodluck!!! Your work is awesome

Thanks @imaNNeoFighT. Is there some ETA?


Galaxy S10 crashes - signal 4 (SIGILL), code 1 (ILL_ILLOPC)

Multiple crashes in Google Play console, only for Samsung Galaxy S10.
signal 4 (SIGILL), code 1 (ILL_ILLOPC)
libflutter.so

Samsung Galaxy S10 (beyond1), Android 9
Report 1 of 2
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.appname.app <<<

backtrace:

  #00  pc<PHONE_NUMBER>421886  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #01  pc<PHONE_NUMBER>4219d5  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #02  pc<PHONE_NUMBER>3e7593  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #03  pc<PHONE_NUMBER>421627  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #04  pc<PHONE_NUMBER>42132b  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #05  pc<PHONE_NUMBER>41cdff  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #06  pc<PHONE_NUMBER>3e6693  /data/app/com.appname.app-LMOMnMJQ8JCBFpo39TnTng==/lib/arm/libflutter.so

  #07  pc<PHONE_NUMBER>064949  /system/lib/libc.so (__pthread_start(void*)+140)

  #08  pc<PHONE_NUMBER>01e3c5  /system/lib/libc.so (__start_thread+24)

[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
    • Flutter version 1.2.1 at /home/flutter/flutter_v1.2.1-stable
    • Framework revision 8661d8aecd (8 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /home/android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /home/android/sdk
    • Java binary at: /home/android/src/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at /home/android/src/android-studio
    • Flutter plugin version 31.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

• No issues found!

Stack trace seems familiar to me
Are you using firebase_admob plugin?

@rostopira no, this build does not have firebase_admob plugin.

My app is crashing only under Android 9 / Galaxy 8 (I don´t know about others models). The main page is showed, no ads and, then, the app crash. Under an old Android version it is OK. Ok also in emulator. It seems that is something about Admob. No error is showed.
I am using these packages:
cupertino_icons: ^0.1.2
shared_preferences: ^0.5.2
url_launcher: ^5.0.2
firebase_admob: ^0.8.0+4
firebase_messaging: 4.0.0+3
firebase_analytics: 2.1.1+2
firebase_core: ^0.3.4
font_awesome_flutter: ^8.4.0
flutter_launcher_icons: ^0.7.0

Starting with the engine team for further triage, although with the obfuscated stack trace, it's hard to tell, of course.

This crash is no longer appearing after upgrading flutter to 1.5.4-hotfix.2. Thanks for looking into it anyways.

Tentatively closing this issue. Feel free to reopen with a stack trace or specific repro if still an issue.


Identify a check by name within CI action

Feature Request

Q
A

New Feature
yes

RFC
yes

BC Break
no

Summary

Hey there,
I am currently working on something and I have the following use-case:

run tests on all supported PHP versions (works out-of-the-box)
run tests on lowest PHP version with locked deps (works ootb)
run tests on lowest PHP version with locked deps via additional_checks (works ootb, but...)

So the latter does work due to prior changes made to this action. The problem is, that I now want to identify this exact additional_check somehow. Because the main idea of this check would be:
Run tests on lowest PHP version with locked deps but disable one or more PHP extensions (to see if tests are still passing due to precautions or polyfills) and/or disallow PHP functions.
So, I'd like to have some kind of optional name within the job configuration which can be used as some kind of unique identifier. When added, this can be extract within a pre-run.sh for example.
An alternative would be to actually allow disabling extensions via the job array. That would make the whole thing easier but maybe its worth having both "features" up and running.
WDYT?

Makes sense. Additionally, it would be a good occasion for shortening default names a bit (they all overflow GitHub 's UI)

Yah, but we have to be careful here as these names might be used with "exclude".
https://github.com/boesing/psalm-plugin-stringf/blob/586ae0569b3ef5bcef1035dd70d4778ce8a03bce/.laminas-ci.json#L13
Because thats the only way how you can exclude jobs as of now. But maybe this is only relevant for this action and not for the container action. 👍🏻

Oh, I actually found out that the checks do actually have a name. It is just not used anywhere:
https://github.com/laminas/laminas-ci-matrix-action#providing-specific-checks-to-run
I'll see if we can somehow pass these around while also slightly modifying the exclude logic so it can both exclude job names and job command strings.


Add a Graph data structure to Godot.

I think Godot could benefit from providing a Reference object type that gives access to a labeled vertex, directed and labeled edge, graph data structure. Like how TreeItems work with the Tree, we could have a DataGraph (Reference, facade), DataGraphVertex (Object 0+ labels & a Variant meta), and DataGraphEdge (Object with 1 label & a Variant meta). I believe this format would keep it as flexible as possible.
Part of the advantage here is that you'd be getting access to a graph or tree data structure in the script code without having to rely on Control nodes like Tree or GraphNode. I can also think of some modules that would work quite well with a built in C++ type for graphs like this.
The advantages of exposing this to scripting could be pretty awesome for making data structures in projects. You could create scripts that use it as a graph, or convert it into a binary search tree, a splay tree, whatever you want.
What do you all think?

I would love some more thorough functionality for making skill and tech trees, and the like. A Graph class and it's components would go a long way towards that.

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

@willnationsdev I've reopened your proposal on the new GIP tracker and invite you to comment on the reopened proposal at least regarding some example intended game use-cases for your proposal (as requested by the GIP template).  Thanks!


Redefined integers within slices fail to correctly generate ssz methods

It seems like sszgen is not respecting the slice type when it is an alias of an integer. I think this has to do with one of the previous fixes that took advantage of the implicit conversion between the two.
package main

import (
        "encoding/json"
        "fmt"
        "strconv"
)

type U64Str uint64

func (i U64Str) MarshalJSON() ([]byte, error) {
        return json.Marshal(strconv.FormatUint(uint64(i), 10))
}

func (i *U64Str) UnmarshalJSON(b []byte) error {
        var s string
        if err := json.Unmarshal(b, &s); err != nil {
                return err
        }
        value, err := strconv.ParseInt(s, 10, 64)
        if err != nil {
                return err
        }
        *i = U64Str(value)
        return nil
}

type Foo struct {
        Bar []U64Str `json:"bar" ssz-max:"1024"`
}

func main() {
        input := `{"bar": ["1", "2", "3"]}`

        var val Foo
        if err := json.Unmarshal([]byte(input), &val); err != nil {
                panic(err)
        }
        fmt.Println("success")
}

$ sszgen --path main.go
$ go run .
./main_encoding.go:62:11: cannot use ssz.ExtendUint64(f.Bar, num) (value of type []uint64) as type []U64Str in assignment
./main_encoding.go:62:28: cannot use f.Bar (variable of type []U64Str) as type []uint64 in argument to ssz.ExtendUint64
./main_encoding.go:97:20: cannot use i (variable of type U64Str) as type uint64 in argument to hh.AppendUint64

This was originally found in https://github.com/flashbots/go-boost-utils/pull/17

I never expected that aliases would be that popular. I will take a look.

This is a hard issue to solve. The unmarshaller uses this function to efficiently allocate the array, but the function expects []uint type. I do not think the types can be casted.
However, something like this works:
type ArrayUint []uint64

type Case4 struct {
	Val ArrayUint  `ssz-size:"32"`
}


Add email notification support for failed processing

+1

+1

+1
Or even a way to continue over a failed import (i.e. I import thousands of users from a CRM - if 1  email is invalid, the whole import will fail)


Fixing squid:S2221 and squid:S1210 rules

This pull request is focused on resolving occurrences of some Sonar rules:
squid:S2221 - “"Exception" should not be caught when not required by called methods”.
You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S2221
squid:S1210 - ""equals(Object obj)" should be overridden along with the "compareTo(T obj)" method"
You can find more information about the issue here: https://dev.eclipse.org/sonar/rules/show/squid:S1210
Please let me know if you have any questions.
Artyom Melnikov.

Nice job on the implementation of .equals() and .hashCode(), that's some good best-practices code.


4046 - file and pay updates

Issue #: /bcgov/entity#4046
Description of changes:

Moved the setter for isFilingPaying so it is cleared on error so the file and pay button keeps the loading indicator and actions disabled until redirects happen.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

I was able to test this against

error on saving filing (402 payment required, error creating invoice)
when redirecting to make payment
payment was complete (premium account) and redirected to dashboard


[feat] Implement query() in FindMeetingQuery.java

Week 4 task - Test driven development

What is this? Do you implement a new Event and Meeting functionality?

The task for this week is learning test driven development. So in this case we are supposed to

Imagine you're working on the calendar team and are responsible for adding the "find a meeting" feature.

So they have provided us a separate calender webapp and a set of tests, and we need to write an algorithm to schedule meetings between multiple people.
[https://github.com/leonyeo/google-sps/blob/master/walkthroughs/week-4-tdd/project/pom.xml](View this week's walkthrough here)

The task for this week is learning test driven development. So in this case we are supposed to

Imagine you're working on the calendar team and are responsible for adding the "find a meeting" feature.

So they have provided us a separate calender webapp and a set of tests, and we need to write an algorithm to schedule meetings between multiple people.
https://github.com/leonyeo/google-sps/blob/master/walkthroughs/week-4-tdd/project/pom.xml

Ah noted! I haven't read the week 4 walkthrough :)

I think this weeks task was pretty interesting, I can really understand and appreciate the simplicity of test driven development now. Especially so in large applications, large teams, where multiple developers are working on different features, test driven development would allow us to work together efficiently without worrying about the underlying logic under each function, as well as ensuring the overall functionality of the product (if the tests are written correctly).
Also as someone who mainly uses Python, this pushed me to further understand the various implementations of Collections in Java.


Specify files to publish to npm

Currently the test file and the example file are also being published to npm. Considering that they make up more than half of the filesize of this package, it would be worthwhile to not publish them. This PR does this using the files field in the package.json.

Closed for the reasons outlined here https://github.com/mafintosh/pump/pull/55