[11.x] Add HasGeneratedColumns trait for Eloquent model

Fixes #50946
If an Eloquent model has generated columns (e.g. stored, virtual, or computed) on its table, the value of these generated attributes are null when creating a new model instance and would be incorrect when updating the model instance.
This PR introduces the HasGeneratedColumns trait to be used on Eloquent models that have generated columns. This trait is overriding the finishSave() method to reload the model instance with fresh attributes from the database, making sure it has correct values for all generated columns after the model instance is saved.
Example
Let's assume we have the following table:
Schema::create('products', function (Blueprint $table) {
    $table->id();
    $table->integer('price');
    $table->integer('tax')->virtualAs('price * 0.6');
    $table->integer('total')->storedAs('price * 1.6');
    $table->timestamps();
});

With this model:
class Product extends Model
{
+   use HasGeneratedColumns;

    protected $fillable = ['price'];
}

Then:
$product = Product::create(['price' => 20]);

$product->price // 20
$product->tax   // was `null` before this PR but returns 12 with the new trait
$product->total // was `null` before this PR but returns 32 with the new trait

$product = Product::first();
$product->update(['price' => 10]);

$product->price // 10
$product->tax   // incorrectly returns 12 before this PR but returns 6 with the new trait
$product->total // incorrectly returns 32 before this PR but returns 16 with the new trait

Failing test is not related to this PR but this commit 94f0192f2f515bf06795c635c53137ac15867eec

I'll be honest, I'm not sure how much longer I want to keep changing the framework to support a feature I don't like (barfing on "missing attributes"). The feature hasn't been documented in a while, and I would rather just tell people not to use it at all. It's not a great feature. It breaks packages. It breaks core framework features, and I'm getting weary of working around it with more and more edge-case PRs. 😅

@taylorotwell I totally understand, but this PR is not about Model::preventAccessingMissingAttributes at all, but using generated columns with eloquent model.

@taylorotwell I'm a bit torn on this one. It's apparently an actual bug in framework with virtualAs and storedA and indeed doesn't have anything to do with preventAccessingMissingAttributes. As you can see @hafezdivandari's example from above doesn't uses it.
I'm not sure the trait is the correct solution. But at the same time I cannot think about anything else other than putting a note in the docs for Eloquent. Can you maybe give your opinion again now that you know preventAccessingMissingAttributes isn't involved?

We do use generated columns in our company, but i don't like the idea that the finishSave() method automatically retrieves a fresh instance on save, this would risk creating a N+1 issue if saving multiple models in a loop.
I think that if you are using generated/virtual columns you need to be aware of the drawbacks and implement reloading manually in those places you know that you need a fresh instance with updated information.
Doing a forced refresh on every save is not a good solution, sure it will solve some use cases, but I think it will create more issues in any case where you don't need the fresh data anyway.
It also needs to take into account any loaded relationships and make sure those are not discarded when reloading the attributes - it doesn't look like you are discarding them, but there have been so many eloquent changes lately that have broken unrelated things, a test for this would be awesome (I think).
I think this trait needs to be smarter in the way it handles generated columns, some ideas:

Possibility to declare which attributes are generated.
Possibility to declare which attributes a generated column is dependant upon (this would also allow the refreshRawAttributes method to be smarter and only selected generated attributes that needs to be refreshed).

// maybe:
$generatedAttributes = [
   // 'attribute' => ['dependant columns'],
   'tax' => ['price'],
   'total' => ['price'],
];

Possibility to declare when/if an auto refresh should happen, refreshing the model is usually only needed when some specific attributes have been updated.
For instance in your example, the model actually only needs to be refreshed if price is changed, if the update doesn't involve that column (lets say you have name column also that was updated) there would be no need to refresh tax and total.
Maybe this could be achieved with a refreshIf() : bool method in your trait that can be overridden to make the refresh logic smarter per model (or completely disable it for a specific model)

I don't know if my ideas here are the best solutions, but I think they are better than a one size fits all solution that is proposed in this PR.

I'm not a fan of this either. Overall if you have generated columns and you want to use them after saving you usual just refresh the model in that one or two spots it actually matters. Currently having actual generated attributes in Eloquent leads you to tracking what those columns are and excluding them from saving because in some cases you unset/null/update them php side on value change etc. and it crashes by wanting to save them to database because they're "dirty".

Not sure where this fits in the conversation, but I would also like to point out that this could also be used in places where columns have default values, which is a much more common use case. Currently a ->refresh() call is also needed to retrieve those values that were not set on the model at creation but were set in the database.

@Riley19280 That's exactly why I marked this as draft, I was thinking about better solutions to cover both situations. I'll update this soon.

Maybe this could be achieved with a refreshIf() : bool method in your trait that can be overridden to make the refresh logic smarter per model (or completely disable it for a specific model)

@johanrosenson I agree that having some additional logic may be useful to customise how it works, but I also feel that it shouldn't require too much 'set up' to get this working. I think all it should take is adding a trait, or perhaps a contract, if that's possible without unwanted side-effects as N+1. I don't know enough on the internals of eloquent to comment on that.

So in a way having a trait HasGeneratedColumns that just refreshes the model automatically doesn't make it any better to use.

@donnysim Can you explain? I think the problem you describe is unrelated to this one as you can use a $fillable.

Not sure where this fits in the conversation, but I would also like to point out that this could also be used in places where columns have default values, which is a much more common use case.

@Riley19280 100%.

@ju5t fillable doesn't change anything as it's not related. For example you can have a virtual column full_name as CONCAT(name, " ", last_name), and a factory that sets it manually so you don't need to refresh the model and on save it will crash because it tries to save full_name to database. The same goes for business logic.

Currently, the latest approach has 3 problems in my mind:

Naming the attribute: $attributesToReloadOnSave any better suggestion?
Separating this for create/update: for generated columns, we have to reload the value on save (both create/update) but for columns with default, we just need to reload on create. We may:

Either have $attributesToReloadOnCreate and $attributesToReloadOnUpdate
Or something like $attributesToReloadOnSave = ['update' => [], 'create' => []]

Order of events and accessing the reloaded value on each event: currently the events are firing in the following order:

