Fixes attempts at taking rvalue references when dealing with cover properties

Description:
Tightened up the way rock decides whether an expression is referencable.
In particular, non extern const accesses where always deemed referencable (extern const values are presumed to be defined constants).
However, this is untrue if the expression of the access is non-referencable itself.
In addition to that, (at least in standard ooc), ooc array accesses cannot have their address taken but the compiler claimed all array accesses could do so.

C arrays appears to be broken:
populate: func (array: Int*, length: Int) {
    for (i in 0 .. length)
        array[i] = i
}

array: Int[3]
populate(array[0]&, 3)

for (i in 0 .. 3) "i = %d" printfln(array[i])
/*
    i = 0
    i = 0
    i = 0
*/

Upstream rock prints the expected output:
/*
    i = 0
    i = 1
    i = 2
*/

@thomasfanell Thanks, will be looking into it later today.

@shamanas any luck with this one? (no rush)

@thomasfanell
Took a look the other, couldn't figure out why this code doesn't work.
Will be active this weekend and figure this out, as well as some other over due bugs.

Hmm, weird, the output I get is:
i = 1
i = 2
i = 0

Which is of course also wrong.
Officially investigating! :p

Rock incorrectly marks 'array[0]' as an unreferencable expression and thus creates an intermediate variable and takes it's address (which of course is incorrect here).
This is because the change wrongly assumes all ArrayType expressions are ooc arrays.

@shamanas Thanks, I will have a look over the weekend

@shamanas have you tried compiling and testing ooc-kean with these changes? Something is causing threading not to work, it seems to deadlock no matter what.
If you want to try it for yourself (in ooc-kean root): ./test.sh concurrent/Thread
To test the entire namespace: ./test.sh concurrent

@thomasfanell
Hm, interesting.
I will be taking a look tomorrow afternoon.

@thomasfanell
I'm having issues because of the extend change, since ooc-kean still uses the extention of specific types workaround, haven't found a branch that updated this, I will probably fork it into one of my own branches and try to find the issues you are talking about.

@thomasfanell
I can't reproduce this, both ./test.sh concurrent/Thread and ./test.sh concurrent seem to run without failing on my system (on win32).
I'll probably boot up a Linux box and check it out there or diff the C sources generated with and without this fix to see what could cause the errors.

@shamanas I think both of these could work:
https://github.com/thomasfanell/ooc-kean/tree/generic-extensions-fix
https://github.com/thomasfanell/ooc-kean/tree/adapt_for_rock_1.0.21

@thomasfanell
Ah, didn't look for forks, I did it on my own branch anyways :)
The tests seem to be running fine on my setup though (apart from BlockedQueue).
I will be taking the diff of the C sources generated with and without the fix to find out what is happening.

