Bring Your Own Data

Description
Over the past couple of years we've fielded requests to have folks add their own GPX trace data, geojson data, or vector tile data to the map.  This issue will likely be wide-ranging and I encourage folks in our user community to comment with specific use cases that you are interested in seeing come to fruition.
Currently, dragging and dropping Geojson onto the map will display the geojson in a non-editable layer. You can see it, but you can't do anything with it.   If the user brought some .geojson onto the map, we might make a wizard-style importer that says:

Are you interested in bringing this data into the map?
What kind of data is it?
What OSM tags would you like to attach to the data?

We may want to include some sort of assertion that the data being brought is licensed correctly and/or owned by the uploader.

You could also have templates for the data, such that tags get carried over. Say the input geojson has properties with keys of highway and access. Then the way which gets created, automatically gets those tags, and values.

Our Use case: I work for an organisation that has a large fleet of vehicles which send GPS pings every 5 seconds. We internally use OSM for routing, and we have a process which identifies missing roads.
We want to share this back to OSM, but can't share our pings, or these missing roads directly.
What we will like to do, is to have a team of mapmakers, who use these internal sources, and edit the main OSM API, using a feature such as the one described in the OP.

we might make a wizard-style importer

Just my two cents but I would prefer that importing operates more or less identical to the existing workflow for other RapiD sources such as Facebook Roads or Microsoft Buildings. Or in other words, RapiD would provide assistance for the user to quickly manually import specific entities since they would likely also be manually conflating the data. For large scale automated imports I feel that a tool like JOSM is more appropriate but that is just my opinion. This type of feature would be incredibly helpful for small scale manual imports.
I have created a crude mock-up to help illustrate better:

In this mockup the user has selected an object from a GeoJSON file. If the user clicks the 'Use this feature' button, a node/way is then created using the tags from the GeoJSON file. The changeset is then reviewed and submitted via the normal workflow.

In the spirit of sharing UseCases and Workflows, here are a few UseCases that I don‘t have an easy answer to … which RapID could help with and make a lot easier.
Building Footprints/Address
Berlin and Brandenburg both have OpenData about Buildings (including building levels) and Addresses. They are not suited for an import, since they only represent what the Cities know about the buildings officially. But they are a great starting point. It‘s the same with addresses, they need reviewing to be placed correctly (or not at all in cases where there are no houses and no construction on the ground).
AFAIK this is basically what the ESRI cooperation handles; but I never figured out how to get this data into this pipeline to use the core RapID features to handle them.
A „bring your own data“-RapID workflow could looks like this: We pre-process the OpenData in QGIS to filter it down to only missing data. We host a GeoJSON with the current version of that processing. We have a RapID URL with that hosted GeoJSON to start mapping. RapID would ideally allow some process to easily copy the external Data in OSM. A more fancy approach would be to prepare the data with https://github.com/ngageoint/hootenanny (at least I think this is a tool for this use case) to improve shapes and position of existing buildings., but I never looked into this.
General UseCase: Increase Trust in OSM Data
To share a motivation that is driving a lot of work with external data sources:
We work with administrations in Berlin and other Regions in Germany to help them use processed OSM data for their decision making. An important topic is, to build trust in OSM data in terms of „up to date ness“ and „completeness“. One proxy for those is to take different OpenData sets and compare them with OSM data to create tasks to check the Data. We use this for a number of UseCases. But the Workflow is complex and disconnected.

Zebra Crossings: We took two different open datasets, created a delta to OSM with buffer in QGIS, hosted the GeoJSON and created a MapRoulette Challenge. Each task was a zebra crossing that the city claims exists. Results where: Some where missing and added in OSM. Some where mistagged and corrected in OSM. Others where very badly positioned in official data, so OSM based on areal images was more precise. Other could not be found on areal images or Mapillary at all.

Detailed links (MapRoulette, Data, Processing) via https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Parkraum/Mapping_Kampagne_Xhain/QA-Zebrastreifen and https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Parkraum/Mapping_Kampagne_Xhain/QA-Zebrastreifen-Strassenbefahrung

Parklets: There is OpenData on Parklets in Berlin. We use the same process to add them. Since there is no Preset for Parklets, yet, we have a task list in MapRoulette that Mappers should follow when editing in ID/JOSM which is not a great way to explain what and how to map.

Detailed links (MapRoulette, Data, Processing) via https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Parkraum/Mapping_Kampagne_Xhain/QA-Parklets

Driveways: For our parking processing we process driveways (which translate to no parking for a few meters). Berlin has old OpenData on those. We use the same process described above.

We did not document this one, yet. Maproulette is at https://maproulette.org/browse/challenges/28466

Road side parking: Same as above but for Places where parking is only allowed in small areas next to the road. Again, the broader topic is to use the open data available and check it on the ground or with Mapillary to only import what we can tell is still present and still correct. In the end we can claim to have validated OSM data against the best official data available and checked that data in the process.

Detailed links (MapRoulette, Data, Processing) via https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende/Parkraum/Mapping_Kampagne_Xhain/QA-parkbuchten

Drinking water: Same story but different Group and Data: The goal is to make user all public drinking water places are in OSM and are well tagged.

https://atiptap.org/projekte/wasserwende/openstreetmap/, https://maproulette.org/browse/challenges/28303
Help with data preparation
A big issue with all those topics is preparing the external Data to create tasks for OSM. For most of the simpler datasets this can be done with QGIS with a few steps:
take data > take the center point > make a buffer > create OSM data > take the center point > make a buffer > find intersections of both > filter those without intersection > recreate point data of the buffer > polish the data properties (I like adding a custom task property with dynamic Mapillary Lookup that I use in MapRoulette as a Task Description).
There is no tooling out there, that makes this easier AFAIK. There is also a lack of direct tutorials on this stuff. So my nudge is, that improving external data handling in RapID might also be about improving the pre processing or creating some educational content (screenshare-sessions) on how to prepare data well.
General Idea: MapRoulette integration
Most of the Examples above use MapRoulette to store the status of Tasks and an overall Status of the Project. I like the fact that MR allows user to use the editor they like but still work on the same Tasklist. And that I get an overall status of the progress. So I wonder if a feature to handle external data in ID could be focused on integrating MR. At some point, I hope more editor – especially on the ground editors, see https://github.com/osmlab/maproulette3/issues/1737 – will pick up this theme and provide a data validation / adding experience that is even closer to the task in question (like: I am standing next to it…).
General Idea: Merge external and OSM Data
A low hanging fruit would be to make it easier to copy a set of tags that are provided within the external data to copy into an OSM object. That could be a „osm_tags“ property of a geoJSON (multilingual or array). Or just making the RapId UI a DIV instead of the table of readonly input fields.
More fancy would be to provide a UI to do some custom mapping, but that becomes too complex very fast… Even more fancy would be a way to select OSM + External Objects and have a merge UI/Action. (UIs that merge Address-Data could come to mind for this.)
General Idea: List next task nearby
One thing I missing when working with external Data as an overlay is something that will guide me to the next piece of data that needs adding. MapRoulette has a „next task nearby“ feature, but that external. External Data in ID can only be navigated visually (right?), so whenever the data is not dense (but spread around the city) it is hard to find the next „task“.

Hope that provides some inspiration.

One thing I missing when working with external Data as an overlay is something that will guide me to the next piece of data that needs adding. MapRoulette has a „next task nearby“ feature, but that external. External Data in ID can only be navigated visually (right?), so whenever the data is not dense (but spread around the city) it is hard to find the next „task“.

I believe that for this case it would be better if you didn't have to reload the ID or RapiD completely with each new task and also it would be nice to support Maprolette Cooperative Challenges

This would be a very helpful option, to specify another Open Data API to pull from and assist with adding authoritative data

The JOSM MapWithAI plugin has the ability to get data and add data from additional sources.
We should probably set down and put together a format for that -- right now, the plugin reads https://github.com/JOSM/MapWithAI/blob/pages/json/sources.json for all sources, and I don't know if the json format makes sense for Rapid, and it currently isn't set up for data sources that haven't set up mappings for their keys to OSM keys.

One very simple piece of this I want to suggest focus on is what @tordans mentions, an "osm_tags" property.
For example, if the user opens a local geojson in Rapid, it could have any format, and the geometry is displayed. however, if the Rapid editor senses it has "osm_tags", it should then enable the use/ignore buttons and be suggesting any tags in that. Could maybe do a tag lint check, but mostly just trust the input as-is. So format would look like:
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "amenity": "restaurant",
        "name": "Casa d'Oro",
        "cuisine": "Italian",
        "addr:city": "Modena"
      },
      "geometry": {
        "coordinates": [
          10.45683300592367,
          46.06594839555103
        ],
        "type": "Point"
      }
    }
  ]
}

A PMTile, a vector tile endpoint, CSV or other filetypes could have the same expectation. Any key/value in the properties will be converted to OSM tags. If it does not exist in the presets... that's another issue. We could argue that at least 1 of the key/value pairs should be matching the presets or it throws an error, or could throw an error with an override option.
If a tile layer is used then the changeset should reference that tile layer as a source, and could otherwise reference the geojson filename as a source (which may be not useful anyway, but helps establish some possible trail of source evidence in case reverts or license checks are needed).

I would love to suggest adding this so we can make the IDEditor as a simple way where other websites can point to this as an official way to add informations into OpenStreetMap in a simple way
https://github.com/openstreetmap/iD/issues/10247

Hey @bhousel, following on from https://github.com/openstreetmap/iD/pull/10407#issuecomment-2288698548, if RapiD were to support custom data, would it only support creating new features, or would it also allow editing/moving/deleting features?
If the plan is to only support creating features, I think this could be implemented already (?) since there's no ambiguity around converting a geojson file into osm features

if RapiD were to support custom data, would it only support creating new features, or would it also allow editing/moving/deleting features?