creating / updating
created / updated (instance doesn't have reloaded attributes yet)
retrieved (instance only has reloaded values)
saved (instance has access to all attributes)

This isn't applicable to virtual columns, but you can define property defaults using the $attributes property:
> class Foo extends \Illuminate\Database\Eloquent\Model
{
        protected $attributes = ['in_stock' => true];
}
> new Foo;
= Foo {#7024
    in_stock: true,
  }

@hafezdivandari this wouldn't be my preferred solution. It's too much 'boilerplate' for me.

I think the solution is to implement INSERT ... RETURNING on the query builder, all DBs except MySQL support it. What workaround can we use on MySQL?

DB
Support version
Docs

SQLite
3.35.0+
https://www.sqlite.org/lang_returning.html

MariaDB
10.5.0+
https://mariadb.com/kb/en/insertreturning

PostgreSQL
8.4.0+
https://www.postgresql.org/docs/current/dml-returning.html

SQL Server
2016+
https://learn.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql

MySQL
-
-

@hafezdivandari any news on this PR? Otherwise it's probably best to let this one go.

I'll close this one for now as I don't like the current solution, as I said in this comment, the better solution may be to implement returning clause when inserting/updating.


Create new content for Cloud Pak Overview page

Before we can refine we need to check in with Ronda Salem
This issue assumes that Cloud Pak has its own submenu in the LHN. See existing content here.
Acceptance criteria:

[ ] Create a page called Overview under the submenu Cloud Pak Patterns
[ ] Ensure the Overview page is at the top of the submenu list (over riding alphabetical order)
[ ] Create new content explaining:

What are the Cloud Pak patterns?
Which teams should use them?

Need to work with Randa Salem on this content.


YAML Configuration

I am new to flasgger and was going through the repo and some examples. I need to make a POST request handler config file. Below mentioned link has a POST request and fits my use-case  perfectly.
Could you please help me out with it's YAML Config file
http://flasgger-rochacbruno.rhcloud.com/apidocs/index.html

Figured it out!


Part settings are resetted when saving Settings

Enable Markdown
Choose Markdown as bodypart editor on blogpost
Open 'Settings' and press save
Bodypart of blogpost has now Html as flavor

@Devqon

That's quick! Next time I will file an issue myself, thank you ;)


Throttle request speed option

Nearly all commercial WAFs have a "restrict number of requests per minute per IP" setting. Most should also have a separate "restrict number of requests per minute per session" setting.
It would be nice if we could throttle go-ftw to only send X requests per minute (especially for cloud mode). Otherwise go-ftw will hit the X/min limitation and will only produce false positives after that.

cool!


LwM2M: Observe-related bugfixes

This patch series mainly focuses on:
https://github.com/zephyrproject-rtos/zephyr/issues/8286

Check for READ permission on observe requests against resources
Fix a few error messages typos
Return early when an error is generated during observe processing

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/8286

@therealprof feel free to test

Codecov Report

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

@@           Coverage Diff           @@
##           master    #9673   +/-   ##
=======================================
  Coverage   52.31%   52.31%
=======================================
  Files         212      212
  Lines       25937    25937
  Branches     5589     5589
=======================================
  Hits        13569    13569
  Misses      10122    10122
  Partials     2246     2246

Continue to review full report at Codecov.

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


[TW#15818] Enhance esp_wifi_ap_get_sta_list / wifi_sta_info_t to include RSSI, protocol

When acting as an AP, there's a call (esp_wifi_ap_get_sta_list) to get the list of stations connected.
This returns a list connected stations as an array of wifi_sta_info_t, which at the moment only has the mac address.
It'd be helpful to also make available the most recent RSSI measurement and perhaps which protocol (b,g,n,lr) the station is using.
The station RSSI is also available from the esp_wifi_set_vendor_ie_cb mechanism, but matching this data up to the station list is fraught. See also: https://github.com/micropython/micropython-esp32/issues/186

Also the country code of the AP would be helpful to have.

@nickzoic it's in our TODO list, will support it in idf3.1

Brilliant, thank you!

Hi, @nickzoic, we have add the country information in the wifi_ap_record_t structure, after 3.1 release, you will found it add a country parameter in it, or you can check the commit f3df30f9 after it merged, it may need few days for review and test

Hi@nickzoic, we have added the rssi you need in the wifi_sta_info_t, you will find it after 3.1 release, if you earge to use, you can pull down the f3df30f9 after it merged, but it may need few days to merge for review and test

That's great, we'll add it to MicroPython as soon as we can!

Brilliant, thanks Ivan!


Remove lang from NQuad proto

Remove lang field from the NQuad protocol buffer definition.

This change is

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Fix TypeError for tags

Join expects items of the type string. See https://docs.python.org/3/library/stdtypes.html#str.join
The fix should work as long as all items in the "tags" iterable are either of type string or have the attribute data["name"].

Hello Tassilo,
Thank you for this patch.  It looks like I either misread the Todoist API
reference or didn't change the code for converting labels last year.  I
think labels might have been a premium feature at that time.
Anyhow, this is better fixed by properly converting the label objects to
tags in the relevant todoist2org functions.  I'll make the necessary
changes in this pull request.
I note also that labels are not currently output according to the
item_order attribute.  I'll fix this while I'm at it.
Thanks,
Dane
On Sun, 12 Dec 2021 04:14:25 -0800
Tassilo Neubauer @.***> wrote:

Join expects items of the type string. See
https://docs.python.org/3/library/stdtypes.html#str.join The fix should
work as long as all items in the "tags" iterable are either of
type string or have the attribute data["name"]. You can view,
comment on, or merge this pull request online at:
https://github.com/Danesprite/todoist-org-mode/pull/4
-- Commit Summary --

Fix join KeyError
Fix TypeError for tags

-- File Changes --
M todoist2org.py (5)

-- Patch Links --
https://github.com/Danesprite/todoist-org-mode/pull/4.patch
https://github.com/Danesprite/todoist-org-mode/pull/4.diff

Let me know if this works for you.


PermissionError: [Errno 13] Permission denied: 'C:\ad\pic'

Having a permission issue. Using windows 10, using administrative cmd prompt.
Any idea?

Check the permissions on both the file and the containing folder.
The error is pretty self-explanatory; you don't have permissions to read/write (you didn't say which) to that file or folder.
I would suggest not using a folder in the root of your C drive. Use a folder within your user directory if you want to avoid permissions problems.

Oh sorry forgot to say i already validated the permissions, gave full control to all users.
Originally the file/folder was in my user directory, moved it to C:\ to see if that would have made a difference. Tried both administrative CMD prompt and powershell

You need to provide more information on what leads to this error you're seeing. What are the arguments you're using when calling kijiji_repost_headless? Could you post the full stack trace?

Created my yml file using "python kijiji_repost_headless build_ad" and followed the prompts.
Place image in a folder relative to the yml file in a folder called "picture". Parent folder is called "Mississauga" and within that folder is the item.yml file and then a folder named "picture"
I then run "python kijiji_repost_headless post Mississauga\item.yml" and get the following error:
Note: A recent update has broken all previously generated .inf files. Please regenerate all your files - this script is not backwards compatible with previous versions. The commands are also changed. See README for details.
Traceback (most recent call last):
File "C:\Users\Desktop\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\Desktop\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "kijiji_repost_headless_main.py", line 191, in
main()
File "kijiji_repost_headless_main.py", line 50, in main
args.function(args)
File "kijiji_repost_headless_main_.py", line 80, in post_ad
[data, image_files] = get_post_details(args.ad_file)
File "kijiji_repost_headless_main_.py", line 68, in get_post_details
files = [open(os.path.join(os.path.dirname(ad_file), picture), 'rb').read() for picture in data['image_paths']]
File "kijiji_repost_headless_main_.py", line 68, in
files = [open(os.path.join(os.path.dirname(ad_file), picture), 'rb').read() for picture in data['image_paths']]
PermissionError: [Errno 13] Permission denied: 'Mississauga\picture'
Note quite sure what i am doing wrong.


Change the type of the src_url as url_t (observable type)

Sure, I can do that the next time.

Nothing better than the present, let's modify this one.


Add way to summary time for code over a date range

It would be very helpful to be able to get a summary of the work done for either all codes or a specific code over a date range.

Fixed


Venv Selector issue with nightly build

I have been using this plugin with LazyVim configuration for a while and it works stable but recently switching to the nightly build it does not work anymore.
Before opening any buffer if i use VenvSelect to select on nightly build it works then but if i have already opened a buffer for a file then it does not work. and results in showing errors.

Keep in mind this is only happening on nightly build 0.10.

Try this https://github.com/linux-cultist/venv-selector.nvim/pull/99.

Try this #99.

Yeah it seems the PR would fix this. Just need to get it merged ASAP.

Try this #99.

Yeah it seems the PR would fix this. Just need to get it merged ASAP.

I will wait for the merge then.

It is resolved now and working on both versions correctly.

Perfect. 👍 Thanks again to @neolooong!


Remove github.com/2opremio/go-1/codec

Bump github.com/ugorji/go/codec, to get fixes which make
github.com/2opremio/go-1/codec unnecessary

Remove github.com/2opremio/go-1/codec

Remove type embeddings to avoid the problem explained at
https://github.com/ugorji/go/issues/141#issuecomment-185450157

Fixes #973

@paulbellamy @davkal (or @foot ) PTAL

@paulbellamy How about now? (no more client changes)

On top of this, it would be good to have a lint check for detecting embedded types in structs aimed at serialization (i.e. structs with with fields including json tags).

LGTM, +1 for lint check


Update 3.0. Behaviour.md

Add some small sections to represent how API lifecycle events should be signaled when they affect existing IS-04 resources.
Someone with more EDID experience please go over these and make sure they capture all the lifecycle events we expect to happen.

Looks fine to me!


Providing a link to shell script file location

Description
Providing a link to shell script file, so that user can navigate directly from documentation
Motive
Better readability of documentation

assign @timflannagan1

/ok-to-test
/lgtm
/approve


LPIPS gives negative value

Discussed in https://github.com/Lightning-AI/torchmetrics/discussions/2310
lightning==2.1.3
torchmetrics==1.3.0

Hi everyone,
It seems that LearnedPerceptualImagePatchSimilarity can returns negative values when it is used as loss function.
From what I understand it comes from the linear layers that don't have their requires_grad set to false see self.lins. Which have for effect to fine-tune the lpips' network
One workaround is to only give the network parameters and not the LightningModule's (self.params()):
class LitAutoEncoder(LightningModule):

    def __init__(self):
        super().__init__()
        self.network = ConvAutoencoder()

        self.lpips_loss = LearnedPerceptualImagePatchSimilarity(
                net_type='vgg', reduction='mean', normalize=False
        )

    def configure_optimizers(self):
        optimizer = torch.optim.Adam(self.network.parameters(), lr=1e-3)
        return optimizer

Please find a reproducible example at: https://gist.github.com/F-Barto/ce8a1a28a6d2afd2f2141026fbb3a605

It seems removing the lpips parameters from the optimizer has for effect to accumulate the gradients over batches.
They are only reinitialized when entering the validation loop (each drop in the image below corresponds to a batch after a validation epoch):

Hi @F-Barto, I tried to give the issue a shot in PR #2326. The fix to me seems very simple by also setting requires_grad=False for the linear layers.

Yep, fixed it for me !
Thank you very much :)


build error

Hi, I am getting a generic error on the bundle process on linux

rustc 1.44.0
tauri-bundler is installed system wise
webkit2gtk is installed
Archlinux 5.6.15-arch1-1 kernel

 DONE  Build complete. The dist_tauri/bundled directory is ready to be deployed.
 INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

 app:spawn Running "cargo tauri-bundler --features embedded-server --release" +0ms

   Compiling app v0.1.0 (/home/chell/Sources/vue/tauri/my-tauri-app/src-tauri)
   Compiling tauri v0.6.0
    Finished release [optimized] target(s) in 7.80s
    Bundling app_0.1.0_amd64.deb
    Bundling "/home/chell/Sources/vue/tauri/my-tauri-app/src-tauri/target/release/bundle/appimage/app.AppImage"
error: Shell Scripting Error:`error running build_appimage.sh`

 app:spawn Command "cargo" failed with exit code: 1 +1ms

 app:tauri (runner) ⚠  [FAIL] Cargo CLI has failed +0ms

 app:tauri Shutting down tauri process... +2ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This is not likely to be a problem with the vue-cli-plugin. We've been working on appimage, but I thought we had all the bugs ironed out. :(

Have you tried installing squashfs-tools? It looks like mksquashfs is required. I was able to reproduce the error before installing it

Have you tried installing squashfs-tools? It looks like mksquashfs is required. I was able to reproduce the error before installing it

it does fix the issue, thx


Fixes regression of #88

I think #114 introduced a regression of #87/#88.
This code should fix it (at least it does for me 👍), unless I'm not understanding something correctly.

I can confirm that this fixes the problem we had with version 5.5.

This solution works perfect for me.

I started by only implementing the tests for your PR, but while implementing the tests I discovered that we shouldn't always re-bind, because react.createClass is taking care of it, so I updated the code to check how the component was created. Sorry to steal your PR :sweat:

Does this reintroduce the whole "React complaining about bind() calls"?

@jbblanchet  That's fine, I didn't test with createClass.
@Pomax I did wonder that. Which commit actually fixed that?  9d412ca5f832ff813faf0b427a2942400941633d ? Few merges/reverts, was confusing.

Eh, I'll be honest - if this fixes a real bug, then reintroducing a warning is fine. But, if you'd like to help figure out how to now remove that warning again, that'd be fantastic.

v5.6.0 just got released after merging in @jbblanchet's PR, does that solve the problem this PR also tried to solve?

It does thank you @Pomax and @jbblanchet  :)


Filepond + Slim?

Hello, It's possible to use Filepond + Slim?
I have Filepond with cropping plugin but I want to give to the user the ability to drag his own cropping selection.
I saw there pqina has created also an awesome cropping plugin:
https://puu.sh/Bjn63/bdea9900f3.gif
My question is: It's possible to show the button and show the pop-up when the button is pressed.
And replace my cropping plugin with the slim cropping function?
Thanks.

In theory that is possible. You'd have to manually add the edit button to FilePond by writing a custom plugin (the quickest way to do that would be to fork the image preview plugin).
You can then link up the button click with the Slim cropper.
Please note that I'm currently working on a new image cropper that will integrate with FilePond. You can follow me on Twitter to receive regular updates.

Is there any time estimation for this?
So I can wait or try to search for another solution until then
Thank you so much

I'm hoping it's done in a couple of months.


[Preview 4] DataGrid Crash in WinUI3 Desktop