So it turns out this code has a non critical bug (some variable accesses generate intermediate variables to then take their address, I don't know why I thought that was a good idea at the time).
However, I don't see anything that could cause the ooc-kean tests to fail (and as I said, they work fine on my system).
Here is the whole diff of the rock_tmp folders generated with ./test.sh concurrentwith and without this fix applied:
diff -r magic_rock_tmp/ooc/concurrent/native/ConditionUnix.c rvalue_rock_tmp/ooc/concurrent/native/ConditionUnix.c
75c75,81
<     return external_pthread__pthread_cond_wait(this->_backend, &(((native_MutexUnix__MutexUnix*) (mutex))->_backend)) == 0;
---
>
>     {
>         #line 30 "C:\\dev\\ooc_libs\\ooc-kean\\source\\concurrent\\native\\ConditionUnix.ooc"
>         external_pthread__PThreadMutex __native_ConditionUnix_unreferencable3 = ((native_MutexUnix__MutexUnix*) (mutex))->_backend;
>         #line 30 "C:\\dev\\ooc_libs\\ooc-kean\\source\\concurrent\\native\\ConditionUnix.ooc"
>         return external_pthread__pthread_cond_wait(this->_backend, &(__native_ConditionUnix_unreferencable3)) == 0;
>     }
diff -r magic_rock_tmp/ooc/system/structs/HashMap.c rvalue_rock_tmp/ooc/system/structs/HashMap.c
456c456
<     __structs_HashMap_structs_HashMap_closure21_ctx* __structs_HashMap_ctx22 = Memory__calloc(1, ((types__Class*)__structs_HashMap_structs_HashMap_closure21_ctx_class())->size);
---
>     __structs_HashMap_structs_HashMap_closure22_ctx* __structs_HashMap_ctx23 = Memory__calloc(1, ((types__Class*)__structs_HashMap_structs_HashMap_closure22_ctx_class())->size);
458c458
<     (*(__structs_HashMap_ctx22)) = (__structs_HashMap_structs_HashMap_closure21_ctx) {
---
>     (*(__structs_HashMap_ctx23)) = (__structs_HashMap_structs_HashMap_closure22_ctx) {
462,464c462,464
<     types__Closure __structs_HashMap_closure23 = (types__Closure) {
<         structs_HashMap____structs_HashMap_structs_HashMap_closure21_thunk,
<         __structs_HashMap_ctx22
---
>     types__Closure __structs_HashMap_closure24 = (types__Closure) {
>         structs_HashMap____structs_HashMap_structs_HashMap_closure22_thunk,
>         __structs_HashMap_ctx23
467c467
<     types__Closure writerFunc = __structs_HashMap_closure23;
---
>     types__Closure writerFunc = __structs_HashMap_closure24;
584,585d583
<             String__String* __structs_HashMap_genCall17 = NULL;
<             #line 242 "C:\\dev\\ooc_libs\\ooc-kean\\source\\system\\structs\\HashMap.ooc"
586a585,586
>             #line 242 "C:\\dev\\ooc_libs\\ooc-kean\\source\\system\\structs\\HashMap.ooc"
>             String__String* __structs_HashMap_genCall19 = NULL;
588c588
<             String__String* __structs_HashMap_genArg19 = String__String_clone((structs_VectorList__VectorList___OP_IDX_Int__T(pair, (uint8_t*) &(__structs_HashMap_genCall17), 0), __structs_HashMap_genCall17));
---
>             String__String* __structs_HashMap_genArg20 = String__String_clone((structs_VectorList__VectorList___OP_IDX_Int__T(pair, (uint8_t*) &(__structs_HashMap_genCall18), 0), __structs_HashMap_genCall18));
590c590
<             String__String* __structs_HashMap_genArg20 = String__String_clone((structs_VectorList__VectorList___OP_IDX_Int__T(pair, (uint8_t*) &(__structs_HashMap_genCall18), 1), __structs_HashMap_genCall18));
---
>             String__String* __structs_HashMap_genArg21 = String__String_clone((structs_VectorList__VectorList___OP_IDX_Int__T(pair, (uint8_t*) &(__structs_HashMap_genCall19), 1), __structs_HashMap_genCall19));
592c592
<             structs_HashMap__HashMap_put(result, NULL, (uint8_t*) &(__structs_HashMap_genArg19), (uint8_t*) &(__structs_HashMap_genArg20));
---
>             structs_HashMap__HashMap_put(result, NULL, (uint8_t*) &(__structs_HashMap_genArg20), (uint8_t*) &(__structs_HashMap_genArg21));
611c611
<     Numbers__Int __structs_HashMap_match16;
---
>     Numbers__Int __structs_HashMap_match17;
615c615
<         __structs_HashMap_match16 = (* (Numbers__Int*)key);
---
>         __structs_HashMap_match17 = (* (Numbers__Int*)key);
620c620
<         __structs_HashMap_match16 = structs_HashMap___acX31Hash((types__Class*)String__String_class(), (uint8_t*) &(__structs_HashMap_genArg15));
---
>         __structs_HashMap_match17 = structs_HashMap___acX31Hash((types__Class*)String__String_class(), (uint8_t*) &(__structs_HashMap_genArg15));
621a622,623
>         #line 1 "C:\\dev\\ooc_libs\\ooc-kean\\source\\system\\structs\\HashMap.ooc"
>         OwnedBuffer__OwnedBuffer __structs_HashMap_genArg16 = (* (Text__Text*)key)._buffer._backend;
623c625
<         __structs_HashMap_match16 = structs_HashMap___acX31Hash((types__Class*)OwnedBuffer__OwnedBuffer_class(), (uint8_t*) &((* (Text__Text*)key)._buffer._backend));
---
>         __structs_HashMap_match17 = structs_HashMap___acX31Hash((types__Class*)OwnedBuffer__OwnedBuffer_class(), (uint8_t*) &(__structs_HashMap_genArg16));
626c628
<         __structs_HashMap_match16 = structs_HashMap___murmurHash((types__Class*)K, (uint8_t*) key);
---
>         __structs_HashMap_match17 = structs_HashMap___murmurHash((types__Class*)K, (uint8_t*) key);
629c631
<     Numbers__Int result = __structs_HashMap_match16;
---
>     Numbers__Int result = __structs_HashMap_match17;
665c667
< void __structs_HashMap_structs_HashMap_closure21_ctx___cover_defaults__(__structs_HashMap_structs_HashMap_closure21_ctx* this) {
---
> void __structs_HashMap_structs_HashMap_closure22_ctx___cover_defaults__(__structs_HashMap_structs_HashMap_closure22_ctx* this) {
667c669
< void __structs_HashMap_structs_HashMap_closure21_ctx___load__() {
---
> void __structs_HashMap_structs_HashMap_closure22_ctx___load__() {
671c673
< __structs_HashMap_structs_HashMap_closure21_ctxClass *__structs_HashMap_structs_HashMap_closure21_ctx_class(){
---
> __structs_HashMap_structs_HashMap_closure22_ctxClass *__structs_HashMap_structs_HashMap_closure22_ctx_class(){
673c675
<     static __structs_HashMap_structs_HashMap_closure21_ctxClass class =
---
>     static __structs_HashMap_structs_HashMap_closure22_ctxClass class =
678,679c680,681
<                     .instanceSize = sizeof(__structs_HashMap_structs_HashMap_closure21_ctx),
<                     .size = sizeof(__structs_HashMap_structs_HashMap_closure21_ctx)
---
>                     .instanceSize = sizeof(__structs_HashMap_structs_HashMap_closure22_ctx),
>                     .size = sizeof(__structs_HashMap_structs_HashMap_closure22_ctx)
691c693
<         classPtr->name = (void*) String__makeStringLiteral("__structs_HashMap_structs_HashMap_closure21_ctx", 47);
---
>         classPtr->name = (void*) String__makeStringLiteral("__structs_HashMap_structs_HashMap_closure22_ctx", 47);
740c742
<         __structs_HashMap_structs_HashMap_closure21_ctx___load__();
---
>         __structs_HashMap_structs_HashMap_closure22_ctx___load__();
854c856
< void structs_HashMap____structs_HashMap_structs_HashMap_closure21(io_FileWriter__FileWriter* fileWriter, String__String** keyPtr, String__String** valuePtr) {
---
> void structs_HashMap____structs_HashMap_structs_HashMap_closure22(io_FileWriter__FileWriter* fileWriter, String__String** keyPtr, String__String** valuePtr) {
869c871
< void structs_HashMap____structs_HashMap_structs_HashMap_closure21_thunk(String__String** keyPtr, String__String** valuePtr, __structs_HashMap_structs_HashMap_closure21_ctx* __context__) {
---
> void structs_HashMap____structs_HashMap_structs_HashMap_closure22_thunk(String__String** keyPtr, String__String** valuePtr, __structs_HashMap_structs_HashMap_closure22_ctx* __context__) {
871c873
<     structs_HashMap____structs_HashMap_structs_HashMap_closure21((*__context__).fileWriter, keyPtr, valuePtr);
---
>     structs_HashMap____structs_HashMap_structs_HashMap_closure22((*__context__).fileWriter, keyPtr, valuePtr);

As you can see, most are closure names changing because of two extra intermediate variables being created with the fix.

With this commit the diff is null (/empty/however they call those).

@shamanas all tests pass here now, good job! :+1:
I have some more testing to do, and if all goes well, I'll ask @fredrikbryntesson to sign off on this

:tada:

Cool

@fredrikbryntesson

@shamanas Sent you a mail :)


Support for API spec

Thanks for opening up the Notion API. This is wonderful news and I am looking forward to develop integrations!
I use Python and Go on a regular basis and would like to develop Python and Go clients which would be easier if there was a Swagger API spec or something similar. Do you have plans to share the API spec?

Closing this issue as this has already come up in Discussions


Updating the data from the server side

Hi and thanks for your ssr example,
I was wondering how it's possible to update the data from server side and not from the client.
I want to create an app with your boilerplate, which fetches data from different websites or other sources and updates the client from server side. If I try to update the AppState on the server (with a simple setTimeout and run appstate.addItem('foobar'); after 5 secs) I receive the following message:
Warning: forceUpdate(...): Can only update a mounting component. This usually means you called forceUpdate() outside componentWillMount() on the server. This is a no-op. Please check the code for the Root component.
How is it possible to update the data on the server?
I want to use a store class and add new data e.g. to an array and the client should update automatically...
Thanks.

Hi.
Please send me an example of your code because I'm not sure what you're trying to do.
When you render your app on the server you could persist your state but the react components only exist to render them into a string. When the request is finished they are gone and can't be updated by the store. That's why you get a warning.
So you need to re-render your app by sending a request from a client. Now the state can be calculated again (this is the place you could add "foobar" to the store).
If you just add new value after 5 seconds nothing will happen if you don't have a mechanism to push state updates to your client (see socket.io).

Hi,
thanks for your fast reply!
You said the client have to send a request. But what if the client can't send a request, the server has to notify the clients.. Then I have to use sockets, right?
I have a few modules which can get the weather, news or emails and so on.
In the module constructor I am creating a component and adding the mobx datastore:
`import React from 'react';
import Module from '../../core/domain/module_class';
import NewsHelper from './mod_news_helper';
import NewsStore from './mod_news_store';
import NewsComponent from './mod_news_component';
class News extends Module {
/**
* Constructor for the News module. Is extended from the parent class module.js.
* @param  {Object} config    The module config with all important module parameters
* @param  {Object} datastore The local datastore for this module
*/
constructor(config, modulepath, modulefiles) {
super(config, modulepath, modulefiles);
	this.helper = new NewsHelper(config);
	this.datastore = new NewsStore();
	this.component = <NewsComponent store={this.datastore} key={`${this.getModuleUser()}-NewsComponent`} />;
	// this.component = React.createFactory(NewsComponent);
	// this.component = React.createFactory(NewsComponent);
}

}
export default News;`
`import { observable, action } from 'mobx';
class NewsStore {
@observable data = [];
 @action
 add(data) {
     console.log('data added! -> ' + data);
     this.data.push(data);
 }

}
export default NewsStore;`
The module can send new data directly to the datastore with: this.datastore.add('foorbar')
My goal was it to publish new data to a data model (this.datastore) and let react handle the updates. In the react root component I want to dynamically add all components with the datastore from the instanced modules and render the page. If the module gets an update, I can update the datastore with this.datastore.add('foobar') and the component should re-render the page.
But if I understand you correctly, this is not possible with react and mobx.
I have use sockets to update the client?
Thanks.

Right, neither react nor mobx provide a way to push your state to the client. There are different ways to achieve pushing state and using socket.io is just one of them.

I used socket.io, but I have to figure out how to use it with react.
What are the other different ways? Do you have a keyword for me.
Thanks for pointing me in the right direction.

Hi.
You should read about Service Workers and the Push API. You could even use some kind of polling to get updates in your client.
When you have chosen a way to push state to your client you must update your mobx observables and your react components will refresh.

Take a look at the socket branch for an example.

Wow awesome this branch is new!
Cool, thank you very much! This will help me a lot!


Fix typo

Q
A

Bug fix?
[ ]

New feature?
[ ]

New sample?
[ ]

Related issues?
fixes #X, partially #Y, mentioned in #Z

What's in this Pull Request?
Is simply a typo in the documentation of the PropertyFieldSearch control.

Thank you @GuidoZam for the fix!


Review 'ignored' Cucumber tests

There are a number of Cucumber tests which are tagged with @ignore.

If they are to remain with the @ignore tag, we should ensure they are linked to future development tickets so that we know when we can remove the @ignore tag.

104 tests with @ignore tag removed due to being linked to tasks which are now marked as 'won't fix'
21 tests marked as @ignore despite actually passing when run. They have now been reinstated.
20 failing scenarios commented out due to not being able to find a task to copy them to


[fontconfig] Build error

Host Environment

OS: Windows Server 2019
Compiler: Visual C++ 2022

To Reproduce
Steps to reproduce the behavior:
vcpkg --triplet x64-windows install fontconfig
Failure logs
Installing 18/18 fontconfig:x64-windows...
Building fontconfig[core]:x64-windows...
-- Downloading https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.14.0/fontconfig-2.14.0.tar.gz -> fontconfig-fontconfig-2.14.0.tar.gz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' = off
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Downloading https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.14.0/fontconfig-2.14.0.tar.gz
Error: Failed to download from mirror set:
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.14.0/fontconfig-2.14.0.tar.gz: failed: status code 504
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(751):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 7 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 628 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 1.503 min (90172341 us)
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:84 (message):

      Failed to download file with error: 1
      If you use a proxy, please check your proxy setting. Possible causes are:

      1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
         to `https://address:port`. This is not correct, because `https://` prefix
         claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
         , etc..) is an HTTP proxy. Try setting `http://address:port` to both
         HTTP_PROXY and HTTPS_PROXY instead.

      2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.

      3. Your proxy's remote server is out of service.

      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)

      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:309 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_from_gitlab.cmake:174 (vcpkg_download_distfile)
  ports/fontconfig/portfile.cmake:3 (vcpkg_from_gitlab)
  scripts/ports.cmake:146 (include)
error: building fontconfig:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+fontconfig
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[fontconfig]+Build+error
Include '[fontconfig] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
    vcpkg-scripts version: d090b933e 2022-06-03 (9 days ago)

Additional context
This is from an AppVeyor build. I have made sure that the cache is cleared and running vcpkg is the first important thing I do. If it would help to see the build attempt, it's here.

Looks like https://gitlab.freedesktop.org has down, I can't access this url. This issue should be an upstream issue.

It's now back up and this resolves the problem.


[Outlook] (SSO) Fix quick start instructions

Fixes https://github.com/OfficeDev/office-js-docs-pr/issues/2260.

Docs Build status updates of commit 1732ec4:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/quickstarts/sso-quickstart.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

Docs Build status updates of commit ed3a0f5:
:clock10: Pending: waiting for processors (56 builds ahead of you)
:warning: Docs Build is busy, currently there are 56 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

@davidchesnut @TCourtneyOwen Thanks for the feedback. Update to keep the sideloading instructions.

Docs Build status updates of commit ed3a0f5:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/quickstarts/sso-quickstart.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Allow FTM Unity to create level XMLs using levelgen syntax

User Story
As a developer,
I want to standardize how FTM Unity level XMLs are made using the same syntax used for FTM JS in the levelgen files (specifically around the use of [ ]s in match / matchSound levels),
So that we have a standardized levelgen that can still power the level creation process in BOTH FTM Unity and FTM JS.

Should chat with @weepingwitch at check-in on Tuesday on what would it mean if we didn't do this? What if we continued to use older format levelgens for FTM Unity? What would the ramifications be?


Multiple Event Channels Missing from Splunk Inputs

Description of the issue:
The following event channels are not being logged to Splunk
WEC7-Active-Directory: Event channel for collecting Active Directory change events.
WEC7-Terminal-Services: Event channel for collecting Terminal Services and Terminal Services Gateway events.
WEC7-Privilege-Use: Event channel for collecting privilege events.

Thanks @jsecurity101 for uncovering this!

Fixed in #263


VSCode designer - unable to select subscription for gateway with sql connector

Describe the Bug with repro steps
We are unable to add a sql connection to our logic app via the VSCode designer as the Subscription dropdown is not populated.

Create new Logic App project with new workflow via Logic Apps Standard plugin.
Right click on workflow and choose Use Connections From Azure.
Open workflow in designer and dd a trigger.
Add a sql action like Execute SQL Stored procedure.
Enter the connection details.
Under the gateway section, the subscription dropdown is empty, so we can't choose the subscription. The gateway selection box remains disabled.
Click Create New without entering the gateway info results in an Unexpected error,

Workflow JSON
No response
Screenshots or Videos

Browser
n/a
Additional context
VSCode version 1.77.3
Windows 10
Azure Logic Apps (Standard) plugin version v2.2.1 (2023-04-13)

@rllyy97


Test utils for ota-client

This PR provides a set of tools that can setup a dummy multi-subECU environment according to provided ecu_info.yaml file and debugging the multi-subECU ota update behavior.
It includes 2 executable py script:

api_caller.py: a tool that can call API of specific ECU(mainECU or subECU) according to ecu_info.yaml
setup_ecu.py: a tool that can setup a dummy multi-subECU environment by running multiple mini ota_client API server

Please refer to the script's help for more details.

@Bodong-Yang

How can I use subecus mode. How can I set multiple ip_add of secondaries?

Any idea?

How can I use subecus mode. How can I set multiple ip_add of secondaries?
Oh you can just edit the ecu_info.yaml, add new entry for new sub ecu, use ip addr add <ip> dev <interface>  and run python3 setup_ecu.py subecus, the program will set up the subecus according to the ecu_info.yaml.

ip addr add  dev
I see, thanks!


iptables occasionally fails with 'resource temporarily unavailable'

See also:

https://github.com/concourse/concourse/issues/441
https://ci.concourse.ci/pipelines/main/jobs/bin-testflight/builds/441

Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:

[ ] #119662101 iptables occasionally fails with 'resource temporarily unavailable'

This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

Hi @vito, can you tell us more information, such as: OS you're using, which version of Guardian, and provide a working link because https://ci.concourse.ci/pipelines/main/jobs/bin-testflight/builds/441 doesn't seem to load for us.
It also looks like in the concourse binaries you are compiling from source and apt-getting iptables? Just wondering whether there is anything funny going on.
Also, if this is on Ubuntu, do you build a RC version of concourse-lite we can get ahold of?
Thanks,
Will / @albertoleal

OS is the BOSH ubuntu trusty stemcell. The binaries are vendoring iptables v1.4.21, which is the same version as the garden-runc release. Guardian version is whichever sha was in v0.2.0.
IPTables v1.4.21 is built from source and embedded in our binaries, and added onto the $PATH so they won't be using the host's iptables version. I've removed the apt-get since it shouldn't be necessary anymore.
You can grab an RC here: https://github.com/concourse/bin/releases/tag/v1.3.0-rc.90

Here are some failed builds:

https://ci.concourse.ci/builds/1331
https://ci.concourse.ci/builds/996
https://ci.concourse.ci/builds/989
https://ci.concourse.ci/builds/855
https://ci.concourse.ci/builds/577
https://ci.concourse.ci/builds/404
https://ci.concourse.ci/builds/369
https://ci.concourse.ci/builds/339

That this accounts for ~50% of our failed bin-testflight builds.

@williammartin I just noticed something which kinda throws a wrench into things:
https://github.com/cloudfoundry-incubator/guardian/blob/master/kawasaki/iptables/iptables.go#L57
Guardian hardcodes the path to iptables as /sbin/iptables, which doesn't allow us to control the version of iptables that it uses. It's probably not even using the version of iptables contained in the BOSH release, either.
Can we make this an injectable flag instead, just like all the other binary paths? Then I won't need to do $PATH munging either.

Based on that finding it turns out the bin-testflight build was indeed depending on whatever version of iptables were apt-getting. So if 1.4.21 doesn't demonstrate this issue and we can fix the vendoring problem then that might be all we need.

Well this explains a LOT :). Feeding in a path (with a default) seems
totally reasonable to me, and I'd almost bet it fixes the problem here.Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Presumably the ability to pass in a path is a feature you'd desire whether or not it resolves this issue. We should put something in the backlog for this.

@julz sounds good, or you could just label that feature with this issue to have it auto-finish it (cloudfoundry-incubator/guardian#36)

I see this quite often in my concourse (maybe one in 5 containers). I'm using the binary directly on ami-ddf13fb0:
bash-4.3# uname -ra
Linux 49e0400d-2adb-4b2a-6ea0-39f45610cd6e 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 GNU/Linux

bash-4.3# which iptables
/usr/sbin/iptables
bash-4.3# iptables --version
iptables v1.6.0

I'm seeing this also quite often using concourse 1.3.1:
bash-4.3# uname -a
Linux b2ae8224-beb2-4c3d-5823-0bfbed375e8d 4.6.3-1.el7.elrepo.x86_64 #1 SMP Sat Jun 25 11:28:39 EDT 2016 x86_64 GNU/Linux

bash-4.3# which iptables
/usr/sbin/iptables
bash-4.3# iptables --version
iptables v1.6.0

This should now be fixed in the latest concourse (the problem was that the system version of iptables was being used and that didn't end well, we now explicitly support passing a path to an iptables binary so we can ensure it's the expected version). Please re-open if this bug occurs on a recent version of concourse/garden. Thanks!


Weighted GraphSAGE

❓ Questions & Help
Hi,
It seems that edge_weight is not used in the SAGEConv. Is it possible to make it support weighted graph?

They used to support edge weight but removed it in https://github.com/rusty1s/pytorch_geometric/commit/e93e3c58c4edb433cd0ee4e56805369e2d051380. I am not sure if simply revert this commit for the sage_conv.py works.

I think what you're looking for is the GraphConv, which is able to take in edge_weight as an additional parameter to forward.

Thank you! I'll look into it.


Second window randomly opens after recording starts

I think this has something to do with the multi-threaded recording

Seems like the process still gets created, even though no new window gets opened


inconsistency in assignment to global variables

Why assigning to global real is legal in nopython=True while
assigning to global numpy.array is illegal in nopython=True?
import numba
print(numba.version)
output: 0.51.2 (latest in conda)
THIS COMPILES:
a=0
@numba.jit(nopython=True, nogil=True, cache=True)
def f():
a=1
return a
f()
output: 1
DOES NOT COMPILE:
import numpy
maxLen=3
a=numpy.zeros(maxLen,dtype=int)
@numba.jit(nopython=True, nogil=True, cache=True)
def f():
for i in range(maxLen):
a[i]=1
return a
f()
output with nopython=False: array([1, 1, 1])
with nopython=True:
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function() found for signature:
setitem(readonly array(int64, 1d, C), int64, Literalint)
def f():
for i in range(maxLen):
a[i]=1
^
In both examples are assignments to global variables.

Because globals are frozen as constants: https://numba.readthedocs.io/en/stable/reference/pysemantics.html#global-and-closure-variables
In your first example, you're not writing to the global a, you're writing to the local a. If we do:
from numba import njit

a=0

@njit(nopython=True, nogil=True, cache=True)
def f():
    a=1
    return a

print(f())
print(a)

we get:
1
0

Thanks for the question, Numba has a discourse forum which is great for questions like this, perhaps consider posting there next time?
To answer your question, Numba considers globals as compile time constants, here's the related FAQ entry. Hope this helps.

Closing as answered / further discussion should move to Discourse.

sorry, you are wrigt, this was my mistake
now it is consistant
@njit(nopython=True, nogil=True, cache=True) def f():     global a     a=1     return a


Workaround for linker dependency issue

This issue is described here https://github.com/vlfeat/vlfeat/issues/4
These errors appear as a result of http://wiki.debian.org/ToolChain/DSOLinking
that was added between gcc4.4 and gcc4.6.1.
By passing
CLFAGS += -Wl,--no-as-needed
to the linker, the error is resolved. However, this points to an
underlying problem with the dependency structure that should probably be fixed.

Fixed by Andrea's patch: https://github.com/vlfeat/vlfeat/commit/897ab18d38494918eb6b55a6decd4f66795b6687


chore: release main

:robot: I have created a release beep boop
db-service: 1.10.0
1.10.0 (2024-05-29)
Added

Add simple queries feature flag (#660) (3335202)

postgres: 1.9.0
1.9.0 (2024-05-29)
Added

Add simple queries feature flag (#660) (3335202)

hana: 0.5.0
0.5.0 (2024-05-29)
Added

simple queries (#654) (ba77f9e)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/cap-js/cds-dbs/releases/tag/db-service-v1.10.0 :sunflower:

:robot: Release is at https://github.com/cap-js/cds-dbs/releases/tag/postgres-v1.9.0 :sunflower:

:robot: Release is at https://github.com/cap-js/cds-dbs/releases/tag/hana-v0.5.0 :sunflower:


Cannot link to definition

There does not seem to be a way to provide a link to a given definition. It would be handy to have such a thing

@jeffmcaffer this has been removed in this commit from yourself

@storrisi FWIW I would prefer the browser URL bar to be a linkable URL rather than having to click on a button: this is the regular web way.

There may be some confusion here as to the problem. Mechanically deep linking works. For example https://clearlydefined.io/definitions/npm/npmjs/-/async/2.6.0. Philippe, it seems you are saying there is no easy way to get that link. Fair enough. For some reason I removed the "get a link" button and the associated PR here adds it back. As for the browser url bar, that is just .../definitions as it points to a list, not a specific item. We can't use that.
The inspect button opens a pop up (modal) with full details rather than navigating to a new page/tab. That could be changed to be just a link that takes you to a new page/tab. Then users can either click it to navigate or right click and copy url.
Having said that, what we have observed so far is that users like that they have a list, they can drill into an entry and pop right back to the list without disrupting their basic view (no "back" or having to switch tabs, ...)
So summary, the copy URL is more or less like what you see in GitHUb for getting a repo clone url. Suggest we stick with that for now and see the various feedback.


Set RuntimeDefault as default for SeccompProfile

What this PR does / why we need it?:

To comply with restricted:v1.24

Does this PR introduce a user-facing change?

[ ] User guide
[ ] CHANGELOG.md

Which issue(s) this PR fixes:

Related: https://github.com/application-stacks/runtime-component-operator/issues/445

Tests passed in: https://cloud.ibm.com/devops/pipelines/tekton/729b3aea-0a81-4b4d-bd42-7e5811980010/runs/c7768291-7a90-4f39-bb37-e17f5287d7c9/deploy-acceptance-tests/run-stage?env_id=ibm:yp:us-south

OpenShift specifies a default seccomp policy by default, but wondering whether Kubernetes does. If not, in our kind cluster we should see a warning (or error if it has changed from warning).

From what I see here: https://kubernetes.io/docs/tutorials/security/seccomp/#create-a-pod-that-uses-the-container-runtime-default-seccomp-profile, RuntimeDefault is the default value they use for seccomp profile. If seccomp profile is not enabled, Unconfined (seccomp disabled) mode is the default.


Issue SB-6018 feat: Cards Redesign

@harishgilimi
Hi, Can you pls review this pr?

@harishgilimi Pls merge this pr


Overlay remote machine broken.

It's hard to explain but the overlay "drops" as in the objects fall off the screen, I know it's weird, but it shows up for a second or two, and then it's gone.
Tested it on the gaming PC and it's fine, just happens when connecting remotely.

I hope you mean the same as i mean.
I have BS running on my Gaming PC and want to view the overlay in OBS on my Stream PC with "https://reselim.github.io/overlay/?modifiers=rtl,top,?ip=<IP_ADDRESS>,?port=6557"
I've tried it without the port same thing and it looks like this (Yes, Beat Saber is running and a song is being "played")

https://github.com/Reselim/beat-saber-overlay/issues/2
The “dropping” thing is just how the overlay loads.

It won't show in OBS, but on my Gaming PC i can see the overlay :/

Did you click the link to the other issue? The port forwarding thing works for me.

I just did that, and IT WORKS! :O
I have the ip still specified but it doesnt matter as it seems.
Thanks for the help :)


Research the --source hack

https://github.com/bundler/bundler/issues/2016, https://github.com/bundler/bundler/issues/3759
Doesn't appear to work 1.10.x, but does work in 1.9.x.

With a very simple case to dig in on (addressable and rack, rack having no dependencies), I'm able to get it to work with 1.9.10 through all 1.10.x and 1.11.x versions. (work => just update rack) https://github.com/bundler/bundler/issues/3759 has many details, as well as https://github.com/bundler/bundler/pull/3763 which 'fixes' and re-introduces the secret behavior for backward compatibility.

After capturing enough details, decided to put it all in a repo: https://github.com/chrismo/bundler-source-hack


add klaytn network

What was wrong?
Missing safe contract addresses for Klaytn network
How was it fixed?
Added safe contract addresses for Klaytn Mainnet and Testnet
Ref:
Safe address :
Baobab Testnet : 0xfb1bffC9d739B8D520DaF37dF666da4C687191EA
Cypress Mainnet : 0xfb1bffC9d739B8D520DaF37dF666da4C687191EA
Proxy Factory :
Baobab Testnet : 0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC
Cypress Mainnet : 0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC
@gnosis/safe-services

I have read the CLA Document and I hereby sign the CLA

recheck

@Uxio0  Could you please review this and let me know if everything looks good. Thank you in advance !

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
78 unchanged lines in 10 files lost coverage.
Overall coverage decreased (-1.2%) to 87.395%

Files with Coverage Reduction
New Missed Lines
%

safe_transaction_service/tokens/clients/kraken_client.py
3
73.53%

safe_transaction_service/history/services/collectibles_service.py
4
90.48%

safe_transaction_service/tokens/tasks.py
4
89.86%

safe_transaction_service/tokens/clients/coingecko_client.py
6
80.72%

safe_transaction_service/tokens/clients/kucoin_client.py
6
60.0%

safe_transaction_service/tokens/clients/zerion_client.py
8
78.95%

safe_transaction_service/tokens/clients/binance_client.py
11
40.74%

safe_transaction_service/tokens/clients/kleros_client.py
11
64.71%

safe_transaction_service/tokens/services/price_service.py
11
90.11%

safe_transaction_service/tokens/clients/coinmarketcap_client.py
14
47.17%

Totals

Change from base Build<PHONE_NUMBER>:
-1.2%

Covered Lines:
5831

Relevant Lines:
6672

💛  - Coveralls

You need to fix linting. You can run pre-commit run -a

@Uxio0 fixed


LSP server does not starting in 4.0 beta 1

Godot version
4.0 beta1
System information
MacBook Pro m1, Big sur 11.4
Issue description
When I try to open a script file in vim, coc.nvim tries to connect to lsp Godot server. At that moment Godot crashes and vim prints the error, I have attached the screenshot.

Steps to reproduce
Start any project and try to connect to lsp from vim.
Minimal reproduction project
No response

Also having this issue, bump.

Found the problem. It seems that LSP on my code editor is listening for port 6008, however on commit de7873c2d87c3ee8af8c27e35f49767fcc384e75 they changed it to port 6005.
So in my case, since I'm using Emacs, I would have to change my code editor to listen for a GDScript port as such:
(setq lsp-gdscript-port "6005")

It's not a bug from Godot's side, rather that the LSP for our text editors haven't been updated for the new port.
Hope this helps!

Hello! thanks for the answer) I tried with both ports 6008 and 6005, it always fails. In the screenshot below, red lines: <IP_ADDRESS>:6005

Hello! thanks for the answer) I tried with both ports 6008 and 6005, it always fails. In the screenshot below, red lines: <IP_ADDRESS>:6005

Aha sorry, didn't see. Maybe it's an issue with neovim then? Lsp seems to work fine on Emacs.
Hope you get it solved!

Right before the crash, Godot prints this message in the terminal, right at the moment when I try to open the script in vim

It works in 4.0 beta 2!


Bug at CameraXBasic example : camera switch

When calling bindCameraUseCases at camera_switch_button click listener, it doesn't work correctly with Galaxy S10+, Note 8
If I add CameraX.unbindAll() code to bindCameraUseCases() function at start line, it works normarlly.
private fun bindCameraUseCases() {
        CameraX.unbindAll()
        ...
}

Work for me! (Samsung note 9)

@davinnovation does this happen 100% of the time? Do you see any errors in logcat?

@davinnovation does this happen 100% of the time? Do you see any errors in logcat?

100%. Tested on sgs6, sgnote 9.
2019-07-18 13:08:40.998 373-373/com.motify.client E/CameraFragment$updateCameraUi: java.lang.IllegalArgumentException: Exceeded max simultaneously bound image capture use cases.         at androidx.camera.camera2.impl.UseCaseSurfaceOccupancyManager.checkUseCaseLimitNotExceeded(UseCaseSurfaceOccupancyManager.java:61)         at androidx.camera.camera2.impl.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:150)         at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:494)         at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:188)

@owahltinez Yes. When I press the switch button, 100%. - Galaxy S10+ confirmed
In logcat, error occurred just one time with this message
2019-07-18 20:24:29.535 4188-4239/com.android.example.cameraxbasic E/Camera: CameraDevice.onError(): 1 with error: ERROR_MAX_CAMERAS_IN_USE

After this, error message doesn't shown and only this message has logged when
2019-07-18 20:23:13.619 392-392/com.android.example.cameraxbasic D/ViewRootImpl@705f68f[MainActivity]: ViewPostIme pointer 0
2019-07-18 20:23:13.644 392-392/com.android.example.cameraxbasic D/ViewRootImpl@705f68f[MainActivity]: ViewPostIme pointer 1

OK, the problem is that when the camera switch button is pressed, we are trying to bind all camera use cases without unbinding the previous ones first. Thanks for flagging!
I think that the proper solution here would be to call CameraX.unbindAll() inside of the switch button callback, rather than inside of the bindCameraUseCases() function.


why is this for continuous action spaces?

Really cool that you've been working on implementing that algorithm in Python.  I've been thinking of doing this as well. As far as I can tell, you're the only one that's tried doing this yet, so I'm not sure if you're looking for contributors, or if I should just go work on my own.
Either way, I'm just curious though, why is this implementation only for continuous action spaces? Isn't the point of the algorithm to bring the benefits of a DDPG to the large discrete space by mapping the continuous output to a set of discrete actions via the k-nearest neighbor approach?  It looks like you've started working on that, but I'm still trying to figure out your code, so sorry if I'm misunderstanding.
Also, it looks like you're building your own nearest neighbor function here.  Have you looked at using the one in sklearn?

Hi.
I implemented this algorithm because i wanted to use it for my diploma thesis. I am currently working on a modification of this algorithm (in an other repo) that has an adaptable continuous action space, with increased resolution on places that is needed. That's why it works only for continuous. But it is very very easy (just 2-3 lines of code) to make it work for to discrete action spaces too. I can even help you do that if you want.
The part i need for my project is pretty much done so i have no plans on developing something else on this implementation right now (except a deep clean up because i know that the whole repo is a mess and has no results). I think that the code is fully function anyway (except the modification for  discrete action spaces).
I am not building my own nearest neighbor search. I use the FLANN library which is the one that is suggested by the corresponding paper.
Bringing the benefits of DDPG to the large discrete action space is not the only point of this algorithm. There are benefits to continuous spaces too, through the "action refinement". As i developing this agent, i tried both DDPG and Wolpertinger on some domains with continuous action spaces, and it came out that Wolpertinger has better results almost all the times. This is just an observation i made, and i didn't make a research on it because i had to focus on my  modification, but it was clear its happening.
Hope i answered you all your questions. If not, fell free to ask.

From: M00NSH0T<EMAIL_ADDRESS>Sent: 12 February 2018 5:08 PM
To: jimkon/Deep-Reinforcement-Learning-in-Large-Discrete-Action-Spaces
Cc: Subscribed
Subject: [jimkon/Deep-Reinforcement-Learning-in-Large-Discrete-Action-Spaces] why is this for continuous action spaces? (#31)
Really cool that you've been working on implementing that algorithm in Python. I've been thinking of doing this as well. As far as I can tell, you're the only one that's tried doing this yet, so I'm not sure if you're looking for contributors, or if I should just go work on my own.
Either way, I'm just curious though, why is this implementation only for continuous action spaces? Isn't the point of the algorithm to bring the benefits of a DDPG to the large discrete space by mapping the continuous output to a set of discrete actions via the k-nearest neighbor approach? It looks like you've started working on that, but I'm still trying to figure out your code, so sorry if I'm misunderstanding.
Also, it looks like you're building your own nearest neighbor function here. Have you looked at using the one in sklearn?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/jimkon/Deep-Reinforcement-Learning-in-Large-Discrete-Action-Spaces/issues/31, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AThtcU5_f8nd9tEePNZ0TBxE5Dl5xaocks5tUFQDgaJpZM4SCUDK.

Hey thanks for the quick response.  You definitely answered all my questions.  Now that I've read through your code a bit more, I see what you're talking about with the FLANN library.  That's cool about how well it also works for continuous action space.  Really, thank you for building this and putting it up in GitHub. I hope it gets you a job with a really awesome company, like Google.  Maybe your name will be on one of these DeepMind papers one day!
I'm just working on a hobby project of sorts with my own custom openai environment, and I'm having some real problems with dimensionality.  I started out with over 2500 discrete actions in a state space with something like 40k variables, and found it was just crawling along... each step was taking a full second or so to take even with running on a 980Ti/8700k, and that many variables and action space size, I wasn't really getting anywhere with any of the algorithms I tied even when I'd let it train for a few days (I suspect it would take months to find a viable policy).
I've been using Keras-RL for the most part, which I've modified to allow me to filter my actions each step to only allow valid actions.  I also cut down the degrees of freedom of my system a bit, so I'm down to 1500ish actions, which with action filtering, comes down to 500 or so per time step.  It's sped things up by a factor of 5, but I'm still not finding a usable policy in a reasonable amount of time.  There are other things I want to try as well, like using shared layers in Keras to help learn quicker (my environment is mostly comprised of 515 identically sized vectors each describing similar objects concatenated together), but Keras-RL doesn't make that easy to do and it's no longer being maintained.  That's what I've been working on for the past few days, but then I stumbled upon this paper yesterday and immediately got super psyched about this new approach.  Then I found your repo and got even more psyched.
Anyway, I would love to try your code.  Could I take you up on your offer to help with adding those couple lines of code to make it work with discrete action spaces?  I would be super grateful.
thanks!

Sorry for the late response. I didn't get a notification from your response and i just saw it.
Despite the title of this repo, this implementation is not dedicated to actually large action spaces. Even if the algorithm supports it, my code was never optimized to be fast. Handling so many actions each step, is a great deal. and it needs a careful optimization that wasn't my goal for this project so i never did. However, for the biggest action space that i tried, with 10000 action and 1000 nearest neighbors, the average step time never exceeded the 50-60 milliseconds. And despite some very unusual random points that it increased more than 200 ms (maybe case of things irrelevant of the algorithm itself) the step time is pretty stable. I have to mention here that i am not able to use GPU support for the tensorflow, because of my old graphics card. So i think there is another problem on your setup.
From my experience, the algorithm should start adapting to the problem after 1000-2000 episodes, or even 5000 on extreme cases. The average reward seems to slowly converge to a high value after a very high number of episodes. Unfortunately my laptop is not able to run all these episodes in a legitimate time. When i want to check the actual efficiency of a new version agent, i run a sample of 10000 episodes (for environment InvertedPendulum-v1)  that takes a whole day for my old, low performance laptop. I think that it is a decent sample to check the performance of the agent, as it manages to bring results that i think are good. By good, i mean with a decent average reward. But even after so many episodes, with so many steps,  and so much training in every step, there always will be plenty of episodes with low rewards. There are many reason i think this happening, but the point here is that it need some time, depending the environment, the reward system, the random initialization of the nets and some other things.
I am currently working on(almost finished) an update of the data of the agents performance that are stored and presented . After that, i will update the README file with plots with some representative results so it will be easier to check if thing run the way they should on your setup. Also i will add the option of the discrete action space since you need it.
Again. sorry for the late response.

I forgot something.
On action_space module, i initialize FLANN with the algorithm parameter set to kdtree. As presented on the paper of FLANN, this algorithm is better for low dimensional data, but its performance decreases quickly for higher dimensions. I set it like this, because i usually test the agent in low dimensional environments and i had to ensure it will use this nearest neighbor algorithm. If your action space has high dimensionality, you must change it according to the paper, or leave it unset and let the pyflann module to decide.

Hey no worries.  I really appreciate you taking the time to get back to me at all honestly, and it's awesome you're willing to get the discrete part working. I've been able to get my step times down to like 10-20% of what they were originally, so as soon as I can use this with discrete action spaces, I'm definitely going to try it out.

By discrete action space, you mean the discrete actions that are defined by the Discrete class contained on gym (a range of all the integers from 0 to n)? I realized that there are many different options for a discrete action space, so can you make it more clear what you mean exactly?

yes exactly.  I have 1547 discrete integer actions that each do a completely different thing (i.e. they're not just different degrees of the same action type).  If need be, I could probably get this to work with like maybe 50ish actions instead, but I'd lose a huge amount of potential reward by doing that, so I'm whittling my way down as needed.
Anyway, here are the essential lines from my environment:
from gym import spaces
...
self.action_space=spaces.Discrete(1547)

I added the functionality for the discrete action space. Check the action_space module, the class Discrete_space in  branch discrete-and-continuous. All you have to do is to give the agent an environment with action_space=Discrete(n) where n is the total number of the actions you want. After that you can use all the actions in the range [0, n).
I haven't fully tested the code so i won't merge the branch with master for now. It worked for all the discrete environments of gym that i tried, but i don't have the time to ensure it. If you have any problem using it fell free to tell me.

Awesome!  I'll check it out tomorrow.

Hey I'm trying to work with this, but I'm having some problems getting pyflann installed properly in Windows. The precompiled binaries give me a hard error when I try installing and I'm getting errors building from source with the visual studio C++ compiler, so I'm going to have to try some other compilers out. I do also have Ubuntu on here, but some important pieces of my environment are currently only accessible in Windows (via a local MySQL database). Anyway, I'm going to have to figure out which will be less work - getting pyflann working in Windows, or getting MySQL running in Ubuntu.  Probably the latter... Anyway, I'll let you know as soon as I have this sorted out.

@M00NSH0T I've noticed your comments on Keras-RL and multi-discrete action spaces recently, as I'm working through similar challenges. Hate to hijack this thread, but since PMs aren't a thing here, could you shoot me an email at<EMAIL_ADDRESS>I have some questions that I'd appreciate your opinion on. Thanks!

@caclemons sure no problem.  I sent you an email just now. My highest hopes lie with this algo still, but I got sidetracked over the past week with some family stuff and haven't worked through my PyFlann issues yet. I'll be getting back to it over the next few days though.

I'm circling back to this finally...  I just needed to convert the pyflann library from python2 to python3, as @jimkon kindly explained in their issues section. It was a very easy fix. Thankfully, it seems there's no need to install regular FLANN or anything like that, which would be a real pain in Windows.

Ok! I got it running with my custom environment.  Seems to be handling my discrete action space without any errors.  Too early to tell how well it's performing.  The one thing I want to try to modify in here in the short term would be a way to filter the available actions to only consider the ones that are valid. Currently, I have it running just with very large penalties associated with invalid moves. With my other attempts, I was able to have my environment generate a numpy array of 1s and 0s that would state whether each action is valid or not. Ideally, I'd like to try to build that in here so when it does the k-nearest neighbor lookup, it doesn't just look for the one with the largest q-value, but rather applies this filter as well.  @jimkon Any thoughts on how to do this easily? If not, don't sweat it... I'll figure it out eventually here.
Thanks again for updating the code.

If you know at each time which actions are not valid, you can throw them away (and even add new ones). The purpose of the whole action_space module is to make the action space dynamic. It is not obvious in this repo, because i transfer the whole adaption of the action space in an other repo. To do this you need firstly to delete your flann index "self._flann.delete_index()", assign the desired action space to self.__space and finally create another index "for example with self.rebuild_flann()". It is not a costly process to do at each episode, but if you want to do this at each step, maybe it's not the solution you're asking for.
As for the stored files, i don't know why the are so big in your project. The files that appear in the temp directory, are temporary saved files to clear some ram. When the simulation stops, they must merge in one large data file. If you see the data file i have uploaded, it is in total 79 MB zipped, and contains information for 10000 episodes. I have to inform you that it is one of the biggest files i have created from simulation since now. By the way you can choose what to save, or if you want to save data. If you don't want to save anything, you'd better disable the whole system.

Ok got it working. The results I'm getting with this so far blow away everything else I've tried.  It was really important to build in that valid move piece though.  In the end what I did was call my get_valid_actions() function from your main method, then I passed that vector to the Wolpertinger's agent.act() method along with the state. Here's my modified agent.act function:
    def wolp_action(self, state, proto_action,valid_actions):
        # get the proto_action's k nearest neighbors
        actions = self.action_space.search_point(proto_action, self.k_nearest_neighbors)[0]
#        valid_actions=self.env.get_valid_actions()
        mask = np.isin(actions, valid_actions)
        actions2=actions[mask].reshape(-1,1)
        if len(actions2)==0:
            actions2=np.array([1545,]).reshape(-1,1)
        self.data_fetch.set_ndn_action(actions2[0].tolist())
        # make all the state, action pairs for the critic
        states = np.tile(state, [len(actions2), 1])
        # evaluate each pair through the critic
        actions_evaluation = self.critic_net.evaluate_critic(states, actions2)
        # find the index of the pair with the maximum value

        max_index = np.argmax(actions_evaluation)
        # return the best action
        return actions2[max_index]

@jimkon hey sorry I didn't see your last response before I responded... I was distracted by the awesome results I was seeing. What is this saved data ultimately used for here? Is it something I need to save for it to work properly (like network weights), or is it just for analysis / plotting later on?  And how would I properly disable it?  Just comment out data.finish_and_store_episode()? I suspect part of the problem with these files being so large is I have 40k features. I probably also need to beef up the neural network behind this. I'll dig into the code more today either way to try to figure it all out more.

I think that if you had a bigger action space, your filtering would be a very considerable cost to pay at every step. The purpose of wolpertinger architecture is to reduce step's time complexity to O(logN), and i think that even np.isin, and .reshape are very fast, they are still O(N). Maybe rebuilding your action space and flann index after each episode, would make the same result, with a significant drop on the time complexity. But you know better what works for you the best.
All the "data" you see, are for analysis and for better monitoring the functionality of the agent and the progress of the  simulation. They store information at every step about the actions the agent picked, the rewards, observations and some other. You can just comment them out if you don't need them, and you'll be okay.

Understood, though the problem is that valid moves are determined at each step.  Like move 145 might be valid at time step 4 but not time step 5, and so on.  Definitely not idea, but I figured better to at least filter out invalid moves before the critic evaluates them.  It basically shrinks K each time step dynamically, but ofcourse I have to use a larger K than I ideally would to ensure there's something for it to pick from each turn.  I'll look into it some more. Obviously my environment is having to also do some work to generate this vector, though relative to some of the other stuff it's calculating, the cost of that is pretty low.
Regarding the data - do the neural network weights get saved somewhere?  I've been trying to comb through that DQN code to figure it out, but I'm not seeing it.  I usually use Keras because it makes all that really easy to do (I haven't really worked directly with TF much), and I have a Keras-RL implementation of DQN that I might try to integrate instead of this one if the weights aren't getting saved.  Like if I train this for 4-5 days, how do I use it after without retraining?  And I assume the point cloud would have to be re-loaded as well.

No i don't save the weights because i am not trying to add up all the experience. My purpose is to help the agent to adapt and make him bring better results. So each time i run the simulation, the agent initializes its neural networks randomly.
I think that actor and critic parts need a great "rework", not only in the way that they are initialized, but in the way they are trained too. But the surprising fact is that (in my case) even with so many sub-optimal parts and so much randomness, all the simulations are follow kind of a same pattern and bring similar results.

yeah man I'm seeing some really awesome results after just a few hundred episodes.  I modified things a bit so I save the results each turn to a MySQL database, which another program queries every 5 minutes to generate a plot from, along with 50 episode moving average, and my moving average is beating anything else I've tried by a wide margin.  Regular DQN and A3C were my next best, but even after 10k episodes, neither of them found an acceptable solution to my problem, whereas this seems to have zeroed in on a solid solution already and is continuing to improve.  I'm going to let it run another 1000 episodes at least before I totally believe my eyes, but so far so good.
Anyway, I'm definitely going to try using a different network setup, built around Keras though. Once I finish my immediate problem, I'll see if I can generalize it so it can work with an Atari game or whatever and put it on Github, provided you'd be ok with me including some of your code. I'd obviously credit you for the pieces I use.  Mostly I just want to use your Wolpertinger Agent and the associated code with the point cloud, and tie that in with either a Keras-RL backend or build my own Keras based network that would let me save the weights and point cloud every X episodes.

Ok I'm struggling to get how this conversion from the proto-action to the discrete actions is happening. I see both in the paper and in your code that the nearest neighbor lookup is happening using only the proto-action as input (i.e. there's no consideration of the state). But how does this work? How do you take a single decimal number and use it to look up nearest neighbors n-dimensional space? It's not a full coordinate... Like how could the nearest neighbors of a number like 12.53 be discrete actions like 476, 1521, 189 instead of just 12 and 13?  What am I missing?

ok so I'm fairly certain the problem I'm having here is that the proto-action is supposed to be a multi-dimensional point, whereas what I'm seeing when I debug here is a single double. This looks like it's been hardcoded into the discrete space.
class Discrete_space(Space):
    """
        Discrete action space with n actions (the integers in the range [0, n))
        0, 1, 2, ..., n-2, n-1
    """

    def __init__(self, n):  # n: the number of the discrete actions
        super().__init__([0], [n - 1], n)

I didn't dig into FLANN very much, but i think it works with search trees. You insert the action space and you get an "index" which is kind of the root of the tree. Then you search using this index, among the nearest points you initially gave as action space. It's important to note that the search is approximate, and wont always return the actual k nearest neighbors, unless you set the precision parameter to one.
The code works the same for any number of dimensions. I have tried it with 1 and 2 and i am not sure if there is any bug that stops it for working with more. All the components have custom number of dimensions. This number depends on the env.observation_space and env.action_space that each gym.env defines.
There is only one point that the code is set to work for only single-dimensional spaces. This point is the Discrete_space i made for you, because you said you wanted to have a range of integers as action space. In the init function of Space class, you insert the low and high n-dimensional vectors to determine the lowest and highest values of each axis.
Inside Space, i normalize all the ranges to prevent the search of looking only one the most dense dimension. Think of having a 2d space with low=[-1000, -1] and high=[1000, 1], and 10 actions in each axis (10^2 total). In the first axis the actions would be every 200 units, and in the second every 0.2 . The nearest neighbor search would never look across the first axis.

If i didn't answer a question, you can ask again.

thanks. yeah that's all in line what what I've been able to piece together. The main problem here is that while using just one or two axis is probably fine for the continuous use case (think of just breaking down a steering wheel into 360 one degree parts one on axis), with the recommender systems (which is more like what I'm doing), you'd need a lot more axis to really work correctly. Like I guess if you take a 2d plane and chop it into boxes each representing an action it could learn to hone in on the ideal action that way, but the neighbors around it may be completely unrelated and may even be really bad picks. With the steering wheel analogy, if you pick 181, 182, or 183 degrees, they'll all perform fairly well (i.e. on a 1d line, the nearest neighbors will perform similarly) and likely better than 23,24, and 25, but with recommender type systems 181,182 and 183 may be completely different movie genres or whatever and the neighbors you may want to draw from may be 2,69,723,etc. So you'd need those n-dimensional boxes to allow the point to settle near a border that lies between similar action types, which means N needs to be really high... of the same order of magnitude as the size of the action space. I don't think the size of the observation space shouldn't really factor in here, and with the action space just being a range of integers from low to high right now, it's just not going to be compatible.
Anyway, I'm understanding this a lot more now, and I'm pretty sure I know where to go with it now, so I'll spend today trying to make the FLANN piece work in higher dimensional space. Maybe it's just a matter of switching my action space over to a one-hot style vector... I'll figure it out.
Thanks again.

FLANN, actor and critic works for any number of dimensions.
In FLANN you just have to insert a NxM numpy array where N is the number of the points, and M is the dimensions.
Actor and critic take the number of dimensions as input on the initialization.
The whole code is written in a way to work with any number of dimensions. I don't really understand what's going wrong. If you need discrete action space (as defined in the openai gym) you can use the Discrete_space i made, if you need n-dimensional boxes then you just have to use the continuous action space and set the points coordinates to integers. Or else you should change the Discrete_space in a way that works for you.

I've been tracing my way through trying to debug.  I think I'm almost there... been making modifications to the agent and space code so the user can just set the number of dims once manually. The problem is ultimately that a discrete space in openai is just really an integer... there's no Discrete_space.low vector or whatever. So the code is just making a one dimensional implementation of FLANN with 1547 (my number of actions) on that one axis, which just makes no sense.  I does a good job of picking the optimal action, but the nearest neighbors to that on one axis are just random.  Even on two axis, chances are most of the top actions wouldn't be anywhere near each other on that 2d plane.  Really though, I think the dimensions (i.e. axis) used in FLANN should be a config setting in the agent or whatever... not something that's dependent on action_space.n or whatever.  Maybe default it to one or two for the continuous case, and maybe default to the number of actions for the discrete case, but either way I think the user should be able to override this a bit easier... experiment around with it to find the ideal input, like they did in the paper because it looks like that has a huge impact on the overall performance of the algorithm.  I'm currently trying to set that up... it's just taking some time to dig into where things are going wrong since most of my errors now are getting flagged within the FLANN code, and I'm having to step my way through that to figure out where some of these variables are coming from.

The number of the dimensions is dependent on the problem you have to solve. And both the DDPG and Wolpertinger agent you find in this repo are set to work with openai gym. Gym's environments define the number of dimensions first, through the env.action_space on the  src/ddpg/agent.py/Agent class and second through the env.step that restrict the input actions. You have to change these two to make all the components work correctly.

Yeah totally. That's why I think it should be a variable the user can control as opposed to be hard coded as the length of these low and high vectors, which coincidentally the Discrete action_space in OpenAI doesn't support.
env.action space is a mess in Openai. A lot of people are having problems with that.  For instance, no libraries out there seem to support multi-discrete or tuple action space types because everyone assumes that there's an action_space.n variable, which those don't natively support. This leads a lot of people to figure out all the permutations that a multi-discrete action space would have and then just stick those in a giant discrete action space. It's really clunky and kind of a nightmare to work with, but that's what we seem to be stuck doing at the moment. The same people facing this problem are also the ones who would benefit from this Wolpertinger algo the most.  But discrete action spaces don't have these high and low variables that the box does, and so the agent code isn't properly handling it.
I'm about to give up on using this DDPG agent implementation. It's requiring that something be in these high and low vectors for it's tensorflow grad_inverter call to work (and I'm not sure why it's calling that so I'm nervous about messing with it just yet). I've tried defaulting to np.zeros() and np.ones() for the low and high of the size of the action space, but that's not working correctly.
I think I just need to take a step back here and try to do what I was originally planning and migrate this over to use a Keras based DDPG or other some other actor/critic based algo. I'm familiar enough with the base tensorflow code to mess with that directly, and I don't have enough time at the moment to learn it... maybe down the road.

I think you have to understand better how actions_space module works. It's very simple and very basic. You can extend it to make whatever you want very easily. For example the low and high vectors that you need that much are already implemented in the continuous space and there are dozens of ways to make them work for a discrete multidimensional too. If you don't understand this part, i think you will have a big problem doing anything, even if you solve the problem you have now.

hey I think I'm not doing a good job explaining to you the problem I'm having. I understand that module fine. I appreciate the help you've given me. I'm just taking a step back and will make my own code that works directly with pyflann and another keras based actor/critic implementation. I understand pyflann pretty well now and am almost done getting it to work for the large discrete case in 100+ dimensional space. Would have taken my a lot longer to get here without seeing what do did here, so thank you again.

So with stepping back a bit and trying to work fresh with pyflann I was able to figure out my core issue here. Basically, I needed to build my own point cloud to seed pyflann with. The uniform space implementation just blows up as you increase the dimensionality (I'd run out of my 32gb of ram during initialization), so it just requires that each person who uses this logically think through the most sensible way to set up your problem's point cloud in whatever dimensional space makes the most sense so that adjacent points actually should be adjacent. I just did this in Excel with some formulae. I had the origin be "no action" and then I have 515 actions that pair up with counter actions, so those each became the ones and negatives ones on each of 515 axis. Then I had 516 more actions that didn't have counter actions, so those each got their own axis (ie they each became the one point on those axis with do nothing at zero).  This left me with 1031 axis for my 1547 actions. Once I got that all mapped up, I was able to rework some of the other code to accommodate this setup. I had to modify my environment to accept either a single integer action or a 1031 unit long vector for its action input... and made a number of other clunky changes along the way, but it does run. I'm still going to try to port this over to another DDPG implementation though so I can save after training, but I just wanted to let you know I was able to make it run.
thanks again for building this and I'm going to close this thread.

Hello, I'm new in "large action space". And I'm trying to do some work about large discrete action space, however, will it work or could it be appiled for 2^100 actions, such as 100 switches?


Add gem.Sprintf

Instead of needing to wrap results of fmt.Sprintf it would be nice to have a func that does it for us

ehhhhhhhhhhh after further review this seems kinda silly, lets close it


Comments cause entire line to be dropped

Seems like HTML comments should just be stripped, but instead putting one on a line causes that entire line to be ignored. I couldn't really tell if this was a bug in the parser or the strip plugin - hope I guessed correctly ;)
Here's a testcase:
'use strict';

const strip = require('strip-markdown'),
      remark = require('remark'),
      processor = remark().use(strip);

const body = '<!-- comment -->foobar'; // It doesn't matter if there's a space before `foobar`

const plaintext = String(processor.processSync(body));

console.log(plaintext); // should be "foobar" but is "" instead

Version information:
% node -v
v4.8.0

% npm ls remark strip-markdown
<EMAIL_ADDRESS>/Users/alex/Development/HTTPS-Everywhere/utils/issue-format-bot
├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>
Thanks for maintaining remark <3

Thanks for raising this issue!
The problem here arises because an HTML comment at the start of the line “taints” the whole paragraphs as HTML. As an example, I pasted this code:
<!--A comment-->, **importance**, and `code`.

Below:
, **importance**, and `code`.
As you can see, the importance (bold) and code no longer “work”.
A solution would be to not start the line with HTML:
A <!--comment-->, **importance**, and `code`.

Yields:
A , importance, and code.
...and otherwise I wouldn’t really know how to do this in markdown (HTML in markdown is horrible and breaks lots of things). But you could transform the markdown/HTML to HTML first (with remark-rehype and rehype-raw) and then strip all tags?

@wooorm cool, makes sense. This was mostly just a corner case for processing user input, so I think I'll just throw an error if people write this. Thanks for the suggestion though :-)
Am I correct in thinking that we should leave this open, though, since it seems to be a legitimate bug?

Sorry for the slightly late response!

Am I correct in thinking that we should leave this open, though, since it seems to be a legitimate bug?

I dunno, I don’t think this can ever be “fixed”. Other vendors (e.g., markdown-it without html enabled) handle this similar...

As this is handled similarly by other markdown parsers (commonmark, markdown-it, gfm), I’d say this is working as it’s supposed to!

Ah, sorry, meant to close this myself :)
Cheers!


[Chore] Add missing requirement opencv-python

File "/git/seg/medseg/tools/../medicalseg/utils/visualize.py", line 17, in
import cv2

We don't need OpenCV-python except in medicalseg.utils.visualize.visualize and that function is not suitable for 3D images.
For visualization, I think medicalseg.utils.visualize.add_image_vdl is enough, therefore medicalseg.utils.visualize.visualize should be deleted, you can try to change add_image_vdl for 3D slices and add it to the evaluate function.

I doubt whether vdl can show 3d images /laugh. I get the idea. Will look into this when there's free time. Closing this.


Update linear regression example in Jax intro and Flax intro.

Improve example readability and comparability.
Checklist

[x] This PR fixes a minor issue (e.g.: typo or small bug) or improves the docs (you can dismiss the other
checks if that's the case).
[ ] This change is discussed in a Github issue/
discussion (please add a
link).
[ ] The documentation and docstrings adhere to the
documentation guidelines.
[ ] This change includes necessary high-coverage tests.
(No quality testing = no merge!)

Build failure seems unrelated to PR:
module 'jinja2.utils' has no attribute 'escape'
Error: Process completed with exit code 2.

this should now be fixed

Build failure seems unrelated to PR:
module 'jinja2.utils' has no attribute 'escape'
Error: Process completed with exit code 2.

this should now be fixed

yes, reran the tests and they are fine now.


Kinetic: Release Check List

This ticket is used to collect things that need to be done for the upcoming Kinetic release.
Existing Task Sets:

[x] Kinetic kickoff list https://github.com/ros/rosdistro/issues/9945
[ ] Kinetic documentation audit
[ ] Kinetic community documentation audit

Documentation:

Update verbiage on these wiki pages, e.g. 'upcoming release' vs. 'current release': @dhood and @mikaelarguedas

[ ] http://wiki.ros.org/kinetic/Installation

[ ] http://wiki.ros.org/kinetic

[x] Turtlesim icon

[ ] L-turtle name

Checklist from internal Google Drive doc:
ROS Wiki @jacquelinekay

[x] make distroN the default distro
[x] Version macro for distroN needs to be updated from “Expected in distroN” to “distroN”
[x] Manually redeploy wiki once finished by pulling repo and restarting Apache instance
[ ] Update symlink for default API doc: @tfoote

/home/rosbot/docs/api → /home/rosbot/docs/distroN/api
/home/rosbot/latest → /home/rosbot/docs/distroN
(if release is an lts) /home/rosbot/latest-lts → /home/rosbot/docs/distroN

[x] Update http://wiki.ros.org/Distributions

reflect released status (update from pending)

[x] Update http://wiki.ros.org/ROS/Installation to point to distroN
[ ] remove EOL'd from header doc links (@dirk-thomas do you know what this is referring to?)

ROS browse @wjwwood

[ ] update default distro

Communication

[ ] Announcement email pointing to migration guide @jacquelinekay will email ros-users, @tfoote will cross-post
Post to ros-users
Post to blog
Post to G+
Post to Twitter

www.ros.org

[x] Update www.ros.org bottom row widget to point to new release with logo
[x] Update www.ros.org/install to point to new release with logo

@dirk-thomas do you know what "remove EOL'd from header doc links" refers to?

A wiki page with the package template has links at the top to switch to the documentation of a specific ROS distribution. EOLed distros should be removed from that list in order to not let it grow unbounded.

ok, that's what I thought. I'm in favor of this change, but it seems to be a new policy since the templates currently go all the way back to electric.
I think ideally we would hide EOL'd distros on that bar by default and have an option to show the names of EOL'd distros.

ROSBrowse changes: https://github.com/ros-infrastructure/rosbrowse/pull/4

Kinetic is out. There's always room to improve documentation.


WORKSPACE_DIR is ignored / local storage overriding WORKSPACE_DIR

Describe the bug
in my config.toml I set WORKSPACE_DIR to anything, but it is always showing the entire tree of OpenDevin source code repo in the workspace window.
Setup and configuration
Current version:
0.3.1

My operating system:
WSL2

My environment vars and other configuration (be sure to redact API keys):

My model and agent (you can see these settings in the UI):

Model:
Agent:

Commands I ran to install and run OpenDevin:
make start-frontend
make start-backend

Steps to Reproduce:
in my config.toml I set WORKSPACE_DIR to anything
Observe that it's not respected and  the entire tree of OpenDevin source code repo in the workspace window.
Additional Context
running locally, not with docker.
I think it is caused because the browswer local storage seems to be overrideing the config variables.
in the browser local storage I see ALL_SETTINGS as this:
{"LLM_BASE_URL":"http://<IP_ADDRESS>:5000/v1","WORKSPACE_BASE":"/home/user/code/OpenDevin","WORKSPACE_MOUNT_PATH":"null","WORKSPACE_MOUNT_REWRITE":"null","LLM_MODEL":"openai/alpindale_Mistral-7B-v0.2-hf","SANDBOX_CONTAINER_IMAGE":"ghcr.io/opendevin/sandbox","RUN_AS_DEVIN":"true","LLM_EMBEDDING_MODEL":"lokal","LLM_DEPLOYMENT_NAME":"null","LLM_API_VERSION":"null","LLM_NUM_RETRIES":"1","LLM_COOLDOWN_TIME":"1","MAX_ITERATIONS":"10000","MAX_CHARS":"5000000","AGENT":"MonologueAgent","SANDBOX_TYPE":"ssh","USE_HOST_NETWORK":"false","SSH_HOSTNAME":"localhost","DISABLE_COLOR":"false"}

Never mind on this. I realize that it's supposed to use WORKSPACE_BASE not WORKSPACE_DIR as the variable to set.
Also if you try to use an absolute path in WORKSPACE_BASE like "/tmp/workspace" it appears to make it a relative path instead like "./tmp/workspace"

@tpsjr7 sorry for the confusion--WORKSPACE_DIR is no longer supported (it was very buggy).
WORKSPACE_BASE is the new variable to set your directory. In the future, we'll allow setting subdirectories of that via the UI.

Also if you try to use an absolute path in WORKSPACE_BASE like "/tmp/workspace" it appears to make it a relative path instead like "./tmp/workspace"

Where are you seeing this? It should always be absolute...

Also if you try to use an absolute path in WORKSPACE_BASE like "/tmp/workspace" it appears to make it a relative path instead like "./tmp/workspace"

Where are you seeing this? It should always be absolute...

sorry, had a mixup, you responded before I was about to delete that comment. Thank you.


Make progress bar green when receiving complete

What is the motivation for adding/enhancing this feature?

When receiving is complete to the item ordered the progress bar should turn green.

Issue verified and working fine in v2.24.0.
https://jam.dev/c/b597e7b0-fd8f-40e4-abe4-e49d23fef0b0