@k-yle I think a good way to go into more details is to write down the usage scenario behind those features.
Most Szenarios I have in mind fit the use case of a MapRoulette + Fix-Tag Featureset where users can quickly work down a list of tasks but the whole thing is user driven and guided; every step can be checked.
Thinking about a different example:
If I where to take lokal Berlin Building OpenData and either filter them down to only missing buildings (only create) or even do some https://github.com/ngageoint/hootenanny (or something similar) processing to update existing geometries (create+modify). I would still want a way to quickly check and accept/reject each change, to validate the data, right? So ideally this dataset would be placed into the quick-check-import-or-reject-layer that Rapid uses for the regular rapid datasets.
If this separate layer where not there and the loaded data where merged into the loaded OSM data, how would I see which objects are modified, what the modifications (tags, geometries; similar to OSMCha?), and would there be a way to list them? I never saw how JOSM does this kind of thing but I image the changes would be more visible there?
I just read about this planned import of some official data of one state in Germany https://wiki.openstreetmap.org/wiki/Organised_Editing/Activities/Entwicklungsagentur_Rheinland-Pfalz#Geplant (and I want to learn more about what they are doing) but it sounds like they did all this checking and validating beforehand and now have a "finished" file that they only plan to upload(?). IMO all the hard parts to check and merge the data happened elsewhere. But it sounds like this would be the usecase for the feature from https://github.com/openstreetmap/iD/pull/10407, right? It's just, that I am not sure that this is really a win for Rapid/iD, especially given how parts of the community tends to talk about tools that are not JOSM and work in this area.

Hey @bhousel, following on from openstreetmap/iD#10407 (comment), if RapiD were to support custom data, would it only support creating new features, or would it also allow editing/moving/deleting features?

We're open to anything, as long as people find it useful.
I guess ingesting an osmchange file would cover all those situations.  As far as I know, people mostly use JOSM to work with these currently.

@k-yle I think a good way to go into more details is to write down the usage scenario behind those features.

@tordans for the NZ address import, this is the process (using RapiD):

the user opens our fork of RapiD
they load a "task", which is a geojson file.
An example geojson file might contain: 2 features to be edited, 1 node to be created, and 3 to be deleted
The user continually presses Zoom to Next (shortcut G) to open the next feature in the geojson file
Once the next geojson feature is selected, they can accept the tag-fix or ignore it. Same process for creating or deleting a feature

For my use-case, it would amazing if RapiD allowed the user to import their own geojson (or osmChange) file, and showed a prompt like this for each feature.
My use cases consists of 3 distinct features:

importing your own data as if it were a ESRI datset (#585)
supporting tags changes and deleting features (discussed in #585)
adding a panel or shortcut so users can jump to the next closest feature in the dataset (no issue)


Document textures/{terrain,item}_texture.json

The following files:

textures/terrain_texture.json
textures/item_texture.json

are not documented well. The following fields look to be optimisations but since they're not explained, content creators (and marketplace partners) have been unable to take advantage of this.

num_mip_levels (Mipmap stuff? Sacrifice gpu mem for render performance?)
texture_name (Creates a new texture for gpu? How would this benefit people?)
resource_pack_name (Association? Is it used to merge textures?)

Hi, @GTB3NW,
I did some research and talked to the team and it appears this way of making custom terrain and item terrain using textures are no longer used. Check out this Resource Pack tutorial for customizing those textures.
https://docs.microsoft.com/minecraft/creator/documents/resourcepack


Typo

SOGA 是WSDM24的文章

You are right. At the time of paper collection&survey writing, SOGA has not been published yet. In fact it has appeared on Arxiv for years until being accepted


feat: add store for history

feat: add store for history
What does this PR do?
Adds a notification system / store for history so the frontend can be
notified and correctly retrieve the file history.
It "refreshes" based on file change, deletion or creation.
Screenshot / video of UI

N/A
What issues does this PR fix or reference?

Closes #188
Part of #150
How to test this PR?

[x] Covered by tests

Signed-off-by: Charlie Drage<EMAIL_ADDRESS>

Updated with changes!

@deboer-tim Moved the const to history.ts instead of the shared folder, ready for a re-review


Return allocated funds together with /balance

Return not just the raw balance, but also the allocated amounts when running the command /balance
also, maybe round all values to the nearest milli-satoshi?
e.g.:
Total Amount Allocated to Laisee: 2516
Available Balance for New Laisee:<PHONE_NUMBER>0000008```

return same info as 'Create Laisee' for /balance and button 'Get Balance'
https://github.com/bitkarrot/laiseebot/commit/2f49def841aea6d707c89174651ad67b810c0949


flip directions / support bidirectional edges

needs some thinking, should the direction be a display state?

specifying reversability in property, setting in edge
specifying bidriectionality in property


Problem while using the code

Hello @miyosuda,
Thanks for sharing the code, please ignore the title, I tried out your code with the control problem of cartpole balance experiment instead of Atari game, it works well. But few questions want to ask.
I am curious, in the asynchronous paper, they also used another model implementation with 1 linear layer, 1 LSTM, layer, and softmax output, I am thinking of using this model to see whether improve the result, can you suggest how the LSTM can be implemented using tensorflow in the case of playing atari game?
Also wondering that the accumulated states and reward were reversed, do you need to reverse the actions and values as well? Although it did not make any different when I tried out,  just wondering why.
states.reverse()
rewards.reverse()

Last, do you really need to accumulate the gradient and then apply the update, since tensorflow can handle the 'batch' for update.

I'm really grad to know that you've succeeded to reproduce continuous model.
About the reverse(), I've forgot to add
actions.reverse()
values.reverse()

in addition to
states.reverse()
rewards.reverse()

and I've pushed the fix just now. Let me explain why there are reverse() of lists.
In pseudo code of A3C algorithm in deep mind paper, there is
for i in {t-1, ...., tstart} do

This means that "i" will decrease like
t-1, t-2, t-3 ... tstart

This is why I put these reverse() for lists collected in the loop.
As far as I tried with Atari model, I still couldn't reproduce good learning result. I was planning to implement LSTM after being able to reproduce good Atari result, but as you say that you've succeeded with continues model, I should try LSTM now.
Please wait.
About the batch, let me think about whether it is possible to replace it with batch or not.
Just a moment please.
Thank you for suggestions!!

Many thanks for reply, and glad to hear that you also plan to work on the LSTM model.
I just uploaded the testing codes (based on this repo) for the "batch" update that mentioned.
https://github.com/originholic/a3c_vrep.git
I only tested it with the cartpole balance domain, but somehow I found it actually take longer time to reach the desired score than your implementation. I will try to investigate this later,  as now I will continue to work with your implementation to study the LSTM model, which I am not familiar with.
Also Instead of constant learning rate:
v = log_lo * (1-rate) + log_hi * rate

Don't know whether the random initialization of learning rate that mentioned in the paper can help to improve the results:
math.exp(random.uniform(log_lo, log_hi))

I just uploaded the testing codes (based on this repo) for the "batch" update that mentioned.
https://github.com/originholic/a3c_vrep.git

Thanks! I'll try.
About the LSTM, I'm also new to LSTM and just started studying it recently, so please don't expect too much! However I'm really interested in 3D labyrinth model with LSTM, so I would like to try it.
About the randomizing learning rate with log_uniform, I also used to randomize initial learning rate for each threads with log_uniform before. However when I looked at the graph on page 23, I found that learning rate varies from 10^-4 to 10^-2, uniformly distributed with log scale sampling.
So my understanding of log_uniform function is that they are using log_uniform for finding best hyper parameter when they use grid search for it.
(In the graph on page 14 and page 22, they are also using log scale for grid searching parameters.)
However, I'm not sure my understanding is correct.

Thanks for pointing out.
After re-think about the random initialization, I think you are right about it, the initial learning rates sampled from the LogUniform range were used to demonstrate the sensitivity of their methods. And it makes sense that a constant (or best choice) of learning rate is apply for RMSPROP and decay to zero over time.
Sorry, it is my bad, just got confused when they use the phrase in the paper.

"each using a different random initialization and initial learning rate"

No problem. Any suggestion and discussions are always welcomed. Thanks!

Hi, tuning in again.
May I ask that in the case of continuous action domain of the asynchronous paper, they used two policy outputs of a linear layer and a Softplus activation + linear layer to represent the mean and variance. I am wondering how policy loss can be calculated with two outputs?
self.policy_loss = -( tf.reduce_sum( tf.mul( tf.log(self.pi), self.a ) ) * self.td + entropy * entropy_beta )

I am thinking of calculating the loss separately, by making 2 of the above policy loss function for the outputs. Does this make sense to you?
Sorry this might be out the scope of your interest, as 3D labyrinth doesn't require continuous actions, but any suggestion is highly appreciated. Many thanks!

I have never tried continues model, so today I looked into other Simple Cart-Pole Actor-Critic sample without NN to learn about it.
How to define loss for policy for continues action is still difficult for me, so I'll try continues model with creating branch.
(I'm also interested in continuous model too)
Maybe it will be natural to make two different loss function for mean and variance, but I'm not sure now.
I'll try to figure out.
By the way, even with the discrete action model I'm implemented now, the policy loss function is the most difficult part for me and still I'm not certain this is 100% correct.
However, when I tried simple 2D grid maze model (which I implemented in debug_maze branch), this program succeeded to find shortest path with this policy loss function. So the that loss function for discrete action seems fine.
Anyway, I'll report here if I found any result with continuous model.

Thanks for the reply.
As far as I know from your codes, the policy loss function for discrete domain is calculated using the negative log-likelihood of the softmax function.
After doing some searches, may be I can apply the same loss function eg. negative log-likelihood, but instead of softmax function, a Gaussian (Normal) distribution function can be used instead since the outputs have mean and variance. So I think the loss function looks like by following the formula:
D = tf.to_float(tf.size(self.a))
x_prec = tf.exp(-self.log_sigma2)
x_diff = tf.sub(self.a, self.mu)
x_power = tf.square(x_diff) * x_prec * -0.5
gaussian_nll = (tf.reduce_sum(self.log_sigma2) + D * tf.log(2 * np.pi)) / 2 - tf.reduce_sum(x_power)
self.policy_loss = gaussian_nll * self.td + entropy_beta * entropy

Sorry for the messy typing, I will try this out to see whether it works for the continuous cartpole domain, and let you know how this goes.
Thanks

Is this the explanation of this loss function?
http://docs.chainer.org/en/stable/reference/functions.html#chainer.functions.gaussian_nll
I really want to know the result. There is a lot to learn from this thread for me. Super thanks!!

Yes, that's right, the negative log-likelihood of normal distribution is from the chainer site, but I also found another called maximum log-likelihood, I think they are the same thing by looking into the formula alone. Same here, there are lots methods out there waiting to be learned and get confused.
Tried the loss function based on your code, it works moderately well with cart-pole balance task of continuous action domain, at least it is able to converge (or said reach the desired score). But possibly need some more examples to study the codes in order to draw conclusion that the loss function actually works for continuous action. So keep working on it.
However when I turned back to try it with the "batch" method, it reached a score of around 2000(desired score was 3000), the network somehow diverged immediately(I am not pretty sure it was diverged or not, or explode, the network just gave "NaN" for its output all the time).

Thank you for reporting.
I was trying batch with my discrete action code in "batch" and "debug_maze_batch" branch.
I'm checking whether gradient accumulation is working correctly when batched.

@miyosuda:
Hey, I had been trying to implement the same, on Theano. Implemented an A2C version (single thread), which obviously never converges inspite of training on GPU, for even a week or so... Came across your git source. Could you please let me know what exactly are the issues that you are facing right now, that makes your learning still not as good as required? Is it NaNs and stability; or no-convergence of the network? We can try to catch up on this, as I am also in urgent need to have an Actor Critic learner on Pong.

@aravindsrinivas
Thank you for joining the discussion.
Let me explain what I tried, what I succeeded and what I have not succeeded yet.
I have beed trying pong with A3C with CPU 8 threads.
The problem is that the score of the game does not increase even with one or two days learning.
The AI can hit back tree or four times in one game, but the score does not increase like the deep mind paper shows.
(As far as I'm trying with pong, the network does not diverges like NaN)
To confirm whether my implementation has a problem or not, I tried easier task.
I implemented 10x10 grid 2D maze, and let this A3C algorithm to find the shortest path.
After running two or thee minutes, the AI converged to optimal result. (It succeeded to find the shortest path)
I tried this in "debug_maze" branch.
After confirming that this algorithm can solve easy RL task, I'm changing hyper parameter little by little to check whether the game score will increase like paper shows.
But the result is still same.
I once heard that the DQN is very sensitive with hyper parameters, and as far as I see the paper, hyper parameters of this method seems sensitive.
Along with tuning hyper parameters, I'm also planning to try another task, task that doesn't use CNN.
By the way, the key concept of this method is to get the stability of the network by running multiple threads at the same time, not to diverge or oscillate.
So if you have problem with single thread, how about trying multiple threads?
I have never tried Theano, but if you would like to run it with TensorFlow, I can help you.

@miyosuda
I mailed the authors (from DeepMind). These are some hyper parameters that they explicitly told me in the mail:
The decay parameter (called alpha in the paper) for RMSProp was 0.99 and the regularization constant (called epsilon in the paper) was 0.1.  The maximum allowed gradient norm was 40.  The best learning rates were around 7*10^-4.   Backups of length 20 were used which corresponds to setting the t_max parameter to 20.
Also, I am not sure if you used the frame skip in your implementation. From what I saw in the game_state.py, you just have a reward = ale.act(action)? Shouldn't it be in a for loop like
for _ in range(frame_skip):
reward += ale.act(action)
Also, are you clipping the reward to lie between -1 and 1?

Wowwowow! They are the parameters what I really wanted!!! Super thanks!!
I was always using t_max with 5 and didn't use gradient norm clipping.
(In the paper there was only one line just referring gradient norm clipping, so I didn't tried it)

also, I am not sure if you used the frame skip in your implementation
I've set the frame skipping with every 4 frames at "ale.cfg" file, but as you say it might better to put loop as you suggested.

I'm not clipping the score, but ALE pong gives reward 1 or -1, so it will be ok.
Anyway, super thanks for giving me such a valuable information!!! I'll try these parameters.

@miyosuda
Another question: How exactly are you synchronizing the RMSProp parameters?

I'm accumulating gradient t_max times in each thread, and after that I'm applying these accumulated gradients with shared RMSProp. When applying accumulated gradient, "rms" parameter is shared among threads.
"momentum" parameter in RMSProp can be shared, but I'm not using momentum in RMSProp because there was no referring with momentum in RMSProp in the paper.
(I'm applying 0.0 as momentum constant in RMSProp)
When applying accumulated gradients with shared RMSProp, I'm not using any synchronization like mutual exclusion among threads.
(Is this what you are asking?)
As far as I see the source code of TensorFlow, it seems ok to apply gradient without lock when running on CPU.
(To run it on GPU, I need to research more to check whether we can implement shared RMSProp with GPU or not, because memory handling on GPU might be different from CPU.)

Shouldn't we lock another thread from updating the parameters of the global network, when one particular thread is already updating it with its accumulated gradient from t_max steps?
My question was related to RMSProp previous gradient values. We do a moving average of the RMS of the gradients right? And the RMS is used to determine our update of the parameters. My question is: Would the gradient values of different threads all be used together to update the moving average of the RMS? Or do we have separate moving averages for each thread, which is used when that corresponding thread is updating the parameters using its accumulated gradient?
In the paper, they consider both the approaches, but say that having separate RMSProp parameters (mainly the moving average) has less robustness than sharing the moving average. But they don't reveal how exactly they synchronize the moving average across threads.
Could you explain what you are doing?

@aravindsrinivas
Sorry my mistake, while checking my code, I found that the moving average of RMSProp is not shared. So my current implementation is not shared RMSProp.
I'm created RMSPropApplier class in rmsprop_applier.py
In this class, slot named "rms" corresponds to parameter "g" in the paper.
(The "rms" slot parameter will be passed to native code around here)
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/kernels/training_ops.cc#L143
I created this class to share this "rms" parameter among threads, but I found that RMSPropApplier class is created in each thread in a3c_training_thead.py.
So the moving average is calculation differently in each thread. I need to fix this.
Sorry about that.

@miyosuda
Hi, I also confirmed that

the critic learning rate must be half the actor's..
the LR must be linearly annealed to 0 over the course of training.
the parameters 'g' and 'theta' (moving average of RMS of gradients and of course the parameters) are shared across the threads. (Unlike your earlier version of having separate RMS moving averages). Also, there is no need of locking and updating.
t_max = 20 means 20 perceived frames (80 with Frame skip as per game)... Not 20 states .. ie not 20 84844 tensors, but rather 20 84*84 frames...

A question: Could you tell me at what speed (steps per second) [where step refers to a decision taken from the network in gameplay] the code runs, for the 8 thread version? DeepMind says they get 1000 steps/sec from 16 threads, and thus for a single thread, it should be 70. But I was never able to run at 70 for my single thread code.. It used to run at 30.

Thank you for providing such a valuable information again.

the critic learning rate must be half the actor's..

I got it. I'll set the LR for actor starting from 7*10^-4, and 3.5 * 10 ^ -4 for critic.

the LR must be linearly annealed to 0 over the course of training.

I got it. I've already implemented LR annealing.

the parameters 'g' and 'theta' are shared across the threads.

I see. I'm now testing sharing 'g' in "shared_rmsprop" branch. Later I'll merge this to master branch after confirming.
In my implementation, 'theta' corresponds to variables in global_network instance.

t_max = 20 means 20 perceived frames

I wanted to ask about this too.
I used to implement frame skipping with "ale.cfg" file with "frame_skip=4" option.
When using this option, every time we call ale.act(chosen_action), frame will advance 4 frames.
So I was storing frames for each state during one backup sequence (sequence of 5 states) like this.
(pattern A)
state[0] = { 0  4  8 16}     <- frame0, 4, 8, 16
state[1] = { 4  8 16 20}
state[2] = { 8 16 20 24}
state[3] = {16 20 24 28}
state[4] = {20 24 28 32}

Another way to store frames with 4 frame skipping is
(pattern B)
state[0] = { 0  4  8 12}
state[1] = {16 20 24 28}
state[2] = {32 36 40 44}
state[3] = {48 52 56 60}
state[4] = {64 68 72 76}

If we choose pattern B, one chosen action will continue along with 16 frames.
How should we implement frame skipping with t_max=20?
If you have any idea about this, please teach me.
About the speed of running steps, I'll check it on my environment and please wait a minute!

@aravindsrinivas
I've checked the running speed.
I'm outside now, so I checked it with my MacBookPro (Intel Core i7 2.5GHz).
It was 106 steps per second with 8 threads. So it runs 13 steps per thread.
I have another Core i7-6700 Desktop machine, and I remember it was x1.5 (or x2?) times faster than my MacBookPro.
(I'll check with Core i7 machine later)
Anyway, speed on my environment is much slower than DeepMind's.

@miyosuda
That's quite slow I guess... Maybe I got 30 steps per second for single thread, because of the GPU. I can't understand how DeepMind got it working with 70 steps/sec for a single thread. That's actually almost as fast as running DQN on GPU.
So, your code is about 5 times slower than DeepMind's I guess...  But we can still reproduce results with 1-2 days of running.....

When I implemented, I had it the same way as Pattern - A (0,4,8,12), (4,8,12,16), (8,12,16,20) , .... Even in DQN, that's the way they do it.
What we should do is - say we are '0', we take an action, repeat it 4 times. We would execute 0->1, 1->2, 2->3 and 3->4 using the same action that was decided at 0.  We now again decide on action at '4', execute 4->5, 5->6, 6->7, 7->8 (4 repetitions) and decide on an action at '8', .. and so on.
Our states would be (0,4,8,12); (4,8,12,16); (8,12,16,20) .... . Since they say t_max is equivalent to 20 perceived frames, we must stop at (64,68,72,76). ie , you stop once you decide on an action at 76th frame, and repeat it 4 times to get to the 80th frame. 80th frame (with past 3 perceived frames 68,72,76) would be our s_{t_max} , which is used to calculate our target through V(s_{t_max}). We would have 17 tuples (0,4,8,12) , (4,8,12,16) ..., (64,68,72,76) for s_{t} for t = 0 to t_max - 1. s_t_max would be (68,72,76,80)

Hi, I also found this repo after trying to implement A3C from the DeepMind article, it's nice to see progress! However, when running the implementation the agents seem to only perform three actions from the legal action set given from the ALE interface and these action corresponds to idle, fire and right. Could this be a result from the provided pong binary being problematic or the set ACTION_SIZE of 3?

@joabim
I think it is because the ACTION_SIZE is set to 3. He is using only the legal actions allowed for the Pong game, and Pong has only 3 actions (moving up/down/staying idle).

@aravindsrinivas
You're right! But for some reason, instead of up/down/idle my runtime printouts seem to suggest that the agents perform the actions noop (0), fire (1) and right (3) according to the arcade learning environment documents but maybe I'm misinterpreting the minimal action set. Do you get a moving paddle?

@aravindsrinivas
Now I understand what you mean. I'll try that way too. Thanks!
@joabim
Thank you for joining the discussion.
It seems strange to get [0, 1, 3] from pong game rom.
I tried this code,
from ale_python_interface import ALEInterface
ale = ALEInterface()
ale.loadROM("pong.bin")
real_actions = ale.getMinimalActionSet()
print "minimal actions=", real_actions

and I got the result
minimal actions= [0 3 4]

[0, 3, 4] means [idle, right, left]
Could you try the code above?

@joabim
Ah there is a function named getLegalActionSet() in ale, and I also tried it.
from ale_python_interface import ALEInterface
ale = ALEInterface()
ale.loadROM("pong.bin")
leagl_actions = ale.getLegalActionSet()
print "legal actions=", leagl_actions

and the result was
 legal actions= [ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17]

So I think getLegalActionSet() is just returning all default actions. Which function are you using, getMinimalActionSet() or getLegalActionSet()?

@miyosuda
Exactly, when I invoke getMinimalActionSet() I get
[ 0  1  3  4 11 12]
so I'm wondering what has happened. I have tried rebuilding ALE but it doesn't change.

@joabim
Are you using same rom as I'm using?
And the file name of the rom should be "pong.bin"
(Because ALE seems detecting the game rom type from file name)

@miyosuda
Indeed I am! However, I'm using python 3.5 and anaconda, there could be some problem using loadROM(...) and bytes literal as input (I had to prefix the pong.bin with b to get it working), the ALEInterface displays the correct information in the terminal though... I could set up a python 2.7 environment and try again

@originholic
Hi , I adjusted the epsilon in your implement to 0.1 and it converged. Thanks to the hyper parameters from  @aravindsrinivas
And, I like your implement :+1:

I think the entropy beta must also be set to 0.01. It is 0.1 in the paper.

@zhuchiheng
Thanks for trying out the code, yes the lock for the env is not actually required, it is there because I copied directly from my other project, and didn't manage to clean up the code, and I think it can still reach the desired scores as long as the epsilon is larger than 0.001 if you run the cart-pole environment. Also need to fix the initial learning rate instead of random initialization, probably reach the desired score faster.
@miyosuda, @aravindsrinivas
Wow, I think I will have a lot to catch up since been away for a while, and very thanks @aravindsrinivas for the hyper-parameters and helpful suggestions, regarding to the speed, I agree that mentioned due the GIL of python... it is not able to utilize the CPU efficiently for multi-threading, possibly instead of using threading module, the multiprocessing library can probably help to speed up.

@aravindsrinivas
I see. As you say, entropy regularization constant is written as 0.01 in page 11.
By the way, you wrote in previous post that

The decay parameter (called alpha in the paper) for RMSProp was 0.99 and the regularization constant (called epsilon in the paper) was 0.1.

What does "epsilon" in this comment mean?
Epsilon term in RMSProp calculation in equation (9) in page 9?
(I thought that epsilon in RMSProp is a small constant like 1e-10 to avoid zero division, but if your comment means this term, I'll try it!)
And did you hear anything from DeepMind author about discount factor gamma?

@originholic
Thank you for introducing multiprocessing library in python. I didn't know this. Let me check it.

@joabim
I found why your minimal action set size differ from mine.
ALE seems to have changed minimal action set for pong one month ago.
https://github.com/mgbellemare/Arcade-Learning-Environment/commit/e1c811a50848fa0165d041bbdbdc0ae7bc116f31
I'm now using forked version of ALE on which I added some modification in order to run on multithreaded environment.
https://github.com/miyosuda/Arcade-Learning-Environment
This version still used 3 actions.
I don't know why they changed action size from 3 to 6.

@miyosuda
Thank you so much! That explains it!
@aravindsrinivas
Awesome work on the hyper parameters! I wonder if the source code for this project will be released some time like they did with DQN in the Human-level control through deep reinforcement learning article

@zhuchiheng
Hi, I have been running this for a million (T = 109200)..
But it still scores not more than 18 (mostly 20 and 21)....
Can you tell me how was the trajectory of the scores for you over T?

@miyosuda
Does the code work for you now?

@aravindsrinivas
Simple grid maze task converged to optimal result easily with this code, but the pong's result is same as yours (not more than 17 and mostly 20 and 21 after one day learning)

Did you mean -17 and -20/21?
On 3 May 2016 09:53, "Kosuke Miyoshi"<EMAIL_ADDRESS>wrote:

@aravindsrinivas https://github.com/aravindsrinivas
Simple grid maze task converged to optimal result easily with this code,
but the pong's result is same as yours (not more than 17 and mostly 20 and
21 after one day learning)
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/miyosuda/async_deep_reinforce/issues/1#issuecomment-216432243

With the correct ALE I also wind up at -17 at most after a days worth of training in pong. In breakout, the score maxes out at 2-3 for each episode

@aravindsrinivas

Did you mean -17 and -20/21?

Yes, sorry it means -17 and -20/21.

Also, what's the value of T you get after a day?

After 19 hour 20 min, global T was 10870045 (10.8 million) on my Core i7-6700 machine.
(So 19.5 steps per sec for one thread)
By the way, I found ALE 0.5 has default setting of "repeat_action_probability=0.25."
This parameter was introduced from ALE 0.5 and it causes poor performance.
https://groups.google.com/forum/#!topic/deep-q-learning/p4FAIaabwlo
So I disabled this with repeat_action_probability=0.0 in "ale.cfg".

@miyosuda
Isn't that equivalent to 43.2 mill frames? Which should be between 10 and 11 epochs.... Their graph shows that by 10 epochs, they are able to reach scores around +10. So, this is definitely not working..

@aravindsrinivas

Isn't that equivalent to 43.2 mill frames?

Yes it is 43.2 frames including skipped ones.
By the way, I'm still not sure I'm understanding what "epsilon" parameter you mentioned before in the comment means.

The decay parameter (called alpha in the paper) for RMSProp was 0.99 and the regularization constant (called epsilon in the paper) was 0.1.

Is this epsilon of RMSProp in equation (9) or the "beta" parameter in equation (7)?
Is it possible to share original message that DeepMind author sent you?
I'll try easier task than pong to confirm correctness of my implementation.

Hi @aravindsrinivas, try these hyper parameters:
T = 0  # Global shared counter
TMAX = 5000000  # Max iteration of global shared counter
THREADS = 8  # Number of running thread
N_STEP = 5  # Number of steps before update
WISHED_SCORE = 3000  # Stopper of iterative learning
GAMMA = 0.99  # Decay rate of past observations deep q-learning
ACTIONS = 1  # Number of valid actions
STATES = 4  # Number of state
ENTROPY_BETA = 0.001  # Entropy regulation term: beta, default: 0.001
Initial Learning rate
INIT_LEARNING_RATE = 0.0001 # default: 1e-3
Optimizer
OPT_DECAY = 0.99  # Discouting factor for the gradient, default: 0.99
OPT_MOMENTUM = 0.0  # A scalar tensor, default: 0.0
OPT_EPSILON = 0.1 # 0.005 # value to avoid zero denominator, default: 0.01

@zhuchiheng
Is this for a continuous world problem? Asking because you have only 1 action? I was actually talking with respect to Pong.

@aravindsrinivas
There is another project trying a3c, and the result seems so much better than mine.
https://github.com/muupan/async-rl
Please try his implementation and setting.

There was a progress with learning.
Today I've changed some parameters.
t_max = 5
RMSprop epsilon = 0.1
and I've changed a loss function bit and the gradient of critic is now half of before, following muupan's setting.
(Learning rate of critic was already being half of actor's but I make it half of before.)
https://github.com/miyosuda/async_deep_reinforce/commit/40c65d433d0e5fdd7b909319b3d019b7e4d54ac0
tf.nn.l2_loss() means
output = sum(t ** 2) / 2

and I used to use loss function like below before.
output = sum(t ** 2)

I'm not confident now, but the learning rate ratio of actor/critic might be important.
I'be been running only 13 hours, but the score began increasing with this setting.

I'll keep running this setting to see the result.

@miyosuda
I have started the same experiment (from current master) on a single Intel Xeon e5-2680 (however with PARALLEL_SIZE of 8 as in your implementation). I can utilize 2 Xeons, is there any setup I should go for that you would like to see?

@joabim
It's great to hear that you have Xeon machine.
Xeon e5-2680 has 8core and can run 16 threads, correct?
So could you try PARALLEL_SIZE of 16?

I have two Xeons I can utilize,

Does this mean you have two PCs and each PC has single Xeon chip?
Anyway I would like you to try 16 parallel threads to check parallel size increment will speed up learning!
As far as I'm testing with current master setting, the result in 38 hours (18 million steps) is like this

And the movie capture after 24 hours learning was like this
https://www.youtube.com/watch?v=cFWL_y9BVaQ

@miyosuda
It's even the third revision (12 cores + 12 virt), I am lucky to be able to borrow this machine! Hence, 16 threads should not be a problem, I have just reset the test for parallel size 16, let's see how it performs!
Yes, the second xeon is in another PC so I can't promise anything, but it might be possible to run a parallel test if we use a parallel size >12 - perhaps two runs of 20 threads or so.
The results are promising, we start to converge! I think we can reach article-grade results (~20 points after 10 hours of training) soon

It's even the third revision (12 cores + 12 virt),

Wow so great!
I'm curious about what happens if we run it with 24 threads.
When you run with 16 or 24 threads, is it possible to see the CPU usage of each CPUs?
When I run this program with 8 threads, CPU usage of each CPU was around 80%.

As @originholic suggests, multi threading in Python seems to be not efficient due to Global Interpreter Lock (GIL).
Most of the learning process is calculated inside TensorFlow with c++, so I'm not sure how much GIL affects the performance, but if the CPU usages is low when we increase thread size, I need to replace threading module to multiprocessing module.
So I'm happy if I can see the CPU usage in you environment. Thanks!

This is the current CPU usage (slightly higher average than 80% per core)

Regarding the score recording for tensorboard, couldn't we record the average of the 16 threads? Sometimes the current high score is broken by a thread that might not be of index 0 which results in the summary_writers not recording the current "overall" performance of the agents.

@joabim
Thanks! As far as I see your result, CPU usages seems ok. I'll stay multi threading at this moment.

Regarding the score recording for tensorboard, couldn't we record the average of the 16 threads?

I was thinking the same thing.
I've added modification to record scores from all threads and pushed it to "all_scores" branch.
I'll test this branch, and if there is no problem, I'll merge it to master.
(I'm not averaging the score, but does this help?)

I think we should follow the epoch convention for testing, and only with
respect to the global network parameters. Not the thread parameters.
That is, we must train using all threads and update the global parameters
and periodically test only the global network. That is what has been done
in the paper. Every 4 million frames (1 mill steps - value of T), a testing
epoch must be conducted that will last 500000 frames (125000 steps). I
think this will make it better... What do you think?
On Fri, May 6, 2016 at 8:26 PM, Kosuke Miyoshi<EMAIL_ADDRESS>wrote:

@joabim https://github.com/joabim
Thanks! As far as I see your result, CPU usages seems ok. I'll stay multi
threading at this moment.
Regarding the score recording for tensorboard, couldn't we record the
average of the 16 threads?
I was thinking the same thing.
I've added modification to record scores from all threads and pushed it to
"all_scores" branch.
I'll test this branch, and if there is no problem, I'll merge it to master.
(I'm not averaging the score, but does this help?)
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/miyosuda/async_deep_reinforce/issues/1#issuecomment-217464942

--
Aravind

We also don't need to output the thread score (even if it is only thread 0)
during train phase.
This is just following the same convention as DQN in DeepMind's code or
Nathan Sprague's Lasagne implementation.
On Fri, May 6, 2016 at 8:46 PM, Aravind Srinivas L <
<EMAIL_ADDRESS>wrote:

I think we should follow the epoch convention for testing, and only with
respect to the global network parameters. Not the thread parameters.
That is, we must train using all threads and update the global parameters
and periodically test only the global network. That is what has been done
in the paper. Every 4 million frames (1 mill steps - value of T), a testing
epoch must be conducted that will last 500000 frames (125000 steps). I
think this will make it better... What do you think?
On Fri, May 6, 2016 at 8:26 PM, Kosuke Miyoshi<EMAIL_ADDRESS>wrote:

@joabim https://github.com/joabim
Thanks! As far as I see your result, CPU usages seems ok. I'll stay multi
threading at this moment.
Regarding the score recording for tensorboard, couldn't we record the
average of the 16 threads?
I was thinking the same thing.
I've added modification to record scores from all threads and pushed it
to "all_scores" branch.
I'll test this branch, and if there is no problem, I'll merge it to
master.
(I'm not averaging the score, but does this help?)
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/miyosuda/async_deep_reinforce/issues/1#issuecomment-217464942

--
Aravind

--
Aravind

@miyosuda
Very glad to hear that have learning going on with the ale environment!!
Also I agree with the idea of @aravindsrinivas, maybe we can add one more thread specified for testing the global net, that 16 training thread + 1 validation thread, so just need to monitor the validation thread for the score.
If using multiprocessing module, I think we can make the validation thread to handle all the I/O scheduling to speed up the training, I am currently working on the multiprocessing module since I want to improve the training speed of the continuous domain as well.

@aravindsrinivas @originholic
Thank you for the suggestion. Let me think about how to do validation with global network efficiently.

I am currently working on the multiprocessing module since I want to improve the training speed of the continuous domain as well.

Great! If the performance increases, let me know! I think 80% of current CPU usage has a room to improve.

Alright, now I'm back and I get that we need to change the implementation. The results from my run during the weekend follows (even though they don't matter anymore)

@joabim
Thank you for testing.
In my environment the result on my machine around this 4 days is

and the step size was around 53 million. (The learning rate becomes zero after 60 million steps)
Hmm what's the difference between your environment and mine...
Let try one more learning to check.

I didn't noticed, but I found that, in muupan's project,
https://github.com/muupan/async-rl
the learning rates of actor/critic are opposite to mine.
The learning rate of actor is half of critic's, and his result is better than mine.
I'll try his setting in this branch.
https://github.com/miyosuda/async_deep_reinforce/tree/muupan_lr_setting

After learning of 59 million steps, I visualized the weights of first convolution layer.
$ python a3c_visualize.py

The result was like this.

I think the second column represents the upside movement of the paddle. (One column represents 4 frames of the input.)

I realized I forgot to install the ale in my new anaconda environment after building it (the ALE fork that you made with correct pong support and multithreading) in my previous run which resulted in me using the incorrect version of ALE... I am redoing the test for 16 threads using the muupan_lr_setting branch now! I'll let you know how it goes

@joabim
I see.
BTW, I'm going to ask muupan about his setting in his issues thread. He said that he asked DeepMind authors about tuning, and I hope I can apply his feedback to mine later.

@miyosuda For everyone's information, I summarized about their settings here: https://github.com/muupan/async-rl/wiki

@muupan Thank you!

@miyosuda Hi. I’ve got an LSTM working with your code. I’ve only tested it on a toy problem (4 state MDP) rather than an Atari game but it seems to be working properly and as well as the feedforward net does. The code is at https://github.com/cjratcliff/async_deep_reinforce. I’ve made quite a few changes for my own version, many of them outside the LSTM parts so I’m happy to answer any questions. For using it on Atari, in addition to increasing the RNN size, I’d recommend changing the cell type from BasicRNNCell to BasicLSTMCell and removing the activation function argument to that function.

@cjratcliff Thank you for sharing your LSTM version!!! Let me try it!!!

@cjratcliff I've pushed my LSTM version.
To make pong work with LSTM, I added

Unrolling LSTM cell up to 5 time steps (LOCAL_T_MAX time steps).
Now the calculation is batched with unrolled LSTM.
Call actions.reverse(), states.reverse() etc.... again to change the input order as normal.
When calculating "R", I'm calling reverse() to make the calculation easier. (Because from the last state, R can be calculated recursively as written in the original paper.) So I called reverse() again to fix the order.

With LSTM, the score of pong hit the maximum score easily. Thanks.

@miyosuda Great to see it working so well, thanks.

@miyosuda
Your work is great!

In one day training, I got 833 point as maximum score.
BTW, in training time, I encountered some trouble.
"pi" become NaN sometimes and the saved data was not usable for demo play.
The reason is that the "pi" has a possibility to become 0.0 and your code does not treat it correctly.
I think that you'd better to change following code in the file "game_ac_network.py".
I changed the code as follows and has no problems so far.

Current code:

entropy = -tf.reduce_sum(self.pi * tf.log(self.pi), reduction_indices=1)
policy_loss = - tf.reduce_sum( tf.reduce_sum( tf.mul( tf.log(self.pi), self.a ), reduction_indices=1 ) * self.td + entropy * entropy_beta )

My proposal:

entropy = -tf.reduce_sum(self.pi * tf.log(tf.clip_by_value(self.pi, 1e-20, 1.0)), reduction_indices=1)
policy_loss = - tf.reduce_sum( tf.reduce_sum( tf.mul( tf.log(tf.clip_by_value(self.pi, 1e-20, 1.0)), self.a ), reduction_indices=1 ) * self.td + entropy * entropy_beta )

@Itsukara Sorry for late in reply (I didn't notice your post until now), and thank you for suggestion!
As you suggest, my code can't treat zero pi value. I'll test it and apply your fix to my repo later.
Thanks!

Thanks for your implementation. It's really works! But sometimes my models are got stuck and haven't got the desired result for some amount of steps. Anyway, does anyone tries to use all 18 actions (boxing in naive has this amount)? But, my boxing agents become overpower in 20+ points after 10mil steps with reduced action size (=6). I'm so close to 20 mil with 18a-z for 8 boxing threads, but result isn't pretty for now.

The code performs really well on some games but on others it doesn't quite get the same level of scores as those reported in the paper. I wonder why that is. For example in Space Invaders, the reported score is 23846.0. The model I trained comes nowhere near that. :( Did anyone else manage to get better than around 1500 for Space Invaders?

Just saw some discussion on using Multi-processing in this thread, I wonder what's the current status?
I opened a dedicated ticket on this:
https://github.com/miyosuda/async_deep_reinforce/issues/27

Hi @miyosuda , thanks for sharing the code. I have a question about A3C LSTM implementation.
At class GameACLSTMNetwork, line 217, why to share the lstm weights among thread? Maybe it makes sense to create "no reuse" lstm weights for every worker and global_network and synchronize all the variables from global_network's.
Thanks!


Automatic Refresh

Automatically rescan the /Volumes folder when there are changes (i.e. when mounting/dismounting volumes)

Done. Awaiting merge


Document component flags

Document flags for controller, webhook and cainjector.
Could be like https://kubernetes.io/docs/reference/command-line-tools-reference/ which doesn't look auto-generated.
It'd probably be just copies of the help output for those flags.

/assign

/unassign
I'm not actually working on this

Fixed.

https://github.com/cert-manager/website/pull/800


Bug: Cannot find module '@vue/server-renderer'

Describe the bug
I'm using these dependencies for testing
    "@testing-library/jest-dom": "^5.16.5",     "@testing-library/vue": "^6.6.1",     "@vue/test-utils": "^2.2.6",     "@vue/vue3-jest": "^29.2.2",     "jest": "^29.3.1",     "jest-environment-jsdom": "^29.3.1",
When running yarn test I'm receiving this error
`
Test suite failed to run
Cannot find module '@vue/server-renderer' from '/project_path/.yarn/__virtual__/@vue-test-utils-virtual-7528046424/0/cache/@vue-test-utils-npm-2.4.1-9433e5afe3-901b6a5170.zip/node_modules/@vue/test-utils/dist'

Require stack:
  /project_path/.yarn/__virtual__/@vue-test-utils-virtual-7528046424/0/cache/<EMAIL_ADDRESS>  /project_path/.yarn/__virtual__/@testing-library-vue-virtual-9373cb4b8b/0/cache/<EMAIL_ADDRESS>  /project_path/.yarn/__virtual__/@testing-library-vue-virtual-9373cb4b8b/0/cache/<EMAIL_ADDRESS>  jest.setup.js

  4 | import "@testing-library/jest-dom";
  5 |
> 6 | import { configure } from "@testing-library/vue";
    | ^
  7 | import { config } from "@vue/test-utils";
  8 | import { lazyLoadImages } from "src/js/helpers/lazyLoadImages";

`
To Reproduce
working on creating minimum stack blitz repo
Expected behavior
I'm not doing any server side rendering or testing. I would not expect '@vue/server-renderer' to be referenced at all

Have you installed the following packages?
   "@vue/compiler-sfc": ">= 3",
   "vue": ">= 3"

Have you installed the following packages?
   "@vue/compiler-sfc": ">= 3",
   "vue": ">= 3"

yes
    "vue": "^3.2.45",     "@vue/compiler-sfc": "^3.2.39"

Which version of Yarn do you use?
I think it's probably the same issue than https://github.com/vuejs/test-utils/issues/2107
We have a PR in progress to solve this, see https://github.com/vuejs/test-utils/pull/2197
In the meantime you can add @vue/server-renderer to your dev dependencies

Which version of Yarn do you use?
3.5.0

In the meantime you can add @vue/server-renderer to your dev dependencies

oddly tests still fail with the same error


Http rewrite

This is basically the same as Gus' PR but with less total deps. I do need to fix up some webpack stuff

it has the same number of deps 🙄

This should be tagged as WIP since its very incomplete yet.

there are a number of issues with your http lib including your encoding check not being comprehensive, which will result in possibly gzipped/deflate/compressed data being passed through which will be bad

Yes it is still a WIP, and besides super agent (which is being replaced) it uses less deps total


[$250] Track Expense - Hmm it's not here in RHP is displayed after deleting a workspace.

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.72-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5305982
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Action Performed:

Go to https://staging.new.expensify.com/
Login with the new Gmail account in incognito mode.
Complete the incorporation process using the option “Something Else”
Enter a first name and click on the Continue button.
Click on "+" Fab Button and create a manual Expense with $1.
Click on the "Next" button and click on "Just track it" and Track the expense.
Click on Categorize it and click on the "Upgrade" button.
Delete the workspace and click "Category it" again from the expense.

Expected Result:
The RHP should show the modal to upgrade the plan so that it allows the creation of a ws automatically and chooses a category.
Actual Result:
The error is displayed saying that the page is not found.
Workaround:
Unknown
Platforms:

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

Screenshots/Videos
https://github.com/user-attachments/assets/bdd70add-df7c-448e-887f-361bdfb756ba
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~021865097302221998464
Upwork Job ID:<PHONE_NUMBER>221998464
Last Price Increase: 2024-12-06
Automatic offers:

truph01 | Contributor | 105258178

Issue OwnerCurrent Issue Owner: @jjcoffee

Proposal
Please re-state the problem that we are trying to solve in this issue.
Track Expense - Hmm it's not here in RHP is displayed after deleting a workspace.
What is the root cause of that problem?
The filteredPolicies include archived reports.
https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/libs/ReportUtils.ts#L8215-L8217
When the number of filteredPolicies is exactly one and the single policy is archived, the condition will be false and needs to be true so the user can be routed to the upgrade page.
https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/libs/ReportUtils.ts#L8236-L8238
Instead, the app tries to setMoneyRequestParticipants with the only policy available in filteredPolicies and it shows the NotFoundPage because the policy is archived.
https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/libs/ReportUtils.ts#L8241-L8243
This issue won't occur if the user creates a second policy.
What changes do you think we should make in order to solve the problem?

Since the archived policies don't have the type attribute present, we can use !policy.type to check if a policy is archived.
We should use !!activePolicy.type in this condition.
if (activePolicy && !!activePolicy.type && activePolicy?.type !== CONST.POLICY.TYPE.PERSONAL && activePolicy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {

As well as, filteredPolicies === 1 && !activePolicy.type in this condtion.
if (filteredPolicies.length === 0 || filteredPolicies.length === 1 && activePolicy && !activePolicy.type ||  filteredPolicies.length > 1) {

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A
What alternative solutions did you explore? (Optional)
Let's filter out the archived policies from the filteredPolicies by using policy.type.
https://github.com/Expensify/App/blob/840c227be7fd907ab096cda7d6f28e1eef4a1d30/src/libs/ReportUtils.ts#L8216
(policy) => policy && !!policy.type && policy.type !== CONST.POLICY.TYPE.PERSONAL && policy.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,

Proposal
Please re-state the problem that we are trying to solve in this issue.

The error is displayed saying that the page is not found.

What is the root cause of that problem?

The function used to filter the workspaces is:

https://github.com/Expensify/App/blob/3baf965618ced48845ddd7534b0fad4d4110b5de/src/libs/ReportUtils.ts#L8215-L8218

When we delete any workspace, BE still sets that workspace to:

avatarURL: "",
id: "A0F9",
name: "abcd"

So when we click on "Categorize it" in step 8, logic:

https://github.com/Expensify/App/blob/36b9b442a07865684ce8740fd9b1325dd1933bd3/src/libs/ReportUtils.ts#L8236-L8239 is not called because filteredPolicies.length is 1. But instead, it calls:
https://github.com/Expensify/App/blob/36b9b442a07865684ce8740fd9b1325dd1933bd3/src/libs/ReportUtils.ts#L8253
so the Not here screen is displayed since there is no policy.
What changes do you think we should make in order to solve the problem?

We should update the filter function:

https://github.com/Expensify/App/blob/36b9b442a07865684ce8740fd9b1325dd1933bd3/src/libs/ReportUtils.ts#L8215-L8217 so that the app needs to filter out the workspaces in which the user has no role as mentioned in here:

The App needs to filter out the workspaces in which the user has no role

We already do the same when filtering the policies to display in workspace list page.

So, the function should be updated to:

    const filteredPolicies = Object.values(allPolicies ?? {}).filter(
        (policy) =>
            policy &&
            !!PolicyUtils.getPolicyRole(policy, currentUserEmail) &&
            policy.type !== CONST.POLICY.TYPE.PERSONAL &&
            policy.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
    );

or like the same as what we did in workspace list page:
    const filteredPolicies = Object.values(allPolicies ?? {}).filter(
        (policy) =>
            !!policy &&
            policy?.type !== CONST.POLICY.TYPE.PERSONAL &&
            (policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || Object.keys(policy.errors ?? {}).length > 0) &&
            !!PolicyUtils.getPolicyRole(policy, currentUserEmail),
    );

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We should create the util function for the above filter function, and then apply the a few test cases in the unit test: policy has ``error, policy has no type, policy has no role, policy has no rolebut hasroledata inpolicy?.employeeList```, ...

What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Thanks for your proposal, @truph01. All yours!

PR is ready


[SHIRO-685] Potential NullPointerException if PermissionResolver retu…

…rn null/empty string.
Made changes according to the JIRA and I added a test case.
@bdemers can you review please?

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Shiro-pr/75/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Shiro-pr/76/


get the naming right on iiifPresentationLocation

Not sure how this past the build, I'd like to look into it.
For now I guess we think about how we name IIIF things as we have a mixture of caps and small, the pattern seeming like if it's:

camelCase and starts with IIIF, we leave it small e.g. iiifImageThings
camelCase and has it in between it's large e.g. thingsThatHaveIIIFInIt
PascalCase and starts = large IIIFImageLocation
PascalCase and in between = large ThingsIIIFImageLocation

Either way, we had types and consts named the same, which should never really be the case.

Looking at it the build isn't passing.


Restructure colpali-engine package

Added

feat: Deprecate interpretability and eval_manager modules
feat: Deprecate unused util modules
build: Add demo-related deps in colpali-engine[demo]
feat: Revamp module organization
feat: Restructure the utils module
feat: Move ColModelTraining module
feat: Lint code + tweaks

Changed

doc: Lint Changelog
doc: Tweak README

Amazing work, thank you! Is it still possible to rebase your code?
It would be good to review and merge these improvements as soon as possible. @ManuelFay can you help?

Yeah that's the plan, but since it's rather a large refacto, we wanna make sure nothing is breaking ! Any reason you need this now ? No new features are introduced wrt current code on main branch, it's essentially cleaning up stuff ?


Update tar.gz source code

Hi,
According to https://pypi.org/project/mssql-cli/, last version of mssql-cli is 0.17.2 currently.
Newer versions were not tagged here : in this repository, last release is 0.15.0.
Can you provide last tar.gz source code here.
Thanks.
--
Vincent

Thanks @linuxunderground, we'll try to have this updated soon.
For now I recommend installation via pip install mssql-cli, if you can.

Thanks @linuxunderground, we'll try to have this updated soon.
For now I recommend installation via pip install mssql-cli, if you can.

@ellbosch : pip is not an option for me. My goal is to install mssql-cli with the Gentoo package manager and maintain mssql-cli ebuild.

We recently added support for source distributions with tar.gz in PyPI. Although you still may need to use pip to install it. Look for the tar.gz download here. Hopefully this can unblock you for now.

@ellbosch
Thank you for the 0.17.3 github tag and tar.gz source code release.
Gentoo ebuild updated :-)


Authentication error

Describe the bug
I'm getting error Email/Password is incorrect during setting up the integration. I've used the previous MyT version before. I removed and recreated the folder in custom_components and also updated Home Assistant to the latest version. Also removed the integration in HA and tried to add it again. I'm using core 2024.1.3. I also verified my password by logging out and in again on my mobile app, which worked.
To Reproduce
Steps to reproduce the behavior:

Go to Integrations.
Click on Toyota Connected Services
Enter e-mail and password.
See error:

Log record in docker:
2024-01-15 11:52:10.189 ERROR (MainThread) [custom_components.toyota.config_flow] Authentication Failed. Unknown method.

Expected behavior
Integration to be completed.
Screenshots

Additional context
Home assistant core 2024.1.3 in docker. Frontend version20240104.0.

Hi, are you already using the new MyToyota App from Toyota or do you still using the old MyT App?

Hello @CM000n, you are right, I used the old MyT Toyota application. I was a little bit confused since my API hasn't been working for a while with the old app, and it also had some changes in it's name, so I thought the app upgrade was done automatically.
Thanks for the heads-up, it works like a charm now!


Design Panels

goal: design content panels and page level container elements.
Prior art

Pain points

Not uses always as page level elements
Used inconsistently

Tasks

[ ] Define content level elements
[ ] Define usage and uses cases
[ ] Wireframes
[ ] Visuals
[ ] Document

same as #998. Closing this


Use repositories instead of models Fix #227

I f* up last PR. This contains clean code.

We're trying to fix a CI install problem right now. As soon as that's fixed, I'll re-run Travis and if all is good there, then we should be able to merge without a problem.

What with this PR?

Sorry, it seems to have slipped through the cracks.


Add dolphin stable and dolphin dev

Was surprised to not find dolphin here.
These are mostly poached from the citra manifests.

Is there anything else that should be done to these? I assume it is ok to leave the architecture out since neither stable nor dev support anything but 64 bit.

Thanks! It looks good to me, sorry for the delay :slightly_smiling_face:


Implemented assisted inject, further separation of concerns

Added some tests to increase coverage again. Looks good to me!

LGTM

Closed because rebased in #134


chore(nodejs): update client ref docs link in metadata

@fhinkel this looks like an actual problem, where the docs have not yet been published to cloud.google.com for this library.

I've spoken to @fhinkel, she will take a look!

We don't want cloud-rad docs for this because we don't have googleapis.dev docs either - at least the link in the Readme goes to a different page.


what is  the definition of angle,please?

how to calculate the angle?

From the upright, clockwise, in degree.

How do u draw a rotated rectangle?

@spatiallysaying Use Opencv

how to calculate the angle?

https://github.com/chinakook/labelImg2/blob/e0cadcd2c7e640e32a97ff697cf948cd5d405bb9/libs/labelFile.py#L138


powershell.codeFormatting.whitespaceBetweenParameters removes more than just whitespace

VS Code 1.50.1
ms-vscode.powershell v2020.6.0
Tested with both PowerShell 7.0.3 and 5.1
Windows 10.0.19041

Enabling the powershell.codeFormatting.whitespaceBetweenParameters setting causes the formatter to remove more than just whitespace in some cases.
For example, if you use an inline hashtable as the argument for a parameter, it will remove the = characters from the hashtable:

I also found a case where it removed an apostrophe, breaking a Pester test:

My bad, this looks like a duplicate of https://github.com/PowerShell/PSScriptAnalyzer/issues/1561. I'll close this.


docker image for ppc64le?

Is this a BUG REPORT or FEATURE REQUEST?:
FEATURE REQUEST
What happened:
I cannot run argo docker image on the power platform.
What you expected to happen:
I want to use argo on the cloud on power platform.
We have a lot of customers using power system and they are looking for the argo on ppc64le.

I have done the code change for building the docker image for ppc64le platform, here is my thought:

create a separate Dockerfile named "Dockerfile.ppc64le" base on the original one.
modify the Makefile to use the Dockerfile.ppc64le on power, append -ppc64le at end of the image tag.

@jessesuen could you please help to evaluate my idea? thank you.
I saw there was a PR https://github.com/argoproj/argo/pull/1102  for the support, but it only covered the command line.

We now provide argo-linux-ppc64l. Does this work for you?


Integration test resultCounts overflow if >255 certs lint to the same status from the same lint

Background
While investigating https://github.com/zmap/zlint/issues/553 I noticed that there was an inconsistency between the expected error results by lint name & the number of certificate fingerprints that failed linting:

Running:
make integration SHELL=(which bash) INT_FLAGS="-lintSummary -fingerprintSummary -lintFilter='e_key_usage_and_extended_key_usage_inconsistent'"
I get the summary:
summary of result type by lint name:
e_key_usage_and_extended_key_usage_inconsistent                  	fatals: 0    errs: 140  warns: 0    infos: 0
But there are ~566,923 certificate fingerprints with "errs: 1" in the output from -fingerprintSummary.

Root cause
The root cause is that the integration.resultCount type used to collate findings uses a collection of uint8 counters:
https://github.com/zmap/zlint/blob/c1c6681339ef2247dca5ff81162ab80c4811b154/v3/integration/result.go#L11-L16
This overflows when more than 255 certificates return a result of a given level. :facepalm:  :facepalm:  :facepalm:
I can't remember how or why I made the decision to use uint8 for these fields. It seems very very silly in retrospect!

I can't remember how or why I made the decision to use uint8 for these fields. It seems very very silly in retrospect!

I think I remember the rough shape of the "why" now: initially I implemented the integration test ground truth per-test certificate (e.g. ~600,000 rows of JSON, each with an err, info, etc count). That made for a big JSON file (~100mb) and I was noodling with using a smaller type since we didn't have 255 lints. Later we restructured the tests to group source of truth by lint instead of by cert but didn't update this type. Oh well :cry:

I can't remember how or why I made the decision to use uint8 for these fields. It seems very very silly in retrospect!

I think I remember the rough shape of the "why" now: initially I implemented the integration test ground truth per-test certificate (e.g. ~600,000 rows of JSON, each with an err, info, etc count). That made for a big JSON file (~100mb) and I was noodling with using a smaller type since we didn't have 255 lints. Later we restructured the tests to group source of truth by lint instead of by cert but didn't update this type. Oh well :cry:


Update EmanationColorationShader to Foundry VTT 0.7.9

Which class should be updated?
EmanationColorationShader
For which version should the class be updated?
Foundry VTT 0.7.9

Taking this

Fixed by #276


Project Naming and Path Resolution Enhancements

Implemented two key updates to improve the user experience with the Kita CLI:

Enhanced Project Naming: Now allows . as input to automatically use the current directory's name as the project name. This makes project setup quicker and aligns with common CLI conventions.

Fixed Cross-Platform Path Issues: Switched to using path.basename(process.cwd()) for determining the project's default name, ensuring consistent behavior across all operating systems.

These changes streamline project creation and ensure compatibility across different environments.

LGTM!

I was thinking on adding a test suite for the kita-create cli and ensure it works everytime... Would you like to work on it? I'll create a issue for it.


Allow editing default machine pool labels

Related: SDA-7375
Also fixed some issues with interactive mode, in the additional machine pool. Before the fix, if the user sets only labels or taints, they we still be asked to set replicas, after the fix the user can set labels, taints (not for default machine pool), or replicas/autoscaling params.
$ ./rosa edit machinepool -c zg-dec18  Default
? Enable autoscaling (optional): No
? Labels: a=b
I: Updated machine pool 'Default' on cluster 'zg-dec18'

If the user set at least one of those they will not be prompted for anything more
$ ./rosa edit machinepool -c zg-dec18  --labels "a=f,b=w" Default
I: Updated machine pool 'Default' on cluster 'zg-dec18'

Taints are forbidden for default mp:
$ ./rosa edit machinepool -c zg-dec18  --taints "a=f,b=w" Default
E: Taints are not supported on the Default machine pool

@oriAdler @gdbranco @hunterkepley @tzvatot PTAL.
Even if LGTY, please don't merge before the weekend, as this also impacts the existing edit machine pool flow

@oriAdler rePTAL

/lgtm


Update 2023-05-29-Qubit.md

I have found some grammar and punctuation issues.

Thank you, @Melifarro19

@evgenydmitriev, Happy to contribute!


Feature request: Ignore warnings for specific files

Like we can do for linting warnings/errors, can we ignore the warnings for a specific file?

Why would you not want documents to be checked?

It was a compatibility issue with docsify. Nevermind, I did a workaround.

Our team has a use case for this feature - we dynamically generate a small portion of our markdown content, and want to link to it using markdown links from elsewhere in our documentation. However, all links to the dynamically generated markdown fail when remark-validate-links is run, even though they work at runtime. We would like to be able to ignore this subset of links.

@Noah-Silvera Could you clarify how you generate that markdown content?
How are you using this plugin, and remark in general?

Hi @wooorm. Sure thing!
We are using this plugin with Docusaurus to validate the links in our documentation content, which can be found here. Most of the content in the dev center is static, for example, this page. However, we also generate some API Reference Documentation dynamically as markdown content. An example of this can be found here.
We want to be able to link out to this dynamic API markdown content. However, since the content is not available statically, the remark-validate-links task will always fail, even if the links are valid at runtime.
We'd like to be able to ignore these links we know will be valid at runtime.

This plugin is specifically for Markdown references, e.g., from docs in a GitHub project, to other docs in that same GitHub project. It doesn’t check whether your links work on your website, it checks whether they work on GitHub/BitBucket/GitLab.
Would https://github.com/davidtheclark/remark-lint-no-dead-urls perhaps be of interest?

@wooorm but the links we are trying to use are markdown references from some docs to other docs within the same github project. They are not external links, so remark-lint-no-dead-urls does not looks like the tooling for us.
Here's an example.
On this page, various "commands and operations" are discussed, like auth.sign-in or edit.delete-features. The API reference we want to link those commands and operations too exists as generated markdown documentation, on the same site. Here's the markdown header for auth.sign-in.
We want to be able to use local relative markdown links such as
Such as the [`auth.sign-in`](api-commands-operations-events#command-auth.sign-in) command...

throughout our documentation.
However, since the api-commands-operations-events docs are generated markdown, they are not available at lint time. This means that even though we are writing a valid markdown reference link to another piece of documentation on the same site, the remark-validate-links plugin is marking it as broken because the target documentation does not exist until runtime. We want to be able to ignore links of these nature so we can link to our dynamic markdown documentation without it breaking the linting.

If you would write:
Such as the [`auth.sign-in`](api-commands-operations-events#command-auth.sign-in) command...

…in docs/web/configuration-commands-operations.mdx, and this file was rendered on GitHub, then when someone clicks on that link, it will result in a 404. That is what this plugin does:

It errors because there is no file called api-commands-operations-events (GH shows a 404)
If the link would be api-commands-operations-events.mdx#command-auth.sign-in, it errors because there is no command-auth.sign-in heading in the MDX file (GH doesn’t scroll to a heading but remains at the top).

We want to be able to ignore links of these nature so we can link to our dynamic markdown documentation without it breaking the linting.

How would you propose this to be solved? As we are at lint-time, this would mean a long list of values that will be generated later:
[
  'api-commands-operations-events.mdx/#command-auth.sign-in',
  'api-commands-operations-events.mdx/#command-auth.sign-out',
  // …
]

But now you have a new problem: that list needs to be kept up to date, because if for some reason it’s now sign-up on the website, you won’t get any errors at lint time.
Hence, I don‘t think this can be properly solved at lint-time, because there isn’t any information about run-time.
Maybe, it makes more sense to instead lint (with rehype?) the generated HTML instead?

Hey, thanks for your response, I appreciate your time.
In regards to the [auth.sign-in](api-commands-operations-events#command-auth.sign-in) link...

it errors because there is no file called api-commands-operations-events (GH shows a 404)

There actually is a file called api-commands-operations-events so the link does not 404

it errors because there is no command-auth.sign-in heading in the MDX file (GH doesn’t scroll to a heading but remains at the top).

It does error because the heading only exists at runtime - remark-validate-links attempts to find the heading, and it fails to find it.
I put up a demonstration PR in our project that shows this issue.
Near the top of this page, I added two links to the api-commands-operations-events docs; auth.sign-in and auth.sign-out. These links are both valid at runtime, and if you click them, will take you to the right markdown header on the api-commands-operations-events page.
However, if you take a look at the build for the PR, you can see that remark-validate-links is failing to find the headings, and erroring out.

I absolutely agree that this problem cannot be properly solved at lint time. We are dynamically generating markdown headings, and links to these headings should be checked on the live site. We do have plans to use an external link checker to verify links of this nature - however, we haven't added it yet, and the best candidate we are looking to use currently can't check headings.
However, even if we were to also lint the generated HTML with this external link checker and verify the links properly, we still would have the issue of remark-validate-links failing at lint time. We still would need to be able to ignore those links at lint time and then check them later at run time.
Looking at other projects which lint on various criteria, a common pattern to ignoring is to provide a list of optional regex expressions.
For example, the CSpell package provides an ignoreRegExpList in it's config, which allows you to specify multiple regular expressions which will be ignored in checks.
If you allows for regex, the issue of keeping the list up to date gets a bit simpler. For example, in our case, the regex would be api-commands-operations-events.mdx#[a-zA-Z-\.]+ which would match any links to the generated headings, regardless of if they change.
Thanks for discussing this with me!

Can you use links to the website?
-   [`auth.sign-in`](https://developers.geocortex.com/docs/web/api-commands-operations-events/#command-auth.sign-in)
-   [`auth.sign-out`](https://developers.geocortex.com/docs/web/api-commands-operations-events/#command-auth.sign-out)
-   `edit.add-feature`
-   `edit.delete-features`

Can you use links to the website?
-   [`auth.sign-in`](https://developers.geocortex.com/docs/web/api-commands-operations-events/#command-auth.sign-in)
-   [`auth.sign-out`](https://developers.geocortex.com/docs/web/api-commands-operations-events/#command-auth.sign-out)
-   `edit.add-feature`
-   `edit.delete-features`

In order for it to work locally, in staging, and prod we would need to dynamically generate the base url.
In our documentation system, that's done through  the useBaseUrl() function. However, we can't call that function in the markdown link.
[auth.sign-in](useBaseUrl("/docs/web/api-commands-operations-events/#command-auth.sign-in"))
We would need to add anchors mixed in with the markdown, which we'd prefer not to do.
auth.sign-in

Would comments work?

-   [`auth.sign-in`](broken)
-   [`auth.sign-out`](broken)
-   `edit.add-feature`
-   `edit.delete-features`

Would comments work?

-   [`auth.sign-in`](broken)
-   [`auth.sign-out`](broken)
-   `edit.add-feature`
-   `edit.delete-features`

For our use case, we could possibly make it work, but it's not as ideal as a regex ignore list. For example, these broken-at-lint-time links could be mixed in with other links that we actually want validated.
For example, here's a snippet from this page. I've added line breaks to make it easier to read, but it was originally all one paragraph.
The second behavior in this application is a [`map.zoom-to-initial-viewpoint`](api-commands-operations-events.mdx#command-map.zoom-to-initial-viewpoint) command on the I Want To Menu.
This command takes `Maps` type argument.
The `argument` property in the app config supplies an array of maps
by referencing the `default` map with an [**Item URI**](configuration-app-config-reference.mdx#item-uris).
Item URIs are a way of referencing other items within the app config.

The first link to map.zoom-to-initial-viewpoint points to generated markdown, and the second link, "Item URI" points to static content available at lint time.
If we used the  pattern here, we would lose the validation of the "Item URI" link.
I'm sure the comment pattern could be more valuable to others use cases, as it is localized to a very specific link instead of a generic pattern, but the regex ignore list would be more useful to our use case.

i've run into a case that i think falls into this category. this link to create a new file is a valid link in the context of github, but does not pass link validation. if there isn't a better way to make this pass validation, i'd love a way to at least ignore it. the comments mentioned above would be acceptable in my case.

A project I work on has this issue as well: we would like to link our generated API documentation from our hand written documentation. Currently our options are:

Refer to the file in a way that is not a clickable link. (This is our current approach)
Force the API documentation generation to run before running this lint. (Our build takes a while so we want to avoid this)

Disable comments would work in our case, so would a regex skip validating links that match the specific pattern, or even just a list of urls/paths to consider valid without actually checking.

We encountered a similar problem. Because we used the Markdown importing feature of Docusaurus to import other Markdown files into a document, such as importing bar.mdx in foo.mdx, and there are many Markdown headings in bar.mdx. At this time, using something like [...](foo.mdx#some-heading-in-bar) will cause an error, because the heading #some-heading-in-bar only exists in bar.mdx file.
As @Noah-Silvera suggested, it would be very useful for us to ignore checking some links through regular expressions. Of course, it would be better if the heading of the link could be detected in another Markdown file.

It might be possible to build a wrapper plugin around remark-validate-links that accepts a glob option:
// plugins/remark-validate-links-with-glob.js
import remarkValidateLinks from 'remark-validate-links'
import pm from 'picomatch' // use whichever glob matching library suits you best
import path from 'node:path'

export default function remarkValidateLinksWithGlob(options, fileSet) {
  const originalTransform = remarkValidateLinks(options, fileSet)
  const isMatch = pm(options.glob)
  return (tree, file) => {
    if (isMatch(path.relative(process.cwd(), file.path))) {
      return originalTransform()
    }
  }
}

Then use it like so:
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import mdx from '@mdx-js/rollup'
import remarkValidateLinksWithGlob from './plugins/remark-validate-links-with-glob'

export default defineConfig({
  plugins: [
    react(),
    mdx({
      remarkPlugins: [
        remarkValidateLinksWithGlob({
          glob: ['posts/**/*.mdx'], // or negative globs that forbid certain files
        }),
      ],
    }),
  ],
})

I haven't tried it, but a variation of this could work.
I was thinking of what would be good to propose to the plugin itself, but I can't think of a good API because this is linting territory, so comment-based error suppression IMO shouldn't be performed on a plugin-by-plugin basis.
ESLint might eventually be able to lint other languages, maybe even Markdown and MDX, and it already has a way to suppress warnings and errors… but that seems ages away 😅


Feature request: Add support for return Control in Bedrock Agents

Use case
Rather than sending the information that your agent has elicited from the user to a Lambda function for fulfillment, you can instead choose to return control to the agent developer by sending the information in the InvokeAgent response. You can configure return of control to the agent developer when creating or updating an action group. Through the API, you specify RETURN_CONTROL as the customControl value in the actionGroupExecutor object in a CreateAgentActionGroup or UpdateAgentActionGroup request. For more information, see Add an action group to your agent in Amazon Bedrock.
Solution/User Experience
Adding a callback in case of return control so the developer can mock them up/make a call and return the data to Bedrock Agents.
Alternative solutions
None

Grate to hear from you


Host services (like docker )are not supported

I am using vmtest to run ebpf tests and tests include some docker commands. I have docker up and running in host machine but via vmtest the commands fail. Found that /var/run/docker.sock is not able to access from vmtest command, where as that is available in host machine. Any wrap around so that I can solve this problem?

Hi, thanks for trying vmtest! I have an entry in the FAQ for this as well as a workaround: https://github.com/danobi/vmtest/blob/master/docs/faqs.md#how-do-i-run-docker-inside-vmtest


zulip: Fix call_on_each_event.

Fix Improper assignement of narrow variable outside its scope.

Merged; I think it's worth unbreaking master immediately and then adding tests in a follow-up PR.  (Easy to verify the tests work by reverting this).


Add instructions on how to create Data Connection - Pipeline server -

Description does not say where to click to create a Data Connection. Although it may seem obvious, beginners may miss it.

https://github.com/rh-aiservices-bu/insurance-claim-processing/pull/92


Alexa version is updated

Hi,
Few things:
Alexa version is updated.

It now exports only one json file, merging all the training phrases and actions into one. So I am not able to use the plugin (under dialogflow-> integrations-> alexa). I have already reported this to support team few weeks back, please let me know if we have any update on this.

Do we have a way to use the same dialogflow fulfillment for both google-assistant and alexa?
As i want to keep all my backend logic at one place.

Running into this myself now, looking for approaches to import my Alexa skill.
The top SO answer is also of no help, as some commenters point out, as it's for the old method: https://stackoverflow.com/questions/46748429/how-to-import-alexa-skill-into-api-ai-dialogflow#46777623
It seems like Alexa Import is entirely broken at this point.


Run benchmark tests only during merges to develop

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Does this PR introduce a user-facing change?

Additional Notes for your reviewer:
Review Checklist:

[ ] Follows the developer guidelines
[ ] Relevant tests are added or updated
[ ] Relevant docs in this repo added or updated
[ ] Relevant carvel.dev docs added or updated in a separate PR and there's
a link to that PR
[ ] Code is at least as readable and maintainable as it was before this
change

Additional documentation e.g., Proposal, usage docs, etc.:

@praveenrewar did we end up deciding this was useful or not? Happy to merge if it is, or else we can close this out

IIRC, we decided that we don't need this, but in future, instead of not running the workflow I think we should run the test for merge requests to ensure that we get the results before merging a PR and not afterwards.


A few .log files missing from the BoostTestAdapterNunit project

Hi,
first of all — congratulations on open-sourcing the project! Thank you for taking time to document the whole thing so well — it is really ease to see what's happening in the code.
I've always wanted to use this plugin for the tests in my project, however never got it to work — now I'll be able to debug and — perhaps — make the needed adjustments on my own :)
But, going to the matter:
it seems that several files are missing from the repository, causing the BoostTestAdapterNunit project to fail build. (and in case of removing references to that files, the 4 tests will fail because of that)
The missing files are:

Resources\ReportsLogs\MemoryLeakTest\sample.NoSourceFileAndLineNumbersAvailable.test.stdout.log
Resources\ReportsLogs\MemoryLeakTest\sample.SourceFileAndLineNumbersAvailable.test.stdout.log
Resources\ReportsLogs\OutputTest\sample.test.stderr.log
Resources\ReportsLogs\OutputTest\sample.test.stdout.log

Could you please check this and add them to the source control? Thanks!

The missing log files are made available in merge request #7

Thank you, with that merged I am able to properly build the whole solution and run all the nunit tests. :)
A few ones are failing, probably due to git messing with line endings, but that's another topic.

@mwu-tow I just restored SingleLineCommentFilterTest_FilteredSourceCode.cpp which I suspect is the file that was causing one of the unit tests to fail as per your last comment.  I also added a .gitattributes so as to disable the CRLF behaviour of Git.

Yes, that fixed two of the tests. Remaining failing ones are MemoryLeakSourceFileAndLineNumbersAvailable and MemoryLeakNoSourceFileAndLineNumbersAvailable. Is this a known problem or should I open a new issue report and provide more details?

I just downloaded anew your fork and my fork.  I merged in, the five files that I committed this morning (apart from the .gitattributes) to your fork, compiled and ran the tests.  All the 120 pass just fine.
I suggest that you do open another ticket so as that we track this issue.  The only detail that is required at this point is the name of the tests (and optionally the reason of the test failure).  I would then suggest to wait for the repo owners to accept the current pull/merge requests.  I will then rebuild and run the unit tests again....and then I'll trigger you to retest again.  Is this ok for you?

Yes, absolutely. I'll get to this tomorrow.
Thank you for all your help. :)

Hi merged all your pull requests and made a new clean clone. Now all the 120 tests are passing fine. Sorry for the false alarm, something must have went off before. (perhaps the line endings change didn't affect the previously checked out files)
So this issue can be resolved as soon as #7 goes through.

Hello mwu-tow. Ok, thanks for letting us know. Have a nice weekend.

@mwu-tow Can we close this?

Yes, of course.