Describe the bug
The CommunityToolKit DataGrid displays and is scrollable in UWP In WinUI3 Preview4 Desktop, the DataGrid crashes on load. Previously, in Preview3, the DataGrid would load but crash when made scrollable. See Screenshot#1 for current behavior.
Steps to reproduce the bug

Clone WinUI3Preview4 Problems DataGrid repository.
Go to the DataGridWinUIPreview4 folder.
Open the DataGridWinUIPreview4 solution in Visual Studio 2019 Preview.
Build and run with Debug x64.
The application window will appear, and the application will crash.

Expected behavior
We expect the DataGrid to load and be scrollable when window is unable to display all of the data in the DataGrid - the same behavior we saw in UWP. See Screenshot#2
Screenshots

Screenshot#1 - Current Behavior

Screenshot#2 - Expected Behavior
Version Info
NuGet package version:
[Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 8.0.0-preview4]
[Microsoft.WinUI 3.0.0-preview4.210210.4]
Targeting:
Target: Universal Windows
Target version: Windows 10, version 1809 (10.0; Build 17763)
Min version: Windows 10, version 1803 (10.0; Build 17134)
Windows app type:

UWP
Win32

Yes

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2020 Update (19041)

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)
Yes

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

@RBrid and @michael-hawker FYI

We've tested the DataGrid within the Toolkit sample app, so not sure what other factor is involved here. FYI @azchohfi.

Hello @eleanorleffler . Does this issue happens if the debugger is not attached to the application?

Hi @azchohfi . I have tried multiple combinations with the debugger, and the issues still occurs.
I also pulled down the Toolkit Sample app from GitHub and have a crash occur when I tried to "Launch the Windows Community Toolkit Sample App" - I see the app window appear but then go away.

Hi @eleanorleffler, could you try using the new Project Reunion 0.5 with the CommunityToolkit.WinUI.UI.Controls.DataGrid package?
I was able to make the same project work with these packages :)
@azchohfi, I believe we should use the CommunityToolkit.WinUI.UI.Controls for WinUI3 desktop apps, is that right?

@bkudiess yes. We renamed all out packages from Microsoft.Toolkit.UWP -> CommunityToolkit.WinUI.

Hi @bkudiess, we were able to get it to work with Project Reunion 0.5!
We had to follow the Windows Community Toolkit for Project Reunion 0.5 documentation - which required us to change our "using" statements/namespaces and modify our project based on our target framework.
Thank you for following up with me!


after auth, meet RPC[Error] code_name = unknown, code = 1000, message = "Not authenticated: NotSignedIn"

config file as below :
return {
    "zbirenbaum/copilot.lua",
    cmd = "Copilot",
    event = "InsertEnter",
    config = function()
        require("copilot").setup({})
    end,
}

:Copilot auth

:Copilot status

however , when i trying to use copilot panel

similar as https://www.reddit.com/r/neovim/comments/15d895o/github_copilot_will_not_work/

more info :

Node.js v18.12.1
NVIM v0.10.0

this method fix my problem
https://github.com/orgs/community/discussions/75145#discussioncomment-8639303


Reproducing LwF, Adversarial LwF, and iCaRL

I'm attempting to reproduce the results for the following methods. Could you please provide the corresponding code for regeneration?

LwF
Adversarial LwF
iCaRL

Sorry for the delay.
The requested code bases are not available for public release yet. But I can share a draft of the code used in our paper. Can you please send an email to<EMAIL_ADDRESS>Thank you!


Support for multiple custom eval metrics

Hi,
it seems like LightGBM does not currently support multiple custom eval metrics.
E.g. f1-score, precision and recall are not available as eval metrics. I can add them as custom eval metrics, but I can't use all of them at the same time. Currently, it seems like LightGBM only supports 1 custom metric at a time.
LightGBM version: 2.2.3

Hi @candalfigomoro !
It does. Please see example:
https://github.com/microsoft/LightGBM/blob/a7885b60dd398fc89d797049a31c7b85713c966b/examples/python-guide/advanced_example.py#L175-L185

@StrikerRUS
It doesn't work, at least for the sklearn interface.
If I use eval_metric=[custom_metric1, custom_metric2, custom_metric3] it doesn't print any eval score.

@StrikerRUS
Thank you. Can we mix custom and built-in metrics (in the sklearn interface)?
Maybe I want to use AUC (built-in) + F1 (custom)

@candalfigomoro Sure! For built-in metrics use metrics param and eval_metric for custom ones.
import numpy as np
import lightgbm as lgb

from sklearn.datasets import load_boston

def rae(y_true, y_pred):
    return 'RAE', np.sum(np.abs(y_pred - y_true)) / np.sum(np.abs(np.mean(y_true) - y_true)), False

def rmsle(y_true, y_pred):
    return 'RMSLE', np.sqrt(np.mean(np.power(np.log1p(y_pred) - np.log1p(y_true), 2))), False

X, y = load_boston(True)
clf = lgb.LGBMRegressor(n_estimators=10, metric=['AUC', 'MSE'])

clf.fit(X, y, eval_set=[(X, y)], eval_metric=lambda y_true, y_pred: [rmsle(y_true, y_pred), rae(y_true, y_pred)])

[1]	training's auc: 1	training's l2: 71.212	training's RMSLE: 0.363416	training's RAE: 0.915593
[2]	training's auc: 1	training's l2: 60.4348	training's RMSLE: 0.337014	training's RAE: 0.841258
[3]	training's auc: 1	training's l2: 51.6226	training's RMSLE: 0.313682	training's RAE: 0.774098
[4]	training's auc: 1	training's l2: 44.3804	training's RMSLE: 0.292515	training's RAE: 0.716202
[5]	training's auc: 1	training's l2: 38.3112	training's RMSLE: 0.273322	training's RAE: 0.663217
[6]	training's auc: 1	training's l2: 33.311	training's RMSLE: 0.255968	training's RAE: 0.615143
[7]	training's auc: 1	training's l2: 29.319	training's RMSLE: 0.240791	training's RAE: 0.573687
[8]	training's auc: 1	training's l2: 25.8508	training's RMSLE: 0.226686	training's RAE: 0.536238
[9]	training's auc: 1	training's l2: 22.9094	training's RMSLE: 0.213802	training's RAE: 0.502092
[10]	training's auc: 1	training's l2: 20.5088	training's RMSLE: 0.20243	training's RAE: 0.471546

Why not just simply:
clf.fit(X, y, eval_set=[(X, y)], eval_metric=["metric1", "metric2", callable1, callable2])
?
and why y_true and y_pred in custom metrics are in different format? It is so non-intuitive.
Furthermore, why input label vectors should be converted into number of classes for multiclass classification?


[cluster-test] enable gas price into cluster test, which allow to setup non-zero gas price

Motivation
enable configurable non zero gap price in cluster test
default gas_price = 1, use -E GAS_UNIT_PRICE=1 to set non-zero gas price
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
tested with gas price = 1 with both swarm and cti:
cargo run -p cluster-test -- --mint-file "/var/folders/qd/tg50mr0d7k75qvztr_8yk2km0000gn/T/c81ae98e57fdc3fd55f563d37c7eb3fa/mint.key" --swarm --peers "localhost:49536" --emit-tx --workers-per-ac 1

./scripts/cti -E GAS_UNIT_PRICE=1 --pr 5414 --run bench

Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/libra/website, and link to your PR here.)

/land

:broken_heart: Test Failed - Build images and run cluster test

/land

:broken_heart: Test Failed - Build images and run cluster test

/land

:broken_heart: Test Failed - commit-workflow


Allow multiple base_urls for webmentions' sake

If a Plerd-based blog adheres the now-common practice of forwarding http:// requests to https://, then it won't recognize a well-intentioned webmention sent to the http://-based URL. And this more generally holds true for all situations where a blog quietly redirects all requests to other URLs derivable from the requested ones.
One way to fix this would be to support multiple base_urls in the config -- or one base_url but several recognized aliases. Plerd would then (internally) file its post objects under multiple URLs, making it more flexible about what webmentions it accepts.

A day later, this solution to a real problem feels too complicated.
A simpler fix: Allow the user to define a filter function which all webmention target URLs would pass through. The function can do anything it wishes, and outputs another URL at the end. (Perhaps transforming the input URL, perhaps not.) Plerd would then use that filtered output URL for the lookup, without the need for any further changes to business logic or internal structure.


Fix low-memory failure in libbpf_load_stress

Description
Fix crash in libbpf_load_stress on low memory.
Testing
Low memory full tests caught this.
Documentation
No.

Is there a particular issue number this fixes?


Chat command options and boss command cleanup #5294

added BossAbbreviations
utilized boss abbrevs for boss commands
added options for chat commands by adding sets for each

First attempted contribution. Unsure on how to link to issue.

Attempting to contribute to this issue #5294

Just paste the link in your original post
Like Closes https://github.com/runelite/runelite/issues/5294


StyleTTS2 support

Any chance you can add StyleTTS2 support? https://github.com/yl4579/StyleTTS2
It's better and faster than XTTSv2.

I don't think it's possible, this project is based on tts lib, if they add StyleTTS2 to it then maybe I can do it too, but not now


Add tox testing for Django 2.1

Coverage remained the same at 99.174% when pulling 3f88c578ec9e8c6e355f928b2c7564ce98da1134 on claudep:django21-testing into 08fa36d90299c8af099baf2ce989487eb5af4023 on summernote:master.

Coverage remained the same at 99.174% when pulling 3f88c578ec9e8c6e355f928b2c7564ce98da1134 on claudep:django21-testing into 08fa36d90299c8af099baf2ce989487eb5af4023 on summernote:master.

I'll work on remaining test failures.


Specify/change how vals are handled?

First, thanks for nice little library, really cuts in boilerplate and Intellij support is cool.
There's one thing that was not completely obvious, and that is how vals inside trait will be treated. Turns out, they are simply removed. I think this behavior deserves to at least be mentioned in README.
Alternatively, what might be done is treating vals like defs, so that abstract val gets converted to an object extending sealed trait, and non-abstract vals are retained as they are.
Also, it might make sense to do something specific with vars too, maybe prohibit abstract altogether and retain non-abstract?
import cats.free.Free
import freasymonad.free

@free trait Data {
  type Store[A] = Free[StoreADT, A]
  sealed trait StoreADT[A]

  val value: String = "This value will be evicted"

  def read[A]: A

}

object Run extends App {
  println(Data.ops.value) // does not compile
}

Thanks for the feedback. :)
So based on your example and suggestions, what are your thoughts on changing it to something like this:

concrete def/val with Store[A] return type -> include in ops
concrete def/val/var with other return type -> retain as is

also, should it be moved outside of ops? e.g. Data.ops.value to Data.value

abstract def/val with Store[A] return type -> case class/obj extending sealed trait
abstract def/val/var with other return type -> prohibit with compile error

Something like this, yes. And maybe specify that abstract var with Store[A] is a compile error too.
Maybe avoid moving stuff outside of ops - changing function location based on its return type is a strange behavior, I'd say.

I just finished implementing those features. Could you test it out to see if everything looks good. Thx.
resolvers += "Artifactory" at "https://oss.jfrog.org/artifactory/oss-snapshot-local/"
libraryDependencies ++= Seq(
  "com.thangiee" %% "freasy-monad" % "0.3.0-SNAPSHOT",
  "org.typelevel" %% "cats" % "0.7.2"
)
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)

Intellij plugin: https://github.com/Thangiee/Freasy-Monad/blob/dev/plugin/bin/freasy-monad-plugin-0.3.0.zip

Seems to work just right 👍


Results are at the wrong position

I'm using Bootstrap 5, the latest jQuery and jQueryUI and the results are shown on the bottom of the page, not on the parent form.

My mistake, wrong attribution fo the resource.

My mistake, wrong attribution fo the resource.


V3 forced all RequestInfo not null

V2.3.5 allows nullable RequestInfo for Put, Patch and Post.
However, this change force all not null https://github.com/bkbnio/kompendium/pull/256.
From
data class PutInfo<TParam, TReq, TResp>(
  val requestInfo: RequestInfo<TReq>?,
  override val responseInfo: ResponseInfo<TResp>,
  override val summary: String,
  override val description: String? = null,
  override val tags: Set<String> = emptySet(),
  override val deprecated: Boolean = false,
  override val securitySchemes: Set<String> = emptySet(),
  override val canThrow: Set<ExceptionInfo<*>> = emptySet(),
  override val parameterExamples: Set<ParameterExample> = emptySet(),
  override val operationId: String? = null
) : MethodInfo<TParam, TResp>

to ( newest code)
class PutInfo private constructor(
  override val request: RequestInfo,
  override val errors: MutableList<ResponseInfo>,
  override val response: ResponseInfo,
  override val tags: Set<String>,
  override val summary: String,
  override val description: String,
  override val externalDocumentation: ExternalDocumentation?,
  override val operationId: String?,
  override val deprecated: Boolean,
  override val parameters: List<Parameter>
) : MethodInfoWithRequest {

  companion object {
    fun builder(init: Builder.() -> Unit): PutInfo {
      val builder = Builder()
      builder.init()
      return builder.build()
    }
  }

  class Builder : MethodInfoWithRequest.Builder<PutInfo>() {
    override fun build() = PutInfo(
      request = request ?: error("request info must be present"),
      errors = errors,
      response = response ?: error("response info must be present"),
      tags = tags,
      summary = summary ?: error("Summary must be present"),
      description = description ?: error("Description must be present"),
      externalDocumentation = externalDocumentation,
      operationId = operationId,
      deprecated = deprecated,
      parameters = parameters
    )
  }
}

Can you help to make them nullable back? (A similar request here https://github.com/bkbnio/kompendium/issues/242)

And the description field too. I can see that https://redocly.github.io/redoc can parse a openapi.json with a request without requestBody and description.

Does requestType<Unit>() not work?

Thank you. It works.
However, Insomnia error regarding the empty request. I think we can close this issue but it would be better to clean up redundant things.

Hmm... and if you remove the requestBody block entirely, insomnia does not complain?  If so this should be a pretty easy thing to fix, to simply remove that block in the case that the type is Unit

Could you remove block for Unit requestType as you suppose?
requestType<Unit>() is not working correctly now, with result as "requestBody":{"description":"xxx","required":true}
Which is certainly not what we want

Done, will be released shortly in 3.13.0.


Log errors on uncaughtException unhandledRejection events

Description
See title
Fixes https://github.com/Shopify/quilt/issues/958

[x]  Minor: New feature (non-breaking change which adds functionality)

I did a 🎩 in web-rails-proving-ground with this change along with a change to generate a exception.
Shipit deploy logs contain more meaningful logs on why the node server failed on startup.
[FATAL][2019-09-26 14:07:54 +0000]	      $ node build/server/main.js
[FATAL][2019-09-26 14:07:54 +0000]	      React Server failed to start.
[FATAL][2019-09-26 14:07:54 +0000]	      Error: Test error. I am an uncaught exception thrown in the server that shows in shipit logs
[FATAL][2019-09-26 14:07:54 +0000]	      at breakThings (/app/build/server/webpack:/app/ui/server.js:18:15)
[FATAL][2019-09-26 14:07:54 +0000]	      at Module.breakThings (/app/build/server/webpack:/app/ui/server.js:34:5)

Checklist

[x] I have added a changelog entry, prefixed by the type of change noted above

I'm a little confused that this change didn't happen in templates/server.ts.  Are those templates not used, yet?

Are those templates not used, yet?

This drove me crazy for longer that I'd like 😅 ... Turns out they're not.


"fxplayer" command doesn't work

Hi. Whenever I try to use the "fxplayer" command, It will say it's "successfully playing FX", but then I get another message immediately saying "You're not looking at anything!". Am I just using the command wrong, or do I need to do something else, such as binding it to a key or having the game NOT freeze while the console is open

I see it. It's a bug. The "You're not looking at anything!" message is also sent when playing an fx successfully. It'll be fixed in the next update


Add support for brotli content encoding, if enabled through compat flag

Creating a new PR since there are significant changes compared to the previous PR (diff after rebasing old PR).
This is the first time I'm adding a compat flag – suggestions on the name, description and how to best pass the flags object are welcome. There also needs to be a proper compatibility date defined.

still LGTM


Sample code for compute()

In Android you would do this by posting all work to a single HandlerThread, or in Kotlin Coroutines by running all coroutines in the context of the same thread.. But how to do it in Flutter?
I have a use case where I need to ensure a group of async function calls are all running on the same background thread sequentially, even though they can be called from multiple places and parts of the app.

@gajicm93 You can just use the compute method if you want a simpler API, it uses the Isolates API under the hood.
https://docs.flutter.io/flutter/foundation/compute.html

Using it looks like:
  int result = await compute(_calculate, 5);

  // ...

  int _calculate(int value) {
    // this runs on another isolate
    return value * 2;
  }

Thank you, very nice and prompt response!

I don't understand this, the OP got the answer and the issue is still open for more than 6 months, and when I see some issues on Github that don't really have any solution still they are closed by bot within a week. bot, where are you now???

I am trying to construct a bunch of classes who are each quite expensive to create. It is a list of classes and they are expensive because I have to map, sort, and cast multiple lists of numbers. I have been unable to find a way to transform this data into classes. The only reason I'm using classes is because Dart does not have any way to describe the shape of a Map to make it useful for moving data around my app. Are there any examples of using compute() or isolates to construct expensive classes?

Part of my issue is the cost of converting JSON into Classes in Dart. It has proven to be remarkably expensive. Is there a better place to have this conversation to try to find a way to improve my current methods?

@lukepighetti I'd suggest to create an issue in dart-lang/sdk

@lukepighetti If you're doing the computations in the widget build method then you might want to consider moving the logic to a BLoC, and then have the widget consume the processed data as streams from the BLoC.

@augustzf The computations are done as part of a class constructor. I am creating these classes as data classes and passing them down to my Widgets via BLoC streams.

I would like to help and add a method (for example, 'computeFuture') that could handle the async functions.

@nikitadol Please feel free to file a PR. See our wiki for contributions instructions.

Following this example https://flutter.dev/docs/cookbook/networking/background-parsing, when populating pages inside a pageview.builder each containing a listview with listitems which in turns calls the compute function inside a futurebuilder the app experiences a heavy performance decline (~500 ms/frame for a long time). When wrapping the compute function with a future function and scheduleMicrotask that then setstate on completion of the compute, called from initState, I'm down to ~70/ms for a very short time which is a very big difference (but not good enough).
I would like to have some guidance of how I can develop from a performance perspective as well. It's very frustrating when you see all these examples of what you can do, but then you sit and code for days realizing that this will never be good enough for production.
If calling compute is expensive in itself (if that's the case), couldn't that be mentioned and how this can be managed?

Hello, i'm trying to use compute to parse QR string using code snippet below,
natsClient.subscribe('ojire_qr_paymet', 'req_auth').listen((msg) {
  String barcode = msg.payload;
  print('receiving auth request for $barcode');
  compute(EmvQrParser.parse, barcode).then((qrData) {
    print(qrData.toString());
    _parsedData = qrData;
    _customButtonEasyDialog(_parsedData, title: 'Authorize This Transaction?');
  });
});

now, whenever my application receive "msg", EmvQrParser.parse function got called multiple times (more than 10 times), is this normal?
this gives me multiple dialogs open with the same content.
as comparison, print('receiving auth request for $barcode'); was called twice.

Hi @gajicm93,
Is this still an issue or your question is resolved ?
Thanks.

I actually didn't have a specific problem, this was more of a general question, so yeah it's resolved. Thanks! @darshankawar

Closing this issue as fixed per @gajicm93's above comment.


cosign: 1.5.0 -> 1.5.1

Motivation for this change
https://github.com/sigstore/cosign/releases/tag/v1.5.1
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review run on x86_64-linux 1

1 package built:

cosign

Result of nixpkgs-review pr 157570 run on x86_64-linux 1

1 package built:

cosign


Is there a simple example of driving a chain towards a target?

There are lots of examples, but I simply need one that does this:

set up a chain
Call a function that drives that chain towards a target
Read the result

I looked through the code and it's kind of overwhelming to figure out what to do.

The library is still under heavy development, and examples/ documentation are still being fully fleshed out, but the closest examples I have for this use case are the following:
https://github.com/djrakita/optima/blob/main/examples/_motion_ik.rs
https://github.com/djrakita/optima/blob/main/examples/_static_ik.rs
It sounds like you may be looking for motion ik and not static ik, feel free to refer to the documentation here for more info.
Hope this helps!  And, if the library isn't able to do what you're hoping for yet, stay tuned for future updates.

The library is still under heavy development, and examples/ documentation are still being fully fleshed out, but the closest examples I have for this use case are the following:
https://github.com/djrakita/optima/blob/main/examples/_motion_ik.rs https://github.com/djrakita/optima/blob/main/examples/_static_ik.rs
It sounds like you may be looking for motion ik and not static ik, feel free to refer to the documentation here for more info.
Hope this helps! And, if the library isn't able to do what you're hoping for yet, stay tuned for future updates.

Thanks. I already analyzed this code, and my problem is: I don't want to load my config from a file, I want to create it manually by hand, since I already have a structure, and I don't all of what is in that file. Is it not possible to create a chain by code?

I see.  This is not natively handled in the library; however, if you were to create a urdf for your custom chain, the library will be able to load it in.  This should work even if you do not link to any mesh geometry.

Yes ok thank..maybe it's possible to load a configuration, then change the joint setup after? also is it possible to change the joint rotations before solving? my character is constantly moving (it's a game).


super-early-draft arviz jupyter book

May be we can use jupyter notebook for the NumFOCUS project, not sure about all the features and possible caveats of this approach, but I think people general likes bookdown and this is the Python equivalent. Not sure if all this files are necessary I created the project from a demo and then delete many files.
There are only two files that about the content of the book, intro.md and Section_01.ipynb both inside the content folder. Both are very early drafts.

Jupyterbooks would be great! I haven't had a chance to review code but am curious structure for book.
Previously for this repo I was going to do extensive documentation for each function, and model, but didn't get very far :(
For book what would we like to do? Chapter on each function or something different entirely?

according to the proposal we should have five chapters:
Section 01 Intro to Visualization
Section 02 Diagnostics
Section 03 Model criticism
Section 04 Model comparison
Section 05 Preparation of result for particular audience
Of course we can change everything at this point

Probably a good strategy is to subdivide each section into subsections, some of these subsections could be about "extensive documentation for each function", other  could be a general intro/outro (per subsection). Dividing the content into subsection will allow for easier contribution, reviews and maintenance. And is also something supported by jupyter book (see toc.yml file)

I am up for anything!


class="button cycle", icon layout shift to left ???

Describe the bug
When upgrade from 4.4.0 to 4.4.1, layout of cycle button will change to left,
Pls see the following scrrenshot
To Reproduce
N/A
Expected behavior
icon should be center layout
Screenshots

https://github.com/olton/Metro-UI-CSS/issues/1648


Configuration/permission issues for rootless podman containers

Hello,
I'm facing an issue integrating wg-pod with a rootless Podman container setup, where containers are run by the podman user, and everything is managed via Quadlet/systemd.
My quadlet file looks like so:
[Unit]
Description=qbittorrent

[Container]
Image=docker.io/qbittorrentofficial/qbittorrent-nox:latest
AutoUpdate=registry
PublishPort=8088:8088/tcp
Volume=qbt_config:/config:Z
Volume=/orlop/media/downloads:/downloads:z
Environment=QBT_LEGAL_NOTICE=confirm
Environment=QBT_WEBUI_PORT=8088

[Service]
ExecStartPost=/usr/local/bin/wg-pod systemd-qbittorrent /home/podman/.local/wg0.conf
[Install]
# Start by default on boot
WantedBy=default.target

The problem arises because running wg-pod as a rootless user results in RTNETLINK answers: Operation not permitted. I have given wg-pod CAP_NET_ADMIN and this did not resolve the issue. Conversely, running wg-pod as root from the quadlet file, using a limited scope sudo permission granted to the podman user, the rootful wg-pod instance cannot see the rootless Podman container, resulting in no such object errors. Are there ways to allow wg-pod to operate with elevated privileges, i.e. network configuration, within a rootless environment? Or are there any ways to bridge container visibility between root and rootless Podman contexts?
I'm running Rocky Linux 9.4 on an x86 host machine. If you need any more data or configuration information from me, I'd be happy to provide it.

I think this will need a new flag to specify the user that the container is running in.
The container namespace is retrieved here: https://github.com/b-m-f/wg-pod/blob/c4c9e371c37452ae96bf29a9e199c4e4bef184a1/pkg/podman/podman.go#L40
and could be augmented to search in the containers of the user.
I do not remember the exact rootless network setup right now, but if the container has its own network namespace wg-pod should still work.

So I tentatively have solved it. I forked the repo and did a bit of tinkering: I added a -u (url) flag for the join command, corresponding to the url (path) of the libpod unix socket that can be exposed with the command "podman system service -t 0" by the rootless podman user. Podman lets you connect to any running podman instance with the libpod API. This lets wg-pod, running as root, inspect the rootless podman user's containers and namespaces. Since the netns created rootlessly by slirp4netns doesn't get put under the default /var/run/netns, rather instead into /run/user/[UID]/netns, wg-pod doens't see it, even as root. To remedy this, I added a function to podman.go that uses the aforementioned Podman API to identify the named container, find its PID, and then attach to the created netns withip netns attach [NETNS_NAME] [CONTAINER_PID]. This makes it visible to the system just like any other netns created with ip netns, and allows wg-pod to then move the wireguard interface into it, and everything works! So to recap, rootless container hooks wg-pod, which runs as root with sudo, and everything works out. It's https://github.com/c-herz/wg-pod/tree/add-url-tag
I'll still need to document the things that I added and probably rename the URL flag to something more appropriate, like --socket-path or something, but I can open a PR once I finish. Thanks again for this great project!


Should Not Throw On SimplePath Expressions

I started doing the work to get glimmer master and ember master to work again but ran across some issues. It appears that #402 deleted the tests around this that are mirroring the ones on the Ember side.
This is going to be a semver 🚓  breaking change 🚓 if we require closed over components to be statically hinted that they evaluate to components.
/cc @chancancode

I believe the idea was that the Ember updates would require an AST transform for this?
Need @chancancode to chime in though...

I believe that is quite difficult to do without MU.

I believe the idea was that the Ember updates would require an AST transform for this?

confirm

I believe that is quite difficult to do without MU.

d, it's just a static transformation – when you see {{foo.bar with some=args}} (which is now an invalid syntax in Glimmer), always transform it into {{component foo.bar with some=args}} because that is the only thing it could mean (regular component names cannot have dots, helpers cannot name have dots and cannot be dynamically yielded like that)

@chancancode What about {{foo.bar.without.arguments.or.hash}}?

that would be the "content deopt" (which I think still works on master)

@wycats says:
Just to be clear, {{foo.bar}} and {{foo.bar baz}} are both supported in the semantics. In terms of implementation, {{foo.bar baz}} is "easier" for now because we know ahead of time that it can only be a component. {{foo.bar}} is harder because we can't know until runtime what's going on.
For now, the easiest implementation strategy is to ahead-of-time transform the cases we know statically ({{foo.bar baz}}), and dynamically triage the cases that are ambiguous ({{foo.bar}}). Eventually, we will want to do an implementation-side unification ("appendable"), but we don't need to do that yet and shouldn't slow down the stack branch to do that unification.


SyntaxError: Missing parentheses in call to 'print'

I was trying to install autosub on Windows 8.1 but i did get this message:
pip install autosub
Collecting autosub
  Downloading autosub-0.3.8.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
  Downloading google_api_python_client-1.5.1-py2.py3-none-any.whl (50kB)
    100% |################################| 51kB 1.6MB/s
Requirement already satisfied (use --upgrade to upgrade): requests>=2.3.0 in c:\users\<user>\appdata\local\progr
ams\python\python35-32\lib\site-packages (from autosub)
Collecting pysrt>=1.0.1 (from autosub)
  Downloading pysrt-1.1.1.tar.gz (104kB)
    100% |################################| 112kB 6.6MB/s
Collecting progressbar>=2.3 (from autosub)
  Downloading progressbar-2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\setup.py", line 5, in <module>
        import progressbar
      File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\progressbar\__init__.py", line 59,
 in <module>
        from progressbar.widgets import *
      File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\progressbar\widgets.py", line 121,
 in <module>
        class FileTransferSpeed(Widget):
      File "c:\users\<user>\appdata\local\programs\python\python35-32\lib\abc.py", line 133, in __new__
        cls = super().__new__(mcls, name, bases, namespace)
    ValueError: 'format' in __slots__ conflicts with class variable

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\<user>\AppData\Local\Temp\pip-build-rjxl
i7ux\progressbar\

The reason i believe was python 3 so i tried python 2 instead and it seems to work but instead i now get this message when i try to run it:
python autosub
  File "autosub", line 252
    See --help for further information."
                                       ^
SyntaxError: Missing parentheses in call to 'print'

So i can't even get the help to show up :(

No idea what the first error is caused by. Sorry.
The later syntax error you encountered happens when you run a python2 print command in python3. Double check which version you are indeed using, as it should not be possible to get that error in python2.
I note that there are no prerequisites for python mentioned in the documentation, despite providing a pip command for installation. Maybe something to add @agermanidis?

I manage to get autosub to run now but when it has extracted the wav file (tmpqslifb.wav) it went into a loop with this text. I can't even break it with CTRL+C...
ImportErrorTraceback (most recent call last):
          File "<string>", line 1, in <module>
: file, path_name, etc = imp.find_module(main_name, dirs)
Nfile, path_name, etc = imp.find_module(main_name, dirs)
  File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
ImportErroro module named autosubTraceback (most recent call last):
ImportError:
  File "<string>", line 1, in <module>
N:   File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
o module named autosub
    prepare(preparation_data)
  File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
    prepare(preparation_data)
  File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    file, path_name, etc = imp.find_module(main_name, dirs)
    ImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
:   File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
NImportErroro module named autosub:
No module named autosub


gzip-encode response

I tried running lighthouse against the website, and it recommends gzipping the responses

Implemented something, as recommended by express. Alternatively they recommend using a reverse proxy.

⚡


Takes a while to shutdown..

I'm finding micro lambda locally (during a CNTL+C) takes a while to shutdown. Any tips?

Not sure based on this issue description, but maybe there's still open requests being handled.


Namespace not retained when generating rpc calls

Please consider the following .proto file:
package package.rpc.asks;
import "package/actions/asks.proto";
service Ask {
  rpc GetAskSnapshot(package.actions.asks.RequestAskSnapshot) returns (package.actions.asks.AskSnapshot) { }
}

I would expect this to generate a Ruby file
module Package
  module Rpc
    module Asks
      class AskService < Twirp::Service
        package 'superlist.rpc.asks'
        service 'Ask'
        rpc :GetAskSnapshot, Package::Actions::Asks::RequestAskSnapshot, Package::Actions::Asks::AskSnapshot, :ruby_method => :get_ask_snapshot
      end

however, it drops the package name for the parameter and generates
module Package
  module Rpc
    module Asks
      class AskService < Twirp::Service
        package 'superlist.rpc.asks'
        service 'Ask'
        rpc :GetAskSnapshot, RequestAskSnapshot, AskSnapshot, :ruby_method => :get_ask_snapshot
      end

which results in an error when trying to import the service file. The RequestAskSnapshot is expected as Package::Rpc::Asks::AskService::RequestAskSnapshot which doesn't exists (as it's supposed to be Package::Actions::Asks::RequestAskSnapshot).
Am I missing something?

Hi, yes this appears to be a bug. Right now the only workaround for this is to manually edit the generated file.


AWS::SSM::Parameter support breaks cfndsl

See https://github.com/stevenjack/cfndsl/pull/307 looks like Parameter is a reserved keyword

This looks nasty, and is similar to #206.
The simple fix is:
diff --git a/lib/cfndsl/orchestration_template.rb b/lib/cfndsl/orchestration_template.rb
index 663668e..a52d7e0 100644
--- a/lib/cfndsl/orchestration_template.rb
+++ b/lib/cfndsl/orchestration_template.rb
@@ -28,6 +28,7 @@ module CfnDsl
           parts = resource.split('::')
           until parts.empty?
             break if parts.first == 'Resource' # Don't allow us to define Resource as different method
+            break if parts.first == 'Parameter'
             abreve_name = parts.join('_')
             if accessors.key? abreve_name
               accessors.delete abreve_name # Delete potentially ambiguous names

But feels like we are just continually working around the problem.

Move to a global array Parameter,Resource,Output?

@elmobp created 309 added Output as per your suggestion. Thoughts?

+1


RC2 Upgrade - "Unable to locate project.json"

I'm not sure if this is the best repo for this issue. If not, please redirect me.
I have updated a large RC1 project to RC2. When trying to launch the application I get the following error on startup from Program main:

Unable to locate 'project.json' at '...\bin\Debug\net461\win7-x64'

Screenshot: http://puu.sh/oVhaP/8923e3f573.png
To get around this issue, I added project.json to my "copyToOutput" section in project.json.
"buildOptions": {
    ...
    "copyToOutput": [
        "appsettings.json",
        "appsettings.Staging.json",
        "appsettings.Production.json",
        "project.json"
    ]
    ...
},

As you can see, I also had to do this with appsettings.*.json files as well or else I get a similar error. I can understand this somewhat with appsettings.json since I am reading from it in my application (though I didn't have to do this before), but is this really necessary for project.json? Something doesn't seem right here to me.
Creating a new test app from scratch on RC2 seems to run just fine without specifying project.json in the "copyToOutput".

try deleting obj and bin folders.

try deleting obj and bin folders.

I've done this along with project.lock.json, and .vs folder.

Same problem, same error message. Cleaning project output didn't help.  Thanks for the workaround.

Can you show me the Startup.cs? This can be caused by UserSecrets as it needs a project.json. Usually because the base paths are miss-configured. If you look at the app that is working you will see differences.

@glennc, Yep, that was it. I was missing .SetBasePath( env.ContentRootPath ) on my ConfigurationBuilder in Startup.cs. Working great now. Thanks.
Before (RC1):
    public Startup( IHostingEnvironment env )
    {
        var builder = new ConfigurationBuilder()
            .AddJsonFile( "appsettings.json" )
            .AddJsonFile( $"appsettings.{env.EnvironmentName}.json", optional: true );

        if( env.IsDevelopment() )
        {
            builder.AddUserSecrets();
            builder.AddApplicationInsightsSettings( developerMode: true );
        }

        builder.AddEnvironmentVariables();
        Configuration = builder.Build();
    }

After (RC2):
    public Startup( IHostingEnvironment env )
    {
        var builder = new ConfigurationBuilder()
            .SetBasePath( env.ContentRootPath )
            .AddJsonFile( "appsettings.json" )
            .AddJsonFile( $"appsettings.{env.EnvironmentName}.json", optional: true );

        if( env.IsDevelopment() )
        {
            builder.AddUserSecrets();
            builder.AddApplicationInsightsSettings( developerMode: true );
        }

        builder.AddEnvironmentVariables();
        Configuration = builder.Build();
    }

So are we supposed to deploy project.json or no to fix this issue?
Consider that I have an Azure deployment slot for Development and Staging. Development doesn't work because it tanks without project.json. This wasn't the case with RC1.


ImportError

I was running:
python run_demo_pytorch.py --config_filename=data/model/pretrained/METR-LA/config.yaml
This is what I got:
Traceback (most recent call last):
File "run_demo_pytorch.py", line 8, in
from model.pytorch.dcrnn_supervisor import DCRNNSupervisor
File "C:\Users\mi\Desktop\DCRNN_PyTorch-pytorch_scratch\model\pytorch\dcrnn_supervisor.py", line 6, in
from torch.utils.tensorboard import SummaryWriter
ImportError: No module named 'torch.utils.tensorboard'

oh, maybe you'll have to install tensorboard as well? Can you try after installing tensorboard


Make app command parse error message more readable

Summary
Make app command error not show the block code, since alerts don't show block codes.
Since they will be different between webapp and mobile, I had to move the error message to the export file.
Ticket Link
https://mattermost.atlassian.net/browse/MM-34074

Building app in separate branch.

Successfully building:
https://circleci.com/gh/mattermost/mattermost-mobile/14649
https://circleci.com/gh/mattermost/mattermost-mobile/14648

Artifact links:
https://14649-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.ipa
https://14648-70265724-gh.circle-artifacts.com/0/tmp/artifacts/Mattermost_Beta.apk

Cherry pick is scheduled.


Strange result of S3DIS

@HuguesTHOMAS Thanks for your codes. When i test on area5 of S3DIS, we found it got 0.0 miou  in the category of beam, but there are 4 beam instances on area5 .

Hi @YoungSun3Pan,
This is completely normal. Like any dataset, S3DIS is not perfect. In particular, the beam class is not well defined at all. In Area5, the beam instances are unique because they are all inclined as shown is the two following images:

In the rest of the training set, all beams are horizontal as shown here:

If you get a score higher than 0%, it could nearly be considered as a mistake in that situation. Anyway this is just a class that you should ignore.


asserts.is_class_instance does not work, klass is always Null inside implementation

asserts.is_class_instance does not work, klass is always Null inside implementation

What version of Gadot are you running?
And could you show me your test?
You may also want to check if your object is null before you pass it in.

I'm using Godot version 3.2 and I did check that the object is not null. Let me put in some sample code :)

Closing until further notice. No apparent issues on my end.


[cilium-dbg] pretty-print the IPv4 fragmentation map

Implement a bpf frag list for https://github.com/cilium/cilium/tree/main/pkg/maps/fragmap.

@julianwiedmann  Can I work on this issue? ❤
We can get fragmentation by cilium map get cilium_ipv4_frag_datagrams now.
But we want a dedicated new command with prettier output, am I right?

OK, I'll try it!

Also focusing

Can't find cilium_ipv4_frag_datagrams, setting helm value fragmentTracking.

@julianwiedmann Hello, i have implemented it, you can have a check to see if that's what you want.
https://github.com/cilium/cilium/pull/34751
Example:


UI Navigation Menu will be partly hidden by browser link display

Environment

Nautobot version (Docker tag too if applicable): 2a8a24ac5281 (v2.1.2)
Python version: 3.11
Database platform, version: PostgreSQL 15-alpine
Middleware(s):

Steps to Reproduce

Move the mouse over a menu item

Expected Behavior
All menu items should be visible

Observed Behavior
The last menu item is partially hidden even when fully scrolled down - see screenshot

Indeed it does address this issue @glennmatthews.  The dropdown menus no longer cover the menu items below and they will push down when ones above it are expanded.  There are various other improvements in the #5146 PR related to the side navigation.


RPC / JSON Serialisation issue in latest WS alpha

I've been building a site using UI.Next on the client only along with client-server RPC. Over the past few weeks I've been updating it to the latest WebSharper 3 alpha and it's been quite painless.
Unfortunately the update from 3.0.26-alpha to 3.0.36-alpha seems to have broken RPC for a single type. All other types can be serialised fine, however this type returns null and crashes on the client-side with undefined for any member accesses. The type is a simple record representing something similar to a blog post that is instantiated with another concrete record before passing to the client side.
    type T<'a> = {
        id : Guid
        whenCreated : DateTime
        whenModified : DateTime
        authorId : Guid option
        authorName : string option
        cards : 'a list
        title : string
        caption : string option
        postState : PostState
        tags : Tag list
        viewsLeft : int option
        timeLimit : DateTime option
        password : string option
        postAnon : bool
        rankCards : bool
        upVotes : int
        downVotes : int
        flaggedCount : int
    }

I noticed once during WebSharper compilation that several warnings were shown simlar to 'JSON Schema error from System.String[]' which may be related but I cannot reproduce that. For now I've reverted to 3.0.26-alpha but any help would be appreciated.
Thanks.

I just tried to reproduce with 'a = int and without the postState and tags fields, and it worked correctly. What do you instantiate 'a as, and what do the types PostState and Tag look like? The problem is probably in one of those.

Thanks for looking. So PostState and Tag are simple discrimiated unions as below,
    type PostState = Processing | Ready | Disabled | Flagged | Deleted

    type TTerm =
        | Tag of string
        | Author of string
        | Group of string

'a is a more complex nested type that is itself parametersied depending on whether it is running on the client or server. I've put together a small test case and will narrow down the fields in 'a in order to narrow down the type that is causing the problem and get back to you. Thanks.

Can you still reproduce this issue with 3.0.46-rc1?


Use pytest-postgresql>=4

Description
pytest-postgresql>=4 requires psycopg>=3 instead of psycopg2. This PR implements this change.
Self Check:

[ ] Attached issue to pull request
[x] Changelog entry
[ ] Type annotations are present
[ ] Code is clear and sufficiently documented
[ ] No (preventable) type errors (check using make mypy or make mypy-diff)
[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[x] Correct, in line with design
[ ] End user documentation is included or an issue is created for end-user documentation

Reviewer Checklist:

[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[ ] Code is clear and sufficiently documented
[ ] Correct, in line with design

Processing this pull request

Merged into branches iso5, master in 9feec509a1ffc449929fb184873057a0e60cd154


Fix rate limiting settings

Closes #1190
Proposed changes

fix rate limiting fields based on Umbrella Admin API

@frenchbread, could you please review this PR?

@jykae Have you been able to test what happens when amount of requests is over the rate limit? I've set a custom rate limit for sample API backend and it doesn't seem to work. What's the workflow for testing, if i'm doing it wrong?

@frenchbread I tested this with shell script oneliner that had for loop that runs several requests.
for ((i=1;i<=1000;i++)); do curl -I https://nightly.umbrella.apinf.io/teosto/event; done

That's probably the simplest way. I would like to know the fields in Apinf edit form that you have set, if they were understood right?
I commented in the main issue about rate limiting when I first tested just with Umbrella Admin UI.
When rate limits hits boundaries, Umbrella gives HTTP status 429:
HTTP/1.1 429
Server: openresty
Date: Thu, 28 Jul 2016 08:14:53 GMT
Content-Type: application/json
Connection: keep-alive
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 0
Access-Control-Allow-Origin: *
X-Cache: MISS
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Interesting headers here are HTTP status 429 and X-RateLimit headers.

Please resolve conflicts.

When testing the rate limit settings, I get the following errors when submitting:
failed [422] {"errors":{"settings.rate_limits[0].duration":["can't be blank","is not a number"],"settings.rate_limits[0].accuracy":["can't be blank","is not a number"],"settings.rate_limits[0].limit_by":["can't be blank","is not included in the list"],"settings.rate_limits[0].limit":["can't be blank","is not a number"]}}

@brylie Weird, haven't seen those before. I will get to this after I have visibility feature ready, and PR accepted.

Closing this one..


New Contribution

Contributor: Lewis
SSH Public key: [contributor SSH public key (if you don't have one, submit the issue to receive instructions)"- Required]
Attestation: [any form of attestation for contribution (e.g., signature) - Optional]

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGmKCM8mt2/5LnujXpxITJ3nYglTGSUz5ltCmb0x/so7

I'm waiting

Downloading contribution<PHONE_NUMBER>.csrs
** Resuming transfer from byte position<PHONE_NUMBER>4
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100   367    0   367    0     0    243      0 --:--:--  0:00:01 --:--:--   243
Computing hashes for downloaded contributions..

Downloading will take a lot of time......


send to bundler request failed; http code: 402

Hello, I am trying to use the bundler to upload files but every time I attempt to submit a bundle I receive this error:
send to bundler request failed; http code: 402
this is my flow for finalizing:

	_, err := bm.Wallet.Client.BatchSendItemToBundler(bm.BundleItems)
	if err != nil {
		return err
	}

	bd, err := utils.NewBundle(bm.BundleItems...)
	if err != nil {
		return err
	}

	_, err = bm.Wallet.SendBundleTx(bd.BundleBinary, nil)
	if err != nil {
		return err
	}

v1.3.2 has fix bundler tx.
and the readme also add how to use bundler service
https://github.com/everFinance/goar/tree/v1.3.2#notice

There are two reasons why goar cannot push bundle item to bundler servise

Bundler service is now available as a paid service. The bundler item data signature address must be recharged with ar in order to use the bundler service
Bundler gateway url changed.

v1.3.2 version has resloved this problem


Regtest genesis block timestamp is newer than subsequent blocks upon restart.

To reproduce:

Start a regtest node from genesis and run it for a few minutes to generate some blocks.

$ cargo run -- --data-dir /tmp/regtest_issue --mine --unrestricted-mining --network regtest

Display block 0 (genesis) and block 1.  (note: some fields removed for clarity)

note: requires 3e21a69e64528857d39b8b55fe738b0049526681 or newer for neptune-cli
$ neptune-cli block-info height/0
height: 0
digest: 04935d4fe177d61cd925daeb05144be4bfeb25115ed5ae1c96d4ebcd4028833d11aae0cc3d23a002
timestamp: 2024-05-06T15:40:00-07:00
is_genesis: true

$ neptune-cli block-info height/1
height: 1
digest: 78c3514623288b6adad670fc8ca5e452486f7257a98d049fdf564b5c578787807791999ef5fbdd52
timestamp: 2024-05-06T15:45:30.412-07:00
is_genesis: false

Notice that the timestamp for block 0 pre-dates that of block 1.  In this case by 5 minutes.   In actuality, they were mined nearly in the same second, but the genesis block gets rounded down to nearest 10 minutes.

shut it down.  ctrl-c or neptune-cli shutdown and note the time.

wait 10 minutes, at least.

restart.  no need to mine this time.

$ cargo run -- --data-dir /tmp/regtest_issue --network regtest

Display block 0 (genesis) and block 1.  (again).

$ neptune-cli block-info height/0
height: 0
digest: bf4b52a6d289682fa6a3c1cd9ffbd52949f3dcea3082bb34721ca6c25dcd6db7edd1d63349aadd59
timestamp: 2024-05-06T16:00:00-07:00
is_genesis: true

$ neptune-cli block-info height/1
height: 1
digest: 78c3514623288b6adad670fc8ca5e452486f7257a98d049fdf564b5c578787807791999ef5fbdd52
timestamp: 2024-05-06T15:45:30.412-07:00
is_genesis: false

Note that the genesis timestamp is now larger than block 1.   Also, the genesis digest has changed since the first time we ran neptune-core.  (bf4b52a6d.. != 04935d4fe)
Analysis
This is an unintended consequence of using a dynamic timestamp for RegTest when creating the genesis block.   This timestamp is floored down to the nearest 10 minutes.
The genesis block is never stored in a DB (afaik).   As such, upon any restart after 10 minutes, a new genesis block is created.
Surprisingly, this situation is not detected as an error and the rest of the blockchain is loaded.  The end result is that we have an invalid blockchain, with block1's parent-hash being different from the (new) genesis block.
I see at least two problems here:

We should be detecting this problem upon restart.  Somehow validations are failing.
imho, we should not be using a dynamic timestamp for regtest.   Bitcoin does not, and I suggest we follow their example in this case.
if we are going to use dynamic timestamp, then at minimum we must make certain that genesis block gets stored in on-disk block-db and loaded from it correctly.

For reference, here is the start of my log from the 2nd run.   Note that there are no warnings or errors, and we load block 19 (tip) just fine.
    Running `target/debug/neptune-core --data-dir /tmp/regtest_issue --network regtest`
2024-05-06T23:01:13.289644955Z  INFO ThreadId(01) neptune_core: Data directory is /tmp/regtest_issue/regtest
2024-05-06T23:01:13.289849421Z  INFO ThreadId(01) neptune_core::models::state::wallet: ***** Reading wallet from /tmp/regtest_issue/regtest/wallet/wallet.dat *****

2024-05-06T23:01:13.290019973Z  INFO ThreadId(01) neptune_core: Now getting wallet state. This may take a while if the database needs pruning.
2024-05-06T23:01:13.302282658Z  INFO ThreadId(01) neptune_core: Got wallet state.
2024-05-06T23:01:13.308683924Z  INFO ThreadId(01) neptune_core: Got block index database
2024-05-06T23:01:13.313152684Z  INFO ThreadId(01) neptune_core: Got peer database
2024-05-06T23:01:13.319768333Z  INFO ThreadId(01) neptune_core: Got archival mutator set
2024-05-06T23:01:13.399069301Z  INFO ThreadId(01) neptune_core: Now listening for incoming transactions
2024-05-06T23:01:13.399398108Z  INFO ThreadId(01) neptune_core: Most known canonical block has height 19
2024-05-06T23:01:13.399426512Z  INFO ThreadId(01) neptune_core: Checking if we need to restore UTXOs
2024-05-06T23:01:13.40313687Z  INFO ThreadId(01) neptune_core::models::state: Checking 19 incoming UTXOs
2024-05-06T23:01:13.416758918Z  INFO ThreadId(01) neptune_core::models::state: No missing monitored UTXOs found in wallet database. Wallet database looks good.
2024-05-06T23:01:13.416805463Z  INFO ThreadId(01) neptune_core: UTXO restoration check complete

I ran into a related problem when running run-multiple-nodes.sh, waiting 10 minutes, then running run-multiple-nodes-advanced.sh. This triggers the DifferentGenesis behavior of the client which closes connections.

I disagree that we should be detecting the problem. The client assumes that the database and disk content is correct. The policy is that if it's not correct, it doesn't get stored.

This is not a huge issue in my opinion. Regtest got a dynamic launch data value since this allows us to test time locks on transactions better, without mocking what the system time is. I'm changing the time resolution for RegTest to 10 hours, making these problems less likely to occur.

Let's move block validation on startup discussion to #146.
I agree regtest digest changing is not top priority.  Though I do hope we make a fixed regtest genesis block before launch, to avoid these kinds of confusions/issues.
For reference, I wanted to be certain that bitcoin-core has a fixed regtest genesis block, so I asked about it on stackexchange, and it does.   We don't always have to follow bitcoin's lead, but I think this issue is pointing out there is a good reason for it, and also the fact that different apps will generate different regtest from eachother, such as I initially encountered with the block-explorer.

RegTest is designed for local testing, like on a local network or in the integration tests that we have, like run-multiple-instances-from-genesis.sh. If you want to run tests in a wider setting where you connect to nodes you do not control yourself, you should be using TestNet instead.
Now that we've changed RegTest's time resolution from 10 minutes to 10 hours I think that solves some of our problems. Maybe you shouldn't be running the block explorer against a RegTest node but rather a TestNet node?


Beginner Question: I can't find any of the .exe files?

This is my first time really building something on Github. How do I build this repository to create the .exe files.
When I download the repository I don't see any .exe files.

Open the project in visual studio and click Build -> Rebuild. If all is built successfully you will see the KinectServer.exe file in the path "\ProCamCalibration\KinectServer\bin\Debug" and similarly for other .exe files.

Thank you! Would you know how I can test out the mapping samples? Clicking on the .exe does not work.

I am still trying to get it to run. Try to follow the instructions in README.md

Yea I wasn’t too sure how too sure how to pass the xml as an argument. Do I open command prompt and put both file names in there?
From: Chi-Jui Wu<EMAIL_ADDRESS>Sent: Friday, June 5, 2015 7:52 PM
To: Kinect/RoomAliveToolkit
Cc: Cedric Yarish Ferland
Subject: Re: [RoomAliveToolkit] Beginner Question: I can't find any of the .exe files? (#6)
I am still trying to get it to run. Try to follow the instructions in README.md
—
Reply to this email directly or view it on GitHub https://github.com/Kinect/RoomAliveToolkit/issues/6#issuecomment-109485402 .

If, like me, building this project is your first foray into visual studio and NuGet and you see errors like this:
Error		This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\SharpDX.2.6.3\build\SharpDX.targets.
Try adding http://www.nuget.org/api/v2/  as a source in your NuGet package manager settings source list. I was unable to build due to NuGet failing to find the SharpDX.2.6.3 package at all in the NuGet api v3 source that is configured by default in visual studio 2015.

Interesting. I just pulled down a fresh .zip file and didn't see this behavior.


Project Must Utilize Code Review/Approval for New Changes

https://github.com/spacetelescope/ins-jwst-community-software/blob/master/tier2_standards/code_review.md

All PRs are issued from a forked repo and require a review to be merged, e.g. https://github.com/spacetelescope/awesimsoss/pull/88/files/8ab05be8b4d19f479fcbda246057498a57d2d8a6


opentsdb: 2.3.0 -> 2.3.1

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.
This update was made based on information from https://repology.org/metapackage/opentsdb/versions.
These checks were done:

built on NixOS
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/bin/tsdb passed the binary check.
Warning: no invocation of /nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/bin/.tsdb-wrapped had a zero exit code or showed the expected version
1 of 2 passed binary check by having a zero exit code.
0 of 2 passed binary check by having the new version present in output.
found 2.3.1 with grep in /nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1
directory tree listing: https://gist.github.com/b48d02ce7d61ccc9a1066feef216ebeb
du listing: https://gist.github.com/fa09ba05d6c0f628805a900c2624ac13

meta.description for opentsdb is: '"Time series database with millisecond precision"'.
cc @ocharles for testing.

@GrahamcOfBorg  eval

No attempt on aarch64-linux (full log)
The following builds were skipped because they don't evaluate on aarch64-linux: opentsdb
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.

Success on x86_64-linux (full log)
Attempted: opentsdb
Partial log (click to expand)
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/bin/.tsdb-wrapped: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/bash"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/tools/create_table.sh: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/tools/upgrade_1to2.sh: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/tools/check_tsd: interpreter directive changed from "/usr/bin/env python" to "/nix/store/xlc7ld1xd57ha3x9mbx11c84j290va0f-python-2.7.15/bin/python"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/tools/clean_cache.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/bash"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/tools/tsddrain.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/xlc7ld1xd57ha3x9mbx11c84j290va0f-python-2.7.15/bin/python"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/bin/mygnuplot.sh: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/bin/tsdb: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/bash"
/nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1/share/opentsdb/etc/init.d/opentsdb: interpreter directive changed from "/bin/sh" to "/nix/store/m47apl3hq3i52fzy2cz24378p0xn4lyx-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/bzg1dfd5xpc3rqgi601a162vajil47r0-opentsdb-2.3.1...

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: opentsdb
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


Don't rewrite to id3v2.4 when input is tagged with id3v2.3

TagLib >= 1.8 supports choice of saving as 2.3/2.4.

Thank you! This works great.


Issue building with custom source_appimage

Hello, I am having an issue when attempting to build with a custom source_appimage.
The custom AppImage definitely exists, but is not being picked up by subprocess.run for some reason.
Repro:
$ ls build/love/linux64
love.AppImage

$
$ makelove appimage
Loading config from default path 'makelove.toml'
Found conf.lua
Assuming default löve version '11.3'
Building targets: appimage
Assembling game directory..
Created build_output/love/umg.love
>> Building target appimage
Extracting source AppImage 'build/love/linux64/love.AppImage'..
Traceback (most recent call last):
  File "/home/unix43/.local/bin/makelove", line 8, in <module>
    sys.exit(main())
  File "/home/unix43/.local/lib/python3.10/site-packages/makelove/makelove.py", line 349, in main
    build_linux(config, version, target, target_directory, love_file_path)
  File "/home/unix43/.local/lib/python3.10/site-packages/makelove/linux.py", line 134, in build_linux
    ret = subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'build/love/linux64/love.AppImage'

makelove.toml:
name = "umg"

love_files = [
    "::git-ls-tree::",
    "-*/*.md", # no markdown files
    "-*/.*", # .git, .github
]

default_targets = ["appimage"]

# By default this is "makelove-build"
build_directory = "build_output"

[appimage]
# custom appimage:
source_appimage = "build/love/linux64/love.AppImage"

I can reproduce this issue, so this is very likely a bug. I will look into it this evening!

I see what the issue is. The AppImage always extracts itself to the current working directory, so I cannot easily control where I run it from – it has to be the directory I want to extract it to.
This means that the path in source_appimage would have to be relative to the target's directory (e.g. build_output/appimage in your case), but that is not an option, because that directory is cleared before the target is built.
The alternative is to specify source_appimage as an absolute path.
I added a fix that will make the path absolute if it is not already given as an absolute path.
If you only want to official released versions, you can just make the path absolute as a workaround.

Thank you very much!


R14: Home Page: The software  Home Page shall include selection objects, FDA statistics, release notes, help files, and contact information

Extracted from FDA metadata.  Tools include JQuery

statistics are queried from openFDA endpoint to get statistics. Top nav bar added to house links to help files, release notes and install notes

Completed.
SQA


Can not override 'toString' method of a mix-in class

TypeScript Version:  2.2.1
Code
type Constructor<T> = new(...args: any[]) => T
function Tagged<T extends Constructor<{}>>(Base: T) {
  return class extends Base {
    _tag: string;
    constructor(...args: any[]) {
      super(...args)
      this._tag = ''
    }
  }
}

class A {
  toString () {
    return 'class A'
  }
}

class B extends Tagged(A) {
  // error TS2425
  toString () {
    return 'class B'
  }
}

class C extends A {
  toString () {
    return 'class C'
  }
}

Expected behavior:
No error.
Actual behavior:
error TS2425: Class 'Tagged.(Anonymous class) & A' defines instance member property 'toString'
, but extended class 'B' defines it as instance member function.

Same here - it won't allow derived class to override any method that exists in both base class and the mixin. A workaround would be highly appreciated.

We should be treating apparent properties as if they were on the prototype (because they are)

it's very helpful to me!


Minikube should have onboarding process similar to compose / kubectl extensions

See issue: https://github.com/containers/podman-desktop/issues/6358
Minikube should be part of onboarding process on how to install / use / etc similar to Compose and kubectl.

https://github.com/containers/podman-desktop/issues/5156


[RFC] How to handle BC breaking changes on Model weights or hyper-parameters

🚀 Feature
In order to fix bugs we are sometimes forced to introduce BC breaking changes. While the process of such introductions is clear when it comes to code changes, it's not when it comes to model weights or hyper-parameters. Thus we should define when, why and how to introduce BC-breaking changes when it comes to model weights or model hyper-parameters.
Motivation
We have recently bumped to a few issues that motivate this. Here are a few examples:

On #2326 we discovered a bug in the initialization of some weights of all detection models. If we fix the bug on code, we should probably retrain the models. What happens if their accuracy improves? How do we make them available to our users?
How do we handle cases such as #2599 where in order to fix a bug we need to update the hyper-parameters of the model?

Approaches
There are quite a few different approaches for this:

Replace the old parameters and Inform the community about the BC breaking changes. Example: #2942

Reasonable approach when the accuracy improvement is substantial or the effect on the model behaviour is negligible.
Keeps the code-base clean from workarounds and minimizes the number of weights we provide.
Can potentially cause issues to users who use transfer learning.

Write code/workarounds to minimize the effect of the changes on existing models. Example: #2940

Reasonable approach when the changes lead to slight decrease in accuracy.
Minimizes the effects on users who used pre-trained models.
Introduces ugly workarounds on the code and increases the number of weights we provide.

Introduce versioning on model weights:

Appropriate when introducing significant changes on the models.
Keeps the code-base clean from workarounds.
Forces us to maintain multiple versions of weights and model config.

It's worth discussing whether we want to adapt our approach depending on the characteristics of the problem or if we want to go with one approach for all cases. Moreover it's worth investigating whether we need to handle differently changes on weights vs changes on hyper-parameters used on inference.
cc @fmassa @cpuhrsch @vfdev-5 @mthrok

I think the future proof way of handing is the option 3. and having a factory function for versioning. I think we need at least two versioning for them, one for code (model version) and one for parameter (param version).
Model version can be added when there is significant change on the code, which is BC-breaking for the previous model.
Then, the question is narrowed down to what we want to do when there is a code change on model which is backward compatible with the existing parameter but would change the performance. If we want to be perfect on accessibility/availability, then we need to introduce the third versioning, which is like a minor version of each model, but I am not sure how often that happens.
class MyModel1(torch.nn.Module):
    def __init__(self, model_configurations):
        ...

class MyModel2(torch.nn.Module):
    def __init__(self, model_configurations):
        ...

def get_my_model(model_version, param_version):
    if model_version < 1:
        model = MyModel1()
        if param_version < 1:
            url = parameter_for_1_1
        elif parameter_version < 2:
            url = parameter_for_1_2
    elif model_version < 2:
        model = MyModel2()
        if param_version < 1:
            url = parameter_for_2_1
        elif parameter_version < 2:
            url = parameter_for_2_2
    else:
        raise ValueError('Unexpected model_version')

    param = _get_param(url)
    model.load_param(param)
    return model

Here is an example of parameters we don't currently store in state and it's unclear whether they should be considered part of the code or part of the params:
>>> from torch.nn.modules.dropout import Dropout
>>> x = Dropout(p=0.12345)
>>> x.state_dict()
OrderedDict()

It's worth discussing whether it makes sense to store these inside the state of the module.

On a general note I also agree with option 3: Since the weights affect the behavior of the model, you could, for the purposes of this discussion, think of them as code. With Python code we use versioning (git), so why not also with model weights? From that perspective we should rigorously version every model (whether a change is planned or not) and tag it with the version of the code that was used to generate it.
The Dropout probability parameter is an interesting one, since it doesn't affect inference, but will affect fine-tuning. We should make a decision as to the level of BC-compatability we provide.
Also, on another note, this affects the entirety of PyTorch domains and also projects such as torch serve.
From a technical perspective, a low-tech way of associating model weights to versions is by using md5 or such. We can further encode that map into the link we use to store the model.