Payment fields not rendering with hosted fields

We are randomly seeing cases of users reporting that the 3 hosted fields (credit card number, cvv, & expiration date) are not rendering.
I'm posting this here to see how many others are seeing reports of this. We are using the 3.4 SDK but we've seen it on the 2.x SDK and other 3.x versions.
I've also opened support tickets with Braintree on this but so far they are unable to find out why this is occurring. It is not reproducible and occurs on various browsers & operating systems.

We have received a few reports of overzealous anti-virus software preventing the Hosted Fields iframes from loading. In these cases, a warning message from the antivirus is loaded into the field iFrames. Because the warning message is designed to be shown on a full page, this often manifests as a slightly off-color field.
Do the fields just appear blank or do they render an off-color background? Are there errors displayed either in the fields or in the browser's console?

The screenshots I've seen have been either
a) boxes rendered but can't type in those fields
b) nothing rendering
In neither case are they off-color or showing errors in the fields. I haven't been able to get anyone to send anything from their console log. We do use a javascript logger and so are able to capture some errors. However, due to an issue with how Braintree hosts (no crossorigin support, see https://www.w3.org/TR/html5/scripting-1.html#attr-script-crossorigin ) their JS files we sometimes get the generic script error vs a detailed stack trace.

So far, there is not enough information for us to do anything. We'll leave this open for a while in case anyone else reports this issue so we can have more data about what is going on.

I've found this bug too. It happens with the latest Opera mini browser on mobile.
User agent: Opera/9.80 (Android; Opera Mini/20.1.2254/37.9172; U; hu) Presto/2.12.423 Version/12.16
https://play.google.com/store/apps/details?id=com.opera.mini.native
You can see the input fields or the input fields border, but the inputs actual height is only 2 pixel.
So you can't see what you type in those fields.

@Mneroen Although we expect that Opera Mini should work with Hosted Fields, we cannot provide support because it is not one of our currently supported browsers.
@gerryhigh We are closing this issue for now. If you receive more information that sheds more light on this issue, please feel free to reopen.

@skunkworks We have also been experiencing this intermittent issue.  It happens most often on Internet Explorer 11 (similar to this issue), possibly when the preflight options request is aborted and blocks the frame from loading, yet works fine after refreshing the page.

@eschie Thanks for the additional info.

@eschie We are interested to see if the TCP preconnect workaround from https://github.com/braintree/braintree-web/issues/166#issuecomment-274580932 fixes this issue as well.

@skunkworks Will keep you posted. The IE Fix is in production so if it reduces errors we'll roll out to all browsers.

I reproduced this issue today twice in IE11 in < 30 min after we got reports from several users in several browsers (Edge, IE11, Chrome, Samsung Internet 3.1, on computers, phones, and tablets).  I experienced it in Mac Chrome during development.  Inspecting the javascript, I found that the hosted fields instance was successfully created (as was the PayPal instance I also created), and the iFrames were successfully injected, but the javascript in those iFrames never created an input field.  There were no errors in the JS console.  Most of the time it does not happen.  The PC I reproduced it on was a slow budget PC laptop.

We're taking a look at this issue with the folks on our API Support team! We'll continue to keep you updated if we find a fix.

wrapping the hosted fields instantiation in a setTimeout(function () { [hosted fields js] }, 500); seems to solve the problem.  I tested in Chrome and IE.  Chrome would reproduce with 0 but not with 500.  We're calling the braintree instance creation and hosted fields instantiation when a script containing client.js and hosted_fields.js emits the "load" event.... so it looks like maybe hosted fields isn't always finished with its setup when the load event is emitted.

@cornellouis could you provide a full code snippet for how you're setting it up so we can debug it on our end?

Ok:
http://pastebin.com/w4bBLpd2

@cornellouis If you remove the setTimeout and the task queueing/running, does the behavior improve? It's a bit unclear to me what JSQueue and runTask are used for in your example.

We have a single page web app that dynamically downloads and reacts to JS when people click through to a payment page.  JSQueue just stores handlers and waits for different JS scripts to emit "load."  When the script element for braintree emits "load", the corresponding function passed into runTask() is executed.  That's how we avoid race conditions between the script loading and using the window.braintree variable.
If the payment page is loaded directly via url, the braintree script is already in the dom and marked with "defer."  My understanding is that deferred scripts run in order, so in that case there is a final deferred script that calls everything that's been passed into runTask() so far.  In that scenario, I haven't been able to reproduce it today even without the setTimeout.

Thanks for the detailed response -- we will investigate further.

This probably has continued to occur in production even w/ the 500ms delay around the hosted fields instantiation.  We've found it to be very reproducible when the cache is disabled in Chrome and there is no setTimeout() wrapping the hosted fields instantiation.    That's why it claims braintree isn't defined.  The output from Chrome's net internals is:
{"params":{"priority":"HIGHEST","url":"https://assets.braintreegateway.com/web/3.6.3/html/hosted-fields-frame.min.html#46904ff6-0de8-4ef6-9216-2cf96fbd9233"},"phase":1,"source":{"id":690276,"type":1},"time":"298075886","type":2},
{"params":{"delegate_blocked_by":"NavigationResourceThrottle"},"phase":1,"source":{"id":690276,"type":1},"time":"298075886","type":100},

Thanks for the additional info @cornellouis. Do you mind passing along your production site URL to us via<EMAIL_ADDRESS>This might help us reproduce this on our end.

We were previously in contact with support (ticket #1455806) but it didn't seem to go anywhere.  I think that includes the information for our sandbox.

Sorry about that -- we'll take a fresh look at this.

@cornellouis Thanks for your patience and exploration on this issue. We still haven't been able to reproduce it, but the screenshots you provided in the ticket clearly show that although the iframe is being loaded, the script file inside the iframe is failing to load.
We're working on a solution to write the contents of the JavaScript in that script file directly inside the iframe when we build the html files. This should ensure that the braintree object is present in the iframe before braintree.hostedFields.create is called.
This will be available in the next release and should solve the issue. I'll update this issue when it has been released.

@cornellouis We've had luck reproducing more often in Firefox or Safari with a freshly cleared cache.

3.16.0 now dumps the code directly into the iframe, so there's no external request to get the script (hopefully solving the cause of the issue that @cornellouis was able to reproduce).
Could those of you who were able to reliably reproduce the issue try with 3.16.0 and report back your findings?

We were able to reproduce.  When QA tried, the console showed:
http://imgur.com/a/Iw5ue
When I tried, my console showed:
http://imgur.com/a/50fFc

@cornellouis can you respond to ticket you opened (#1455806) and provide a staging site with steps to reproduce? We still have not been able to reproduce locally.

@crookedneighbor I responded to the ticket w/ the info on our staging server and reproduction steps.

For our reference in the future, the new ticket number is 1529535

Is there any further news on this?
What at this stage is the recommended solution, workaround or alleviation of the issue of hosted fields not fully rendering?

We still have not been able to reliably reproduce the issue on our end, which makes it difficult to track down precisely what the issue is.
Our initial hypothesis was that for some reason script files in the iframes were not loading, so we changed it to inline the JavaScript into the files in version 3.16.0 and higher.
If you have a site and a way to reproduce it reliably, we'd love to be able to take a look at it.
Also, does anyone who is having these issues have a content security policy in place? If so, make sure that you're following the guidelines here in the section about content security policies: http://braintree.github.io/braintree-web/current/

@cornellouis Our support team replied to your ticket # 1529535. Hopefully, the content security policy suggestion resolved your issue. If not, please follow up with our support team, or open a new issue here on GitHub.
@RikdeBoer In version 3.19.1 (July 5, 2017), we've inlined JS in the HTML files, which could make loading more reliable.
If you're still able to reproduce the issue, please open a new issue with a sample app or staging site that demonstrates the problem. We'll investigate from there. Thank you!

I was just able to reproduce this, and I think I have a fix for it. I'll update here when it is released.

🤞  This is now fixed with version 3.20.0 https://github.com/braintree/braintree-web/blob/master/CHANGELOG.md#3200
Please report here with reproducible steps if you are still running into this issue and I'll re-open it.

@crookedneighbor have you had similar issues with vpn software? We just had someone who said disabling NordVPN allowed them to enter their card (hosted fields). I can do some investigating of this but was surprised not to see a single mention of VPN in your past issues. I saw from my logs that the script had an error loading but couldn’t see what it was.

@crookedneighbor have you had similar issues with vpn software? We just had someone who said disabling NordVPN allowed them to enter their card (hosted fields). I can do some investigating of this but was surprised not to see a single mention of VPN in your past issues. I saw from my logs that the script had an error loading but couldn’t see what it was.

I've never had SDK issues with vpn software.
If you can find a way to easily reproduce and let us know the error, please open a new issue so we can investigate it.

I've never had SDK issues with vpn software.
If you can find a way to easily reproduce and let us know the error, please open a new issue so we can investigate it.


Fix to raise exception when no CPU/GPU hardware is detected - issue #90

I added a check in BaseEmissionsTracker to raise ValueError if no CPU/GPU is detected, i.e. if hardware list is empty. I also had to remove exception suppression from OfflineEmissionsTracker otherwise it will not work in that case - not sure why the exception suppression was there in the first place (you don't have one for EmissionsTracker).
With this simple fix we don't force a program exit, i.e. sys.exit(), instead we gave users a graceful option of capturing the exception and proceeding with their code. Example:
from codecarbon import EmissionsTracker

def tracker_start(tracker):
    if tracker is not None:
        tracker.start()

def tracker_stop(tracker):
    if tracker is not None:
        tracker.stop()

try:
    tracker = EmissionsTracker()
except ValueError:
    tracker = None

def train():
    # some insane BERTesque model...

tracker_start(tracker)
train()
tracker_stop(tracker)

The above can be applied in those instances where CodeCarbon is liberally scattered throughput project code AND you are unsure whether you will run into a situation where you're running the code on Windows machine with WSL.
If using the decorator, then to gracefully handle the exception you need to:
from codecarbon import track_emissions

def train():
        # some insane BERTesque model...

try:
    @track_emissions()
    def run_train():
        train()
except ValueError:
    train()

Not very elegant, but again, this is extreme case where you want to handle all the scenarios. 99% people benchmarking energy usage when training are going to be doing it in "real" environment with some nice CPUs and GPUs, so this PR essentially just gives an exception to those users (like my naive self!) who get overly excited and try this lovely library on some whimsical Windows machine under WSL1 :-).

@kngoyal I pushed an update, please have a look if it's better now. I changed from exception to warning, i've put back exception suppression. To me this looks a lot nicer now - user will get a visible warning but code will continue to execute.

One last thing will allow us to merge! The precommit hook is currently failing due to some annoying formatting issue.  I think I'm unable to solve this on my end since this is a fork not a branch.  The precommit hook is currently failing due to some annoying formatting issue.  I think I'm unable to solve this on my end since this is a fork not a branch. This will solve it @acatovic :
pip install pre-commit
pre-commit install
pre-commit run --all-files
git commit -am "precommit formatting changes"
git push

Thanks for the support @LiamConnell  and @Goyal-Kamal !

Thanks for the support @LiamConnell  and @Goyal-Kamal !


fix: setup org and pipeline badge

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Project code compilation error

[ ] I have searched the issues of this repository and believe that this is not a duplicate.
[ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.7.5-SNAPSHOT
Operating System version: win10
Java version: 1.8

Steps to reproduce this issue
A compilation error occurred when cloning the latest code to local, as follows: cannot resolve com.alibaba.spring: Spring context support: 1.0.4-snapshotPls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps？
Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
Just put your stack trace here!

master分支，import项目时缺少com.alibaba.spring:Spring context support: 1.0.4-snapshot这个依赖，maven不能自动下载，github Spring context support 项目上面也只有master分支，最新是1.0.3，怎样才能找到？

应该是master分支的问题，我这边暂时是使用的2.7.4正式分支的代码自己编译运行，由于2.7.4已经归档没有分支了，你可以迁tag里面的2.7.4.希望对你有帮助。

我已經退回到tag dubbo-2.6.7編譯通過了

Sorry, has beed fixed.


DEV-368: set model_version default to empty string

Change description
Addresses DEV-368
The API service will convert null value to "" before storing in the database.  Connect should know that default should be empty string, otherwise, it might assume null is valid since the API will gladly accept it.  The issue comes when the code tries to compare local evidence object with the one returned by the API.  "" != null so it will think there is a version mismatch.
Type of change

[x] Bug fix (fixes an issue)
[ ] New feature (adds functionality)

Related issues
Checklists
Development

[ ] Lint rules pass locally
[ ] Application changes have been tested thoroughly
[ ] Automated tests covering modified code pass

Security

[ ] Security impact of change has been considered
[ ] Code follows company security practices and guidelines

Code review

[ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
[ ] "Ready for review" label attached and reviewers assigned
[ ] Changes have been reviewed by at least one other contributor
[ ] Pull request linked to task tracker where applicable

LGTM, should we update also training_dataset and assessment_dataset to default to str for consistency?

I think those fields are actually misnamed.  The backend seems to think it's assessment_dataset_name and training_dataset_name.  I wanted to leave those for another PR.

They aren't misnamed - they are correctly labeled "training_dataset_name" when converted to data to export to platform. The extra "_name" just seemed unnecessary.
I thought the backend accepted Null values well. But if we want to switch to empty strings, that's fine. Whichever is expected.

Thank you. I see the naming here: https://github.com/credo-ai/credoai_connect/blob/develop/connect/governance/governance.py#L354-L357
The tricky part here is that the server accepts Null values but write them as empty string and export them as empty string.  This leads to a mismatch when comparing local data to the data returned from the server.  Null != ""

It is a little inconsistent to set default for this string to "" and not the others.  I will address this differently.


Upgrade to VS2017 RC.3

Removes lots of unnecessary code from csproj files.

Btw, I'm investigating the failures. I think there are still lingering effects of https://github.com/NuGet/Home/issues/4321


[Program]: Write a Kotlin program to print string of ascii values

Description
Write a Kotlin program to print string of ascii values
ASCII value is the numeric representation of a character. For example, the ASCII value of the character 'A' is 65. The ASCII value of the character 'a' is 97. The ASCII value of the character '0' is 48. The ASCII value of the character ' ' is 32.
Input  : 65 66 67
Output : ABC

How to contribute

Save the solution in program/program/print-string-of-ascii-values/PrintStringOfAsciiValues.kt file

!assign


make secrets fields referenceable to be handle by vault secret management

This PR add support for Kong Vault secrets as environment variables.
https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/
Example usage on Kong deployed with Helm chart.
Helm chart values:
customEnv:
  oidc_quicksign_sso_client_id: "client_id"
  oidc_quicksign_sso_client_secret: "client_secret"

Kong plugin
apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
  name: oidc-sso
plugin: oidc
config:
  client_id: "{vault://env/oidc_quicksign_sso_client_id}"
  client_secret: "{vault://env/oidc_quicksign_sso_client_secret}"
  realm: master
  discovery: https://mydomain/auth/realms/master/.well-known/openid-configuration

Sorry for the late response, can you please update the rockspec? saw just now you made almost the same changes as a previous PR


Add support for dynamic ref evaluation

Implements dynamic ref evaluation as requested in
https://github.com/teemtee/tmt/issues/1532

I have seen this in CI
warn: /plans/fmf/integer:discover - {'how': 'fmf', 'ref': 21962777} is not valid under any of the given schemas

/plans/fmf/integer
    discover
        how: fmf
        directory: /var/ARTIFACTS/work-basic9QffGv/plans/features/basic/discover/default/tests
    finish
        summary: 0 tasks completed
Traceback (most recent call last):
  File "/usr/bin/tmt", line 9, in <module>
    tmt.cli.main()
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1689, in invoke
    return _process_result(rv)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1626, in _process_result
    value = ctx.invoke(self._result_callback, value, **ctx.params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/tmt/cli.py", line 406, in finito
    click_context.obj.run.go()
  File "/usr/lib/python3.11/site-packages/tmt/base.py", line 2057, in go
    plan.go()
  File "/usr/lib/python3.11/site-packages/tmt/base.py", line 1210, in go
    step.go()
  File "/usr/lib/python3.11/site-packages/tmt/steps/discover/__init__.py", line 263, in go
    phase.go()
  File "/usr/lib/python3.11/site-packages/tmt/steps/discover/fmf.py", line 338, in go
    if ref and ref[0] == '@':
               ~~~^^^
TypeError: 'int' object is not subscriptable

@happz I can do str(ref) explicitly, just wondering if having ref as an integer is expected.

I have seen this in CI
warn: /plans/fmf/integer:discover - {'how': 'fmf', 'ref': 21962777} is not valid under any of the given schemas

/plans/fmf/integer
    discover
        how: fmf
        directory: /var/ARTIFACTS/work-basic9QffGv/plans/features/basic/discover/default/tests
    finish
        summary: 0 tasks completed
Traceback (most recent call last):
  File "/usr/bin/tmt", line 9, in <module>
    tmt.cli.main()
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1689, in invoke
    return _process_result(rv)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 1626, in _process_result
    value = ctx.invoke(self._result_callback, value, **ctx.params)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/tmt/cli.py", line 406, in finito
    click_context.obj.run.go()
  File "/usr/lib/python3.11/site-packages/tmt/base.py", line 2057, in go
    plan.go()
  File "/usr/lib/python3.11/site-packages/tmt/base.py", line 1210, in go
    step.go()
  File "/usr/lib/python3.11/site-packages/tmt/steps/discover/__init__.py", line 263, in go
    phase.go()
  File "/usr/lib/python3.11/site-packages/tmt/steps/discover/fmf.py", line 338, in go
    if ref and ref[0] == '@':
               ~~~^^^
TypeError: 'int' object is not subscriptable

@happz I can do str(ref) explicitly, just wondering if having ref as an integer is expected.

str(ref) is definitely not an option, ref must be sanitized when it enters tmt internals. Or denied completely.
ref comes from tests/discover/plans.fmf (https://github.com/teemtee/tmt/blob/main/tests/discover/data/plans.fmf#L77), schema says refshall bestring, internally it's Optional[str]`. And it probably works most of the time, because refs are often alphanumeric strings, therefore strings, except when a ref consisting of digits only appears, like in this case. YAML parser presents it as an integer.
Temporarily I can add a normalization to FmfId class and apply str() there, but it would be better to provide official guidance - shall we support integer-looking refs (and branches?)? The schema should reflect such a change, too, and the normalization would no longer be temporary. Internally, Optional[str] should stay.
@psss what do you think?

For the 'ref' accepted values - I'd say to support integer in yaml and normalize to string when read. I'd say that if we deny integers in yaml users will have bad experience, especially if they don't tmt plan lint automatically.

@lukaszachy @psss With the latest commit I have modified PR to work with ref attribute, instead of the REF variable. It truly looks better from a user perspective. I tried to update docs accordingly, please give it a look.

/packit test

/packit retest-failed

/packit test

/packit test


The change in how distributions are handled seems to have messed simulations up

In my restoration of the CGMPortfolio remark, I think I've run into a couple of issues with RNG in simulations.
This PR deals with the fact that the random seed now has to be passed to the distribution's init method and not the draw method.
However, my current simulated income paths look like this, which does not seem right

It looks as if there was invididual-level variation in growth rates, but they stayed constant over time?
I'm looking into it but the income distribution RNG is more complicated so I wanted to ask if there is some obvious answer to what is going on there.

Yeah, my best guess is that the RNG changes weren't fully/properly
implemented in the models.  My best guess is that the same seed is being
passed to a new RNG in every single period, so the exact same (underlying)
shocks are being given to each index in each period.  Let me take a look.
On Thu, Jul 2, 2020 at 4:57 PM Mateo Velásquez-Giraldo <
<EMAIL_ADDRESS>wrote:

In my restoration of the CGMPortfolio remark, I think I've run into a
couple of issues with RNG in simulations.
This PR deals with the fact that the random seed now has to be passed to
the distribution's init method and not the draw method.
However, my current simulated income paths look like this, which does not
seem right
[image: image]
https://user-images.githubusercontent.com/27739595/86408046-40f93400-bc84-11ea-8536-32e5521708e3.png
It looks as if there was invididual-level variation in growth rates, but
they stayed constant over time?
I'm looking into it but the income distribution RNG is more complicated so
I wanted to ask if there is some obvious answer to what is going on there.
You can view, comment on, or merge this pull request online at:
https://github.com/econ-ark/HARK/pull/750
Commit Summary

Fix adjust and Risky

File Changes

M HARK/ConsumptionSaving/ConsPortfolioModel.py
https://github.com/econ-ark/HARK/pull/750/files#diff-68665700d02cb4ea293de6b42a903ff4
(4)

Patch Links:

https://github.com/econ-ark/HARK/pull/750.patch
https://github.com/econ-ark/HARK/pull/750.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKRAFOE5E6SZOVWLI4S3E3RZTYEVANCNFSM4OPHRSEA
.

First check: IndShockConsumerType is simulating correctly, with different
shocks being drawn for each agent.
Second check: Simulation of the portfolio model is indeed not working
correctly-- the example file hits an error when seed is passed.
Let me compare how the RNG is set up between the two modules and see if
there's an easy fix.  This was just an oversight when the new RNG changes
were made, but we should also run the other example files to see if their
simulations work as intended.
On Thu, Jul 2, 2020 at 5:02 PM Matthew White<EMAIL_ADDRESS>wrote:

Yeah, my best guess is that the RNG changes weren't fully/properly
implemented in the models.  My best guess is that the same seed is being
passed to a new RNG in every single period, so the exact same (underlying)
shocks are being given to each index in each period.  Let me take a look.
On Thu, Jul 2, 2020 at 4:57 PM Mateo Velásquez-Giraldo <
<EMAIL_ADDRESS>wrote:

In my restoration of the CGMPortfolio remark, I think I've run into a
couple of issues with RNG in simulations.
This PR deals with the fact that the random seed now has to be passed to
the distribution's init method and not the draw method.
However, my current simulated income paths look like this, which does not
seem right
[image: image]
https://user-images.githubusercontent.com/27739595/86408046-40f93400-bc84-11ea-8536-32e5521708e3.png
It looks as if there was invididual-level variation in growth rates, but
they stayed constant over time?
I'm looking into it but the income distribution RNG is more complicated
so I wanted to ask if there is some obvious answer to what is going on
there.
You can view, comment on, or merge this pull request online at:
https://github.com/econ-ark/HARK/pull/750
Commit Summary

Fix adjust and Risky

File Changes

M HARK/ConsumptionSaving/ConsPortfolioModel.py
https://github.com/econ-ark/HARK/pull/750/files#diff-68665700d02cb4ea293de6b42a903ff4
(4)

Patch Links:

https://github.com/econ-ark/HARK/pull/750.patch
https://github.com/econ-ark/HARK/pull/750.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKRAFOE5E6SZOVWLI4S3E3RZTYEVANCNFSM4OPHRSEA
.

Ha, I didn't realize this was a PR-- I misread the email I received and thought it was an issue.  I made the two line fixes you have here, and the example file now works correctly for me-- I'm not getting the pattern you are.
In example_ConsPortfolioModel.py in your branch, add 'pLvlNow' to track_vars for MyType (whoops, I need to rename that first example) and solve and simulate that type (for speed/laziness, just throw a breakhere after the simulation so it doesn't do the rest of the examples).  Then do plt.plot(MyType.history['pLvlNow'][:,0:5], '.') and you'll see some example permanent income paths like the figure you have above; they move around exactly as you'd expect.
What code are you running that gives that bad picture?

I just checked the example file as you suggested and it works, pLvls do vary erratically as expected.
The strange picture comes from running this file: https://github.com/Mv77/REMARK/blob/fixCGMPortfolio/REMARKs/CGMPortfolio/Code/Python/Simulations/FewAgents.py, which used to work before. Seeing that the example works now makes me think it might be a particular issue, maybe with the calibration.
I'll have a dig at it after dinner. (this is the last file that needs to work before the CGM remark is completely restored)

Ok, I'll try to look at that late tonight or early tomorrow morning.
Calibration shouldn't be the issue, I don't think.
On Thu, Jul 2, 2020, 5:55 PM Mateo Velásquez-Giraldo <
<EMAIL_ADDRESS>wrote:

I just checked the example file as you suggested and it works, pLvls do
vary erratically as expected.
The strange picture comes from running this file:
https://github.com/Mv77/REMARK/blob/fixCGMPortfolio/REMARKs/CGMPortfolio/Code/Python/Simulations/FewAgents.py,
which used to work before. Seeing that the example works now makes me think
it might be a particular issue, maybe with the calibration.
I'll have a dig at it after dinner. (this is the last file that needs to
work before the CGM remark is completely restored)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653236039, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKRAFPQ2YCZMXUEK4WJOHTRZT64PANCNFSM4OPHRSEA
.

I'm getting closer to the bug. It seems to be the "draw_events" method of the income_dstn that is getting used in line 2027 of ConsIndShockModel.py. Here are the events being drawn for 5 different agents (columns) through their lives (rows)

Indeed, the same permanent shock is being drawn every period for a given agent. I will keep looking to fix it myself but wanted to share in case you do look at it.

Yep. All are being created with the default seed (0). Fixing now!

Your hypothesis might be correct, but this feature isn't showing up in the lifecycle example in example_ConsIndShock.py ... Permanent income shocks jump around for each agent just as you'd expect.

Same thing with the portfolio lifecycle example in example_ConsPortfolioModel.py (with completely cockamamie parameters)-- income shocks draw as expected.  This is weird.

But then why is this only happening for that one case?  It's a one line fix when the IncomeDstn elements are created (which it looks like you're doing now), but this should come up in the example files as well as the CGM REMARK file.

My last commit seems to fix the issue.
To the best of my understanding, the issue arose when combining the transitory and permanent distributions of the income process using 'combineIndepDstns'. The method creates the combined distribution without a seed, so it just defaults to 0. I added the option to pass a seed and used it.
I tested both my file and the example and they work.

But then why is this only happening for that one case? It's a one line fix when the IncomeDstn elements are created (which it looks like you're doing now), but this should come up in the example files as well as the CGM REMARK file.

The example file (at least the portfolio one) works because T_cycle = 1. So there is a single distribution object. The seed starts at 0, HARK takes a draw, and next period it takes a draw from the same object. So the draws are different.
The life-cycle problem from my file creates a list of 60(?) incomeDstn's, all initialized with seed 0. So HARK takes a draw from the 1st element when t_cycle=0, and from the second when t_cycle = 1. Since both objects start out with the same seed, the draws are the same?

I get all that.  But I ran other lifecycle examples and they simulated
correctly.  That's what's confusing.
On Thu, Jul 2, 2020 at 8:33 PM Mateo Velásquez-Giraldo <
<EMAIL_ADDRESS>wrote:

But then why is this only happening for that one case? It's a one line
fix when the IncomeDstn elements are created (which it looks like you're
doing now), but this should come up in the example files as well as the CGM
REMARK file.
The example file (at least the portfolio one) works because T_cycle = 1.
So there is a single distribution object. The seed starts at 0, HARK takes
a draw, and next period it takes a draw from the same object. So the
draws are different.
The life-cycle problem from my file creates a list of 60(?) incomeDstn's,
all initialized with seed 0. So HARK takes a draw from the 1st element when
t_cycle=0, and from the second when t_cycle = 1. Since both objects start
out with the same seed, the draws are the same?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653272610, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKRAFIVYTSSTJYGSQRJ2QDRZURMZANCNFSM4OPHRSEA
.

Anyway, your code changes look correct, and I'm glad this fixed the problem.  I'll need to adjust the simulation-based targets for some tests, as the seeds have changed, then I'll merge this branch.

Since both objects start out with the same seed, the draws are the same?

Definitely.
This is one of those things that requires a pretty deep understanding of
"random" number generation.
I feel (fairly strongly) that the default way of doing things should be
with a seed based on the time (my preference would be the unix default
clock of "seconds since 1970" but not sure if that works on WIN machines;
probably there's a convention about how to construct a platform-independent
time-varying seed.  Like, whatever the system believes to be the current
moment of time?
Sophisticated and experienced people will know that they can set the seed
to the same thing every time if they want to do that.  But the default
should NOT be that random number sequences are actually all the same
(because starting from a seed of 0), because that can lead to exactly these
kinds of confusions.  The default should be that things work the way a naif
expects, and the sophisticate will know how to change things for their
purposes.  (I'm working hard on substituting "they/their" for "him/his" -
in principle I'm completely in favor of there being a gender-neutral
possessive, but that fights against my visceral reaction that "they" is
improper -- which was true, but should change.)
On Thu, Jul 2, 2020 at 8:33 PM Mateo Velásquez-Giraldo <
<EMAIL_ADDRESS>wrote:

But then why is this only happening for that one case? It's a one line
fix when the IncomeDstn elements are created (which it looks like you're
doing now), but this should come up in the example files as well as the CGM
REMARK file.
The example file (at least the portfolio one) works because T_cycle = 1.
So there is a single distribution object. The seed starts at 0, HARK takes
a draw, and next period it takes a draw from the same object. So the
draws are different.
The life-cycle problem from my file creates a list of 60(?) incomeDstn's,
all initialized with seed 0. So HARK takes a draw from the 1st element when
t_cycle=0, and from the second when t_cycle = 1. Since both objects start
out with the same seed, the draws are the same?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653272610, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKCK73PP2U64JUNXDTUWBDRZURMZANCNFSM4OPHRSEA
.

--

Chris Carroll

I get all that. But I ran other lifecycle examples and they simulated correctly. That's what's confusing.
…
On Thu, Jul 2, 2020 at 8:33 PM Mateo Velásquez-Giraldo < @.***> wrote: But then why is this only happening for that one case? It's a one line fix when the IncomeDstn elements are created (which it looks like you're doing now), but this should come up in the example files as well as the CGM REMARK file. The example file (at least the portfolio one) works because T_cycle = 1. So there is a single distribution object. The seed starts at 0, HARK takes a draw, and next period it takes a draw from the same object. So the draws are different. The life-cycle problem from my file creates a list of 60(?) incomeDstn's, all initialized with seed 0. So HARK takes a draw from the 1st element when t_cycle=0, and from the second when t_cycle = 1. Since both objects start out with the same seed, the draws are the same? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#750 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKRAFIVYTSSTJYGSQRJ2QDRZURMZANCNFSM4OPHRSEA .

Got it!
The default parameters set mortality rates quite high, to illustrate the life-cycle point. So the number of alive agents changes a lot, and the varying number of draws is what generates variation in the shocks.
You can check this by setting init_lifecycle['LivPrb'] = [1]*10 in the life cycle example.

That one was hard to catch

and a perfect example of why the default should be to always initialize with a time-based seed.  Like the Spanish Inquisition, nobody expects that the results of their simulations will be importantly different if the probability of living is 0.9999 instead of 1.000
PS.  But the build is still failing ...

Ahhhh yes, I forgot that the survival probabilities were silly. Great work.
Chris: the survival probabilities are in the range of 0.1 to 0.9; there's
no discontinuity at 1.
The build is failing because some test targets need to be adjusted. Seeds
have changed on this commit, so simulation-based tests have changed results.
I don't think we should have seed default to a time-based value. We want
our code to produce the same results every time it's run.
On Thu, Jul 2, 2020, 10:09 PM Christopher Llorracc Carroll <
<EMAIL_ADDRESS>wrote:

That one was hard to catch
and a perfect example of why the default should be to always initialize
with a time-based seed. Like the Spanish Inquisition, nobody expects that
the results of their simulations will be importantly different if the
probability of living is 0.9999 instead of 1.000
PS. But the build is still failing ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653295947, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ADKRAFPVYFTOQMULGYAEEJDRZU4VTANCNFSM4OPHRSEA
.

Tests will pass after latest commit, will merge.  No release notes are necessary, as this just makes tiny adjustments to account for RNG changes in Seb's prior PR; release notes for that PR would encompass these changes.
That said, we might want to look through other RNG-using methods and make sure these kinds of changes are made there.  In particular, the medical shocks model and the Markov shocks.

On Thu, Jul 2, 2020 at 10:28 PM Matthew N. White<EMAIL_ADDRESS>wrote:

Ahhhh yes, I forgot that the survival probabilities were silly. Great work.
Chris: the survival probabilities are in the range of 0.1 to 0.9; there's
no discontinuity at 1.
The build is failing because some test targets need to be adjusted. Seeds
have changed on this commit, so simulation-based tests have changed
results.
I don't think we should have seed default to a time-based value. We want
our code to produce the same results every time it's run.

Well, that's the counterargument.
Problem is, very often you will not get the same result from one run to the
next because it is incredibly easy to make some change that you don't
realize will change the order of draws or the number or both.
I'm willing to put this up to a vote as an EEP, and abide by the consensus
of the rest of you.

On Thu, Jul 2, 2020, 10:09 PM Christopher Llorracc Carroll <
<EMAIL_ADDRESS>wrote:

That one was hard to catch
and a perfect example of why the default should be to always initialize
with a time-based seed. Like the Spanish Inquisition, nobody expects that
the results of their simulations will be importantly different if the
probability of living is 0.9999 instead of 1.000
PS. But the build is still failing ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653295947, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ADKRAFPVYFTOQMULGYAEEJDRZU4VTANCNFSM4OPHRSEA
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/econ-ark/HARK/pull/750#issuecomment-653302221, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKCK75RAMIJMZUY5BP2BUTRZU65XANCNFSM4OPHRSEA
.

--

Chris Carroll


Allow all users to view emergency contact details

This looks good

Can you make this user a normal user? Then this would be tested.
https://github.com/alphagov/support/blob/master/spec/features/emergency_contact_details_spec.rb#L9

Good shout @tijmenb

👍


Fix spelling error in README template

Fix spelling error in README template
The word 'oj' is now 'ok' to be consistent with other examples.
Testing done
Confirmed that the mvn clean verify only made the common changes to the README, without reverting the earlier spelling fix.
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

I'm very tempted to get rid of the entire template / readme generation in favor of a more straight forward solution. To me its over-engineered and error-prone.

I think that is a good choice.  Full support from me.


Server-side JavaScript

I’d like a way to opt-in to server-side JavaScript, akin to "use client"; with React Server Components (or more precisely "use server"; with Server Actions, I guess?). I’m imagining something like this:
```js server
console.log("<b>I’m server-side rendered!</b>");
```

Or perhaps context=server and the default would be context=client for JavaScript fenced code blocks.
The idea is closely-related to @cinxmo’s “data loader from a cell” #145 idea, with the caveat being that server-side rendered JavaScript must emit HTML. And this “loader” doesn’t generate a file — the generated HTML fragment is inserted into the page, inline, wherever the fenced code block lives. In theory we could allow other languages besides JavaScript, too, as long as they too emit HTML.
Implied above is that there’s no magic hydration that happens on the client. There’s still an explicit boundary between server-side and client-side code, so if you want interaction, you have to do the hydration yourself (by selecting the elements and adding event listeners etc.).
Also unclear is whether you can have reactive references to other JavaScript cells from server-side JavaScript? For example, maybe you can define a top-level variable and reference it from multiple server-side cells. And maybe we could treat current JavaScript cells as isomorphic, and run them on the server if needed too? I expect that would work in most cases (the main hurdle being support for FileAttachment).
Anyway, let’s think about this more… Running a bit more code on the server (during build) often means a better user experience.

This is now closely related to the new page loader feature #1523. We could consider server-side code blocks as “page fragment loaders” — programs that generate fragments of Markdown (or perhaps HTML) that is interpolated into the page during build. In effect, they are “just” page loaders, but without explicit names, and that get incorporated into the rest of the page. This approach would also support fenced code blocks in any language (at least any interpreted language that we already support for data loaders, but that list is also extensible by the user).


Make Myself Responsible for Once

By popular demand, this pull request elevates my volunteer privileges to that of somebody responsible for something for once. Reluctantly, I think this makes me a co-maintainer of this feedstock. I can already feel the beads of sweat pooling around my armpits.
@nehaljwani, the existing feedstock maintainer, is already doing a splendid job from somewhere in the Milky Way Galaxy. Aside from also residing in the Milky Way Galaxy, I'm unsure what else I can offer. I'll probably just end up being the bothersome albatross around his neck, but hope for happier outcomes.
For safety, I'll continue to ask for peer review on significant changesets. For trivial changesets (e.g., version bumps), I'll avoid pestering others and just quietly merge the pull requests in question myself.
If that and more sounds good, sign me up for additional unwanted responsibilities! ...sigh.
Why do I do this to myself.

Wait. Appveyor failed. What the...

@conda-forge-admin please re-render

Hi! This is the friendly automated conda-forge-webservice.
I tried to re-render for you, but it looks like there was nothing to do.

I can see you here now: https://github.com/orgs/conda-forge/teams/pydot/members
Mission Accomplished.

Thanks to both of you for taking care of this recipe!

Thanks a bunch, @nehaljwani. You are the mystical narwhal of the conda-forge community. :dolphin:
I shall stop bothering everyone now.


Inverse kinematic approximation with neural network

Good morning everyone,
I'll try to briefly explain the context and then the problem I'm facing:
Context: I am using and testing a collaborative Robot. This Robot has been provided to me with a library in python that allows to acquire signals from the robot (currents, velocity, positions, I/O etc) and to command it, in joint and end-effector (EE) coordinates. There are also available the functions of Direct and Inverse Kinematics (DK and IK).
For my curiosity, I was interested in generating a trajectory (in end-effector coordinates) in order to move it within a conical area [I attach a link to the video that shows the movement in question].
LINK: https://www.youtube.com/watch?v=CExtMfvRabo
From the robot, moreover, it is possible to save the .csv file containing the trajectories, in joint coordinates, of the single joints.
Initially, not knowing the "shape" that should have the trajectory (in end-effector coordinates) of the movement that I was interested in reproducing, I was able, manually moving the robot in gravity compensation mode, to acquire the trajectories of the individual joints. At this point, using the Direct Kinematics algorithm, I obtained the movement of the consequent end-effector [I attach photos of 2 3D graphs: the first in which I plot the 3 coordinates x,y,z and the second, in which I plot roll, pitch, yaw].
End Effector Angular Displacement
End Effector Position Displacement
Here the problem was born.
Problem: out of curiosity, I tried to use the Inverse Kinematics algorithm on the points obtained from the DK and the algorithm returned the error: "Singular Trajectory". But the robot was able to move according to that trajectory, the problem should be in the calculation of the IK, which probably finds multiple/infinite solutions.
To overcome this limitation I used a Neural Network developed in Python using Tensorflow (Keras) to try to approximate the IK. I will preface this by saying that I have never used Keras or Tensorflow, so I may have made some conceptual errors. I have consulted the API of Keras and also the guide proposed in this link
LINK: https://machinelearningmastery.com/deep-learning-models-for-multi-output-regression/
In my PC I use:

Visual Studio Code for programming in python;
python 3.9.5
Keras 2.6.0;

I thought of the neural network this way: 6 input nodes (corresponding to the 6 coordinates of the end-effector) and 6 output nodes (the 6 coordinates of the joints). The training set consists of a .csv file containing the 6 coordinates of the end-effector computed via the DK run on a .csv file containing the trajectories of the 6 joints. The file containing the joint coordinates is the Label file.
Below I attach the code of the network implementation.
from numpy import loadtxt
import numpy as np
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense
import tensorflow as tf
from numpy import array

# Model definition
def get_model(I_N_L_1, I_N_L_2, I_N_L_3, I_N_L_4, I_N_L_5 ,n_inputs, n_outputs):

	model = Sequential()
	model.add(Dense(I_N_L_1, input_dim=n_inputs, kernel_initializer='he_uniform', activation='relu'))
	model.add(Dense(I_N_L_2, activation='relu'))
	model.add(Dense(I_N_L_3, activation='relu'))
	model.add(Dense(I_N_L_4, activation='relu'))
	model.add(Dense(I_N_L_5, activation='relu'))
	model.add(Dense(n_outputs))
	model.compile(loss='mae', optimizer='adam', metrics=["mae"])
	return model

# Load Training set csv
dataset_EF = loadtxt('WeldingProve.csv', delimiter=',')
x_train = dataset_EF[0:1700,0:6]
print('shape: ',x_train.shape)

# Load Label set csv
dataset_joints = loadtxt('EF_from_WeldingProve.csv', delimiter=',')
y_train = dataset_joints[0:1700,0:6]
print('shape: ',y_train.shape)

# Test set definition
x_test = dataset_EF[1701:,0:6]
print('shape: ',x_test.shape)

# Label of the test set definition
y_test = dataset_joints[1701:,0:6]
print('shape: ',y_test.shape)

# Number of nodes in the hidden layers
I_N_L_1 = 192
I_N_L_2 = 36
I_N_L_3 = 6
I_N_L_4 = 36
I_N_L_5 = 192

# Number of nodes in the input and output layers
n_inputs = 6
n_outputs = 6

# calling the "get_model" function
model = get_model(I_N_L_1, I_N_L_2, I_N_L_3, I_N_L_4, I_N_L_5 ,n_inputs, n_outputs)
es = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=5)

# fit model
model.fit(x_train, y_train, verbose=1, epochs=600)

# saving the model
model.save("Test_Model.h5")

# Testing procedure
pred = []

# Computing the Prediction on the Test Set
for i in range(len(x_test)-1):
	b = [x_test[i][0], x_test[i][1], x_test[i][2], x_test[i][3], x_test[i][4], x_test[i][5]]
	ToBePredicted = array([b])
	Prediction = model.predict(ToBePredicted)
	a = [Prediction[0][0], Prediction[0][1], Prediction[0][2], Prediction[0][3], Prediction[0][4], Prediction[0][5]]

# Computing the mean vector of the error for each predicted joint trajectory
average_vector = []
sum = 0
average = 0
for j in range(6): # colonne
	for i in range(len(y_test)-1): #righe
		sum = sum + (pred[i][j] - y_test[i][j])

	average = sum/len(y_test)
	average_vector.append(average)

	average = 0
	sum = 0

print('average_vector: ', average_vector)

# Computing the standard deviation vector of the error for each predicted joint trajectory
sum = 0
std_vector = []
for j in range(6): # colonne
	for i in range(len(y_test)-1): #righe
		sum = sum + ((pred[i][j] - y_test[i][j]) - average_vector[j])**2

	std = (sum/len(y_test))**(0.5)
	std_vector.append(std)

	std = 0
	sum = 0

print('std_vector: ', std_vector)

My questions are the following:

once I have trained the neural network, even using a very large training set, I get predictions that are not good. Can you suggest me how to improve these predictions, perhaps going to act on the parameters of the network,

Is it necessary to pre-process the training data and its labels? If yes, which technique should I apply?

Trying to change the number of nodes in the various layers of the network, I saw that the performance changes, even a lot. Do you have advice on the "shape" to give to the network ?

Are there any other solutions that can be used to estimate the IK of the robot ?

Could you please provide the EF_from_WeldingProve.csv dataset for more debugging. Also can you please try the workaround for solving inverse kinematics using a neural network, assuming 2D environment, a robot arm with 2 segments, each of length 1.
def forward_kinematics_2(theta1, theta2):
    T00 = transform_matrix(theta1,0,1,0)
    T01 = transform_matrix(theta2,0,1,0)
    pos = [0, 0, 0, 1]
    Etip = np.matmul(np.matmul(T00, T01), pos)
    return T00, T01, Etip

def get_positions_2(theta):
    # assuming theta is already in radian
    theta1 = theta[0]
    theta2 = theta[1]

    T00, T01, Etip = forward_kinematics_2(theta1, theta2)
    t = np.transpose(np.array([[0, 0, 0, 1]]))
    pos_1 = np.matmul(T00, t)

Kindly find the gist of it here for the reference.

When you call model.fit() you can pass you test data to the argument “validation_data”, and the model will automatically calculate loss and metrics for both train and validation set.

TensorFlow has MeanSquaredError and MeanAbsolutePercentageErrror in addition to MAE that you use.

In the EarlyStopping callback you should define monitor=‘val_loss’ and restore_best_weights=True. In this case the training will be stopped, when validation loss starts worsening, and the model will roll back to the optimal state, when best val_loss was reached.

At present you monitor training loss, which does not say anything about overfitting.

Check the scale of the coordinates used as input features. If they are not in range 0-1, input data requires normalization.

Keras has a Normalization layer, which could be used to ensure that all data passed to the model is normalized identically.

Closing this as stale. Please reopen if this is still a valid request.


remove GuildManager#setVanityCode

Pull Request Etiquette

[x] I have checked the PRs for upcoming features/bug fixes.
[x] I have read the contributing guidelines.

Changes

[ ] Internal code
[x] Library interface (affecting end-user code)
[ ] Documentation
[ ] Other: _____

Closes Issue: #1932
Description
this PR removes GuildManager#setVanityCode as the vanity code can't be modified using the Modify Guild endpoint.

If we're going to update the bitflags to shift them down in this PR, we might want to update the gap left by the loss of REGION. @MinnDevelopment Thoughts?

Since we are still in alpha, we can probably remove the gap for now. In the future, this would be treated as a breaking change.

Okay. @caneleex can you address the REGION gap as well in the bitmasks?


clean the build directory when executing xcodebuild for issue #250

Added clean argument to xcodebuild to clean the build products before building the plugin.
This fix resolves the issue with my plugin BBUncrustifyPlugin. I tested it and now the xib file is correctly copied.

ping

Having plugins that use nibs not reliably work is a super annoying bug ( My Xcode just crashed because I forgot that Snapshots shouldn't be installed via Alcatraz. )

I'd say :+1: if you just make those @"clean" and @"build" literals constants to keep things consistent.
@supermarin lgtm

@benoitsan :+1: if you just extract them to constants like PROJECT

Actually, it'll be faster if I just do it. Thanks for the contribution and sorry for the slow response!

Thanks @supermarin, good to know it's fixed, it was a critical issue for me.

Just tested locally and everything installed perfect, good job all.


feat(passport): add option disable session

:tada: This PR is included in version 6.102.0 :tada:
The release is available on:

v6.102.0
GitHub release

Your semantic-release bot :package::rocket:


Fix nix mistkae on darwin

See https://github.com/dylanaraps/neofetch/pull/1617#issuecomment-740655977

Thanks for fixing. There is a small typo in the title and commit message.

There is a small typo in the title and commit message.

Was done on purpose.

Oh, ok 😅


Anything chef-brigade can do to help?

Is there anything @chef-brigade can do to help out? We're probably going to start using this in our infra, so we want to keep it awesome.
If you need any administrative help, want a slack channel, website, testing infra &c, just let us know. It doesn't need to have the brigade name anywhere on it.

Hi @josephholsten!  I don't think there is a ton I need at the moment.  I had planned a 2.0 rewrite, but the sense I got from users is that they would prefer minimal change around the logrotate cookbook, so I've so far tried to keep this rather user-request driven.
Is there a general slack channel for cookbook development that we could maybe direct people too for this one?  Having a whole slack channel just for this cookbook seemsa  bit much as it is pretty simple.

yeah, there's usually some folks hanging out in https://chef-brigade.slack.com/messages/general/
We've got a little badglet to register for the slack:
[![Slack](http://brigade-slackin.herokuapp.com/badge.svg)](https://brigade-slackin.herokuapp.com/)

Thanks @josephholsten I've created an account and look forward to chatting with you all.  For now I'm gonna close this issue since it doesn't represent work that I need to do on the cookbook.  Thanks for reaching out!


Added save_format to config.json and hub_utils.init()

Big chunk of work is to refactor tests. TIL you could add parametrization to fixtures
This is a draft PR, feel free to skim through it but don't look for nits

there was a problem with fixture temp_path with python 3.7 so I swapped it with mkdtemp instead.

@adrinjalali I don't know I could swear adding it to v0.4 🥲🥲🥲 addressed both

@adrinjalali ran black, apparently previous pre-commit didn't catch something (I looked at my CLI and it was all passed 🥲)

@adrinjalali I accidentally asked for review 🥲


training stages

Hey,
In the paper, when it comes to training, "The networks are trained for 6 epochs with 10−4 learning rate for the 2D backbone and a separate learning rate 10−3 for the volumetric backbone". I want to know if the the whole network is trained end-to-end after 2 seperate training?

Hey,
Actually, the whole training is don in end-to-end manner. We just set different learning rates for different parts of the network. That's how you can do it in PyTorch: https://pytorch.org/docs/stable/optim.html#per-parameter-options.

Thanks you for your reply.
I mentioned that you did not apply any augmentations during the training, other than rotating the orientation of the cube in volumetric triangulation around the vertical axis. So is the rotation is important to the result?  The degree' range is [0, 360] or [0, 90]? or others? usually, in the test, the degree is set to zero, and I think the different degrees should not affect the result, but I found it did affect the result. different degrees resulted in different accuracy.  Can you kindly explain your implement?

During training we randomly rotate the cube around vertical axis in range [0, 360] degrees. During test we set this angle to zero.

@xjturobocon We considered altering the cube angle in test (specifically, as a test-time augmentation), but didn't have time to evaluate it.

Thanks.
Your loss function includes 2 terms, the second one is like − β · log( · ),  which maximizes the
prediction for the voxel that has inside of it the ground-truth joint.  I think in the initial stage, the number in the bracket can be minus, so the log function is meaningless, how did you solve it?

@xjturobocon
There is a space-wide softmax before the logarithm, so the input is always positive.

@xjturobocon
There is a space-wide softmax before the logarithm, so the input is always positive.

@yurymalkov
I understand. I think the symbol in the paper may be mistakenly used, it represents the output before softmax.
Another question is that have you tried to generate 3D heatmap as the supervision, and calculate 3D heatmaps loss? I found it hard for the network to learn in this way, but I don't konw why.

@xjturobocon, thank for the comment!
Not sure, by heatmap loss you mean the L2 loss between gt and predicted heatmaps?

yes.
---Original---
From: "Yury<EMAIL_ADDRESS>Date: Sun, Sep 8, 2019 21:47 PM
To<EMAIL_ADDRESS>Cc: "Mention"<mention<EMAIL_ADDRESS>Subject: Re: [karfly/learnable-triangulation-pytorch] training stages (#4)
@xjturobocon, thank for the comment!
Not sure, by heatmap loss you mean the L2 loss between gt and predicted heatmaps?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

L2 of MSE between heatmaps should work much worse compared to getting the center of max, as the loss does not directly optimizes the objective that we want. If you just extract the maximum it is ok (e.g. HRNet uses MSE and just extracts the maximum with simple post-processing, it works good on full-body, not so good on faces where accuracy could be very high).
But it becomes very important when the quant of the space is bigger than the desired error (exactly our case the quant is ~4cm for 64x64x64 cube, the average L2 error can be as small as 1cm for CMU), so the loss should be exactly the objective that we want.

I mean using L2 of MSE between heatmaps, and getting the center of max to calculate accuracy( not do softmax). However, the result is bad.

@xjturobocon
You can imagine a network trained with MSE between heatmaps loss that does not work well with center of max in test.
For instance, if you add small noise to prediction of each pixel MSE would stay almost the same, while the center of mass can be siginificantly shifted to the center of the image (due to multiplication of the prediction in a pixel by pixel's coordianates in the image, which can be ~100).
They are somewhat different objectives.

I agree with that they are somewhat different objectives, but there are many 2D and 3D  huamn pose estimation works using MSE heatmap loss and getting center of max in test. (Coarse-to-fine human pose estimation network also used 3D volumetric representation and L2 loss of 3D heatmaps). They perform well.
I found in my experiment that its performance is very poor. I think it is similar with coarse-to-fine work, and should get a reasonable result.

@xjturobocon I agree, coarse-to-fine methods are likely to avoid this problem, as they are good at overcoming the limit of space quantization.


How do I start the dev server?

I installed the dependencies and ran npm run start but didn't manage to get a connection!

cc/ @benediktvaldez @MiniGod @kristjanmik

try
curl <IP_ADDRESS>:3100
;)

Oh lawd. Sorry!

Why did localhost fail?

Not sure :u7121:

Missing mappings in /etc/hosts OSX ?


Colab notebook does not run

Running the Google Colab notebook from Readme on A100 returns an error at !python3 app.py
2024-01-13 13:05:34,300 - modelscope - INFO - PyTorch version 2.1.0+cu121 Found.
2024-01-13 13:05:34,302 - modelscope - INFO - TensorFlow version 2.15.0 Found.
2024-01-13 13:05:34,302 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-01-13 13:05:34,340 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 6d1257f1da839db94a9e60aab43fde19 and a total number of 946 components indexed
2024-01-13 13:05:36.513745: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-01-13 13:05:36.513815: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-01-13 13:05:36.515611: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
Traceback (most recent call last):
  File "/content/facechain/app.py", line 16, in <module>
    from facechain.inference import preprocess_pose, GenPortrait
  File "/content/facechain/facechain/inference.py", line 9, in <module>
    from controlnet_aux import OpenposeDetector
  File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/__init__.py", line 15, in <module>
    from .mediapipe_face import MediapipeFaceDetector
  File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/mediapipe_face/__init__.py", line 9, in <module>
    from .mediapipe_face_common import generate_annotation
  File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/mediapipe_face/mediapipe_face_common.py", line 5, in <module>
    import mediapipe as mp
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/__init__.py", line 17, in <module>
    import mediapipe.tasks.python as tasks
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/__init__.py", line 17, in <module>
    from . import audio
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/__init__.py", line 18, in <module>
    import mediapipe.tasks.python.audio.audio_classifier
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/audio_classifier.py", line 26, in <module>
    from mediapipe.tasks.python.audio.core import base_audio_task_api
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/core/base_audio_task_api.py", line 25, in <module>
    from mediapipe.tasks.python.core.optional_dependencies import doc_controls
  File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/core/optional_dependencies.py", line 20, in <module>
    from tensorflow.tools.docs import doc_controls
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/__init__.py", line 48, in <module>
    from tensorflow._api.v2 import __internal__
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/__init__.py", line 11, in <module>
    from tensorflow._api.v2.__internal__ import distribute
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/distribute/__init__.py", line 8, in <module>
    from tensorflow._api.v2.__internal__.distribute import combinations
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/distribute/combinations/__init__.py", line 8, in <module>
    from tensorflow.python.distribute.combinations import env # line: 456
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/combinations.py", line 33, in <module>
    from tensorflow.python.distribute import collective_all_reduce_strategy
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 25, in <module>
    from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/cross_device_ops.py", line 28, in <module>
    from tensorflow.python.distribute import cross_device_utils
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/cross_device_utils.py", line 22, in <module>
    from tensorflow.python.distribute import values as value_lib
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/values.py", line 23, in <module>
    from tensorflow.python.distribute import distribute_lib
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/distribute_lib.py", line 206, in <module>
    from tensorflow.python.data.ops import dataset_ops
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/__init__.py", line 21, in <module>
    from tensorflow.python.data import experimental
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/__init__.py", line 98, in <module>
    from tensorflow.python.data.experimental import service
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/service/__init__.py", line 419, in <module>
    from tensorflow.python.data.experimental.ops.data_service_ops import distribute
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 25, in <module>
    from tensorflow.python.data.ops import dataset_ops
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 33, in <module>
    from tensorflow.python.data.ops import iterator_ops
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 41, in <module>
    from tensorflow.python.training.saver import BaseSaverBuilder
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/training/saver.py", line 50, in <module>
    from tensorflow.python.training import py_checkpoint_reader
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/training/py_checkpoint_reader.py", line 19, in <module>
    from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader
SystemError: initialization of _pywrap_checkpoint_reader raised unreported exception

same issue

Same. I've managed to get it to work locally but that's the best I can do. I don't have a 24GB Ram GPU as recommended but you can hack the app.py file to get it to work with any GPU at the expense of course longer training times. Honestly, the training didn't take long at all with my 4070ti.

please try out the newest train-free, 10s inference version facechain-fact.


Elm diff incorrectly reporting most comments changed

(1) A description of the issue:
Using difft as a diff tool seems to think all the comments in my file have changed, despite me not having changed any of them (see second screenshot for what actually changed).
incorrect difft output (clipped since its several more pages of changes, dealing with unchanged comments):

accurate git diff output (entirety):

(2) A copy of what you're diffing
Original file, and then new one with the single section removed
(3) The version of difftastic you're using (see difft --version) and
your operating system.
Difftastic 0.35.0 Windows 10 Powershell through Windows Terminal

Hmm, this is an interesting case. Note that git is already warning you that newlines as CRLF are being replaced.
I think difftastic should ignore the newline at the end of comments, which should fix your issue. In principle multiline string literals would still be shown as changed though, and I don't think I can do much about that.

I might be misunderstanding how lineendings work, but I don't believe I've changed any newlines for the comments; usually it's just the file's final line ending that gets changed.
The GitHub diff only lists 7 deletions, it doesn't mention the line endings at all. My git's config is set to autocrlf = input.

Sure, I don't think you've changed the line endings, but the git is checking out the file with one type of line encodings, but the repository is storing the file with different line endings and difftastic is seeing one file of each type.
I think it would be good to fix comments in difftastic to not include the trailing newline, but ideally difftastic would detect the git autocrlf setting when this occurs.

Filed a bug upstream: https://github.com/elm-tooling/tree-sitter-elm/issues/133

Thanks for taking the time to identity the root cause!


Add target components logic into AutoRegressivePipeline

Before submitting (must do checklist)

[ ] Did you read the contribution guide?
[ ] Did you update the docs? We use Numpy format for all the methods and classes.
[ ] Did you write any new necessary tests?
[ ] Did you update the CHANGELOG?

Proposed Changes

Closing issues

closes #1168

Codecov Report

Merging #1188 (1ab5fe0) into master (5cc7c87) will decrease coverage by 79.84%.
The diff coverage is 0.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##           master   #1188       +/-   ##
==========================================
- Coverage   87.66%   7.83%   -79.84%
==========================================
  Files         177     177
  Lines       10405   10408        +3
==========================================
- Hits         9122     815     -8307
- Misses       1283    9593     +8310

Impacted Files
Coverage Δ

etna/pipeline/autoregressive_pipeline.py
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 160 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


sklearn plots formatting: fix plot templates

There are a couple formatting issues that make the sklearn plots hard to read.
First, since https://github.com/iterative/dvc-render/pull/107, the points obscure the lines.

Second, without the points, the lines are too noisy and need smoothing.

Two possible solutions to this are:

Use the smooth template for these plots (which may need to be updated with some of the recent linear changes).
Include options for hiding points and smoothing in the default linear template.

@dberenbaum Which repo is generating those plots?
Don't mean to dismiss the issue but those curves look extremely noisy.

It's from example-get-started. The plots for it now look like the top image, so I think we need to do something to get them looking reasonable again.

For long-running jobs, the metrics plots might also need smoothing (similar to tensorboard), so I'd lean towards including smoothing by default (see https://github.com/iterative/dvc/issues/8396).

@daavoo What do you think about adding the radio and slider by default? Is it too much?

@daavoo @shcheklein Taking a step back, it seems we have a decent default for scalar trends now, and we should probably include the smoothing slider for any plots like this. There doesn't seem to be much point hiding this in a separate smooth template.
I think it's important to have a simpler linear plot with no points and no smoothing for the sklearn plots (I suggested smoothing above, but thinking about it some more I wouldn't want it for these plots). ROC and precision-recall plots are some of the most common eval plots, they depend on being able to see the intricacies of the curves, and they usually have a number of points on the order of the size of the eval data (too many to show individually). Seeing the jagged line breaks like the ones above can indicate where there are irregularities or peaks and valleys of performance. Similar to the request in https://github.com/iterative/dvc-render/issues/103, the thresholds matter because you may consider everything beyond a certain threshold as a positive prediction and everything else as a negative prediction, and looking at the breaks in these plots may help determine where to set that threshold.
I see two options for addressing the sklearn plots:

Reusing the template used for scalars, which I think is a worthwhile goal because it greatly reduces friction to modifying plots, but maybe it ends up not working well enough for either scenario.
Having a simpler template for the sklearn plots that excludes points and smoothing. We could reintroduce the simple template or think of another way to better describe the differences.

What do you think?


[NETBEANS-54] Module Review utilities

Excluded recent_files/* and .url files from rat

yes, it looked odd indeed ;-)


html5.svg contains useless path segments

Does it need such details?

Possibly not. I haven't done much hand editing of the files in Inkscape yet.

Ok.

Fixed in #17


[DUOS-2462][DUOS-2850] B2C OAuth Integration

Addresses
https://broadworkbench.atlassian.net/browse/DUOS-2462
https://broadworkbench.atlassian.net/browse/DUOS-2850
Summary
B2C

Add OidcBroker.ts for wrapping calls to the oidc-client-ts library
Adds Auth.ts for managing DUOS UI specific session logic and communicating to the OidcBroker
Adds OAuth2.ts for making api calls to get our oauth config
Adds appLoader.ts, RedirectFromOAuth.ts to handle redirect after signing in through popup window
Removes GoogleIS and related code

Other

As per request, moved the SignIn button from the Home.jsx to DuosHeader.jsx
Sign out calls now delegate through Auth.signOut
Typescript conversion for files affected by these changes (except for large files requiring their own ticket to convert)

https://github.com/DataBiosphere/duos-ui/pull/2611 Will continue this work as this PR too large to easily track the changes.


Fix crash after unsuccessful deployment

This moves the ssh context out of servicedeploymanager into main, to fix the crash when setting up another ssh connection.
This should fix b/158275162
(The first commit, does only some minor refactoring to get rid of duplicate code)

This should fix b/158275162
I guess it means, you could reproduce it before, but not after this fix?

I guess it means, you could reproduce it before, but not after this fix?
yes


Deploy key does not have access to private repository

Gitea version (or commit ref): 1.2 (Docker image 3e606f47a47e)
Git version: not relevant
Operating system: not relevant
Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[ ] Not relevant

Description
I tried to use a deploy key with a private repository on a private instance of Gitea running in a Docker container. Apparently, for private Git repositories, the deploy key doesn't have permission to read the repository, though.
Cloning into '.'...
Gitea: Invalid key ID
Invalid key ID[key-1]: public key does not exist [id: 1]
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

As soon as I publish the repository, the key works as expected.
It's a bit disruptive to have to switch the state of a repository for every deployment. I'd propose to allow deploy keys to clone the relevant repository even if it's private.
(I think a workaround might be to add a "machine user" or something like that, and add that to the repository.)
Oh, and please, improve that error message a bit. I'm not even sure whether the current behavior is intended, the message in the log extract I posted actually implies it might be an error.

see https://github.com/go-gitea/gitea/blob/master/cmd/serv.go#L208, I have checked the code. It seems it's right. Maybe you can check whether your key [id=1] is exist?

Dump from deploy_key:
----+--------+---------+----------+----------------------------------------------------+--------------+--------------
  3 |      4 |      10 | abcdefgh | SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |<PHONE_NUMBER> |            0

I was pretty sure that the key ID is not 1, as I deleted and recreated that deploy key for that repository a few times before trying it at first.
The repo ID is correct. The key is in the public_key database, and the fingerprints are equal. Mode is 1 and type is 2. All this appears valid to me.
What I don't understand is this error message about key 1. Why does Gitea show it when going private, and work fine when going public with the repository?

Check authorized keys file is there key id 1 gitea command

@lafriks the key with the ID 4 that I re-added a few times is in there more than once (1, 2, 4). The problem now appears to be that the keys are not purged from this file, even when they're deleted from the database. The SSH key apparently matches the key with ID 1 first, thus, Gitea checks this ID. Since the key does not exist (and is therefore not authorized to access the repository), the client is denied access. (The key is by the way just once in the database).
#1870 should fix such issues and also implements a superior alternative to the authorized_keys file. But as the people mentioned in there, it might break compatibility for some people. I guess the appropriate fix for this bug is to fix the code generating this file.

You should regenerate it from admin interface and check if that helps

Well, that obviously fixes the problem. Though, I assume something in the process of deleting deploy keys doesn't trigger that function. I'd suggest to fix this issue by doing exactly that.

I think the regenerate should be called when a key delete from the UI. see https://github.com/go-gitea/gitea/blob/master/models/ssh_key.go#L406

Yes. But, thinking about it, it was not regenerated either when adding the key again. I'd say, the best way is to do it in both places to be on the safe side.

#1870 would fix this by not using the generated file at all :)

@bkcsoft but that requires special openssh server configuration and is it possible to configure it only for single user?

@lafriks

AuthorizedKeysCommand
Specifies a program to be used for lookup of the user's public keys. The program will be invoked with its first argument the name of the user being authorized, and should produce on standard output AuthorizedKeys lines (see AUTHORIZED_KEYS in sshd(8)). By default (or when set to the empty string) there is no AuthorizedKeysCommand run. If the AuthorizedKeysCommand does not successfully authorize the user, authorization falls through to the AuthorizedKeysFile. Note that this option has an effect only with PubkeyAuthentication turned on.

https://linux.die.net/man/5/sshd_config

IIRC from Phabricator (which I cited in the other issue by the way) this requires a second instance of OpenSSH. Also, as stated in that other issue, Dropbear etc. don't provide this option. I guess it's still mandatory to provide this as a fallback solution unless support for anything but OpenSSH 6.2+ is dropped.

Any ETA for https://github.com/go-gitea/gitea/issues/2441#issuecomment-326781903?

This is fixed since PR #5939


dartk: Add support for specifying roots for dartk

Sometimes we need to include more libraries than just the transitive dependency graph of the application's main. For example in precompilation mode, we might need the vmservice_io:main() as well (or other roots the VM or the embedder invokes).
gen_snapshot has support for this already via  --embedder_entry_points_manifest=<file> and we should add similar support for dartk.
This will also allow  us to remove the dart:vmservice_io from the normal vm target (because normal applications in JIT mode don't need this library).
/cc @mraleph @kmillikin

Some support for adding roots has been added to package:kernel. I have done an experiment some time ago in cl/2704393002 which allows tree shaking the core libraries in kernel.
Though the roots from the VM (i.e. the roots which are available via lists) are not complete (e.g. the VM always expects intensified functions to be available, so we could not shake them ...).
Also the precompiler will be able to shake more than we can do in Dart.
Generally speaking there are two things:

[ ] Make the VM pass the roots to fasta (embedder roots and the roots it has itself)
[ ] Make fasta use the roots to ensure we include transitively all necessary libraries
[ ] Make fasta use the roots to tree-shake the application

/cc @mraleph @peter-ahe-google

This issue is quite old and the kernel->vm work has been taken over by others some time ago, so I'll unassign me.
@kmillikin I suspect that this has been solved already?

Yes, we have a solution in the form of back-end-specific targets.  The details will probably change, but the support is working.


[WiP] API Tests

This is a first attempt to increase code coverage by adding tests for API Endpoints.
Some considerations:

We could also think about including something similar to https://github.com/marketplace/actions/codecov, and adding it to the README.md
If we want to test courseimport.go thoroughly, we need to mock the functions we use of the campusonline library the same way we mocked DAOs.

@joschahenningsen Do you have any idea why the tests fail (*mock_dao.MockStatisticsDao does not implement dao.StatisticsDao (missing GetStreamNumLiveViews method))?
Locally everything runs unproblematic. ("Runs on my machine"), but as far as I know GetStreamNumLiveViews doesn't exist. I also re-ran go generate ./....
Any ideas are welcome, thanks.


Added more details in bot configuration file (fixed diff)

This will allow programs to easily get more details about bots. All of them are optional.

When this is approved I will make the same change to the other example repos.


Separating out setting model type into a separate method in the job service

What's changing
We currently have a lot going on in the create_job method which makes it hard to unit test granularly. We've previously done some work in pulling out separate methods (see https://github.com/mozilla-ai/lumigator/pull/328), this PR does the same for _set_model_type and adds tests also clarifying the model URL (it wouldn't be S3 since we use either huggingface, openai or mistral at the moment) in the SDK.
How to test it
Run unit tests
Additional notes for reviewers
I already...

[X] added some tests for any new functionality
[ ] updated the documentation
[ ] checked if a (backend) DB migration step was required and included it if required

cc @peteski22 @javiermtorres fyi for SDK changes

Also adding ruff precommit hooks here because they're not getting caught before they reach the linter in CI


Applying dimensions to the .stl file

How would I achieve saving the scale/dimensions of the model to the .stl file?
For e.g. if I change the scale of the model and use download_model, how can you apply the new dimensions to the file before downloading?

I was expecting the get_model_mesh function's scale property to update once I call the set_scale method on the model.
What worked was calling set_scale then get_stl_bin that has the updated scale.


Remove peerDependencies

See https://github.com/react-native-fellowship/react-native-side-menu/pull/168. Is there a reason for this?

I'm sure this will explain why; https://twitter.com/notbrent/status/684107286994796544
Basically the peerDependency-check will overwrite your RN-version if you have installed RN from a git SHA or tag. The >= check does not work with -rc versions either.

Thanks @cbrevik! That clears it up a lot – makes sense now.


requirements cleanup

From searching though the code, I found that only the following packages are first order requirements:

xarray
simplification
datetime
eurec4a
ipyleaflet
matplotlib

Maybe one could add intake but that is commented out. At the moment, I don't even see code importing Numpy, so no need for that.

I agree in general, that the requirements should be as minimal as possible and we should revisit the requirement files to check if we can get rid of some more.
One thing which makes requirements in this particular case a bit more complicated is that the amount of libraries required to handle an intake catalog in principle is small (and e.g. eurec4a pulls in the general intake to be able to return a catalog). However to actually access a catalog which is served via HTTP, intake will additionally require aiohttp and requests. Then if you like to use datasets which are served via opendap, you'll need either pydap or netCDF and the decision is made by the catalog authors. If you use datasets stored as zarr, you'll need the zarr library as well and if the zarr is served via S3-compatible API, you'll additionally need s3fs or if it is coming via IPFS, you'll need ipfsspec.
All of those additional dependencies will not be imported directly by user code and I'd argue that it is a good choice from intake not to require all the additional libraries which could be required. However a result of this choice, the requirements are actually dependent on what's inside the catalog and which items of the catalog you are using.

That is a good point. I think it would than make sense to mention these hidden dependencies in the general introduction and note again the exact packages that are necessary for each example at their top.
Perhaps you/we should postpone this issue until the content of the notebooks stabilizes. First finish the content and then keep track of the dependencies while testing each notebook individually on a vanilla system trying to find minimum requirements for each.

Yes, there'll be some fluctuations fro a while. At the moment, I am trying to finalize #25 and then plan to move from tmieslinger/how_to_eurec4a to eurec4a/how_to_eurec4a in order to provide a more stable location and to open up the reviewing process to a larger community.

intake.gui at the end of show_intake_catalog tells me that it requires panel>=0.8.0

Good catch. I was wondering if it is a good idea to include it into the book. The gui is kind of useless in a static book, as it requires interactive communication with a running python kernel in the background. However it might be good have the requirements installed and write more about this limitation, such that one can just run it within a binder environment. @MeraX what do you think about this?

I tried the GUI. As far as I could see, it is not much more useful than the tree function (at the moment). If it stays like this, I would mention this requirement directly at the example and keep the example as an advertisement of advanced Intake magic.
However, the GUI has this interesting 📊 plot button. This would require some additional meta data in intake to define some default plots. If we would support this feature, than the gui might be a good thing. Having the meta data could perhaps also enable some .plot() magic on Intake catalog items. In addition to adding the metadata, the plotting features of intake would require HvPlot, which is an interesting plotting alternative in itself.

:+1: thus I'll just add the >=0.8.0 to the text before the commented-out intake.gui.
I also really like the idea of automatic plots and we should really look into this more. I just didn't spent enough time on HvPlot yet to fully figure this out. If you already have some ideas, it would be great if you could introduce some first plots into the eurec4a-intake.

This is what this GUI feature could look like. If you define a custom plot, you can get very simple quick plots. However, I dind't find an option to select a time slice such that you will always load the full time series, which is slow, depending on the dataset.
Actually I was expecting all radiometer channels in different colors in my example plot but due to testing different stuff and data getting stuck in caches, we can only see one channel.

In principle, I like our slightly customized examples in this book more.
Intake plots are probably a feature that we might explore later. in more detail.


Train your own data and get input dimension problems during training

I have a batch of png image data, the mode of the image is "I", I trained my data according to the SSD7 tutorial, but I got the following error:
Epoch 1/2
4/5 [=======================>......] - ETA: 6s - loss: 21.5896
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-d9391a8ae4e5> in <module>
     10                               validation_steps=2,
     11                               initial_epoch=initial_epoch,
---> 12                              verbose=1)

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
     89                 warnings.warn('Update your `' + object_name + '` call to the ' +
     90                               'Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
     92         wrapper._original_function = func
     93         return wrapper

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
   1416             use_multiprocessing=use_multiprocessing,
   1417             shuffle=shuffle,
-> 1418             initial_epoch=initial_epoch)
   1419
   1420     @interfaces.legacy_generator_methods_support

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training_generator.py in fit_generator(model, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
    232                             val_enqueuer_gen,
    233                             validation_steps,
--> 234                             workers=0)
    235                     else:
    236                         # No need for try/except because

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
     89                 warnings.warn('Update your `' + object_name + '` call to the ' +
     90                               'Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
     92         wrapper._original_function = func
     93         return wrapper

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training.py in evaluate_generator(self, generator, steps, max_queue_size, workers, use_multiprocessing, verbose)
   1470             workers=workers,
   1471             use_multiprocessing=use_multiprocessing,
-> 1472             verbose=verbose)
   1473
   1474     @interfaces.legacy_generator_methods_support

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training_generator.py in evaluate_generator(model, generator, steps, max_queue_size, workers, use_multiprocessing, verbose)
    344                                  'or (x, y). Found: ' +
    345                                  str(generator_output))
--> 346             outs = model.test_on_batch(x, y, sample_weight=sample_weight)
    347             outs = to_list(outs)
    348             outs_per_batch.append(outs)

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training.py in test_on_batch(self, x, y, sample_weight)
   1248         x, y, sample_weights = self._standardize_user_data(
   1249             x, y,
-> 1250             sample_weight=sample_weight)
   1251         if self._uses_dynamic_learning_phase():
   1252             ins = x + y + sample_weights + [0.]

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_array_lengths, batch_size)
    749             feed_input_shapes,
    750             check_batch_axis=False,  # Don't enforce the batch size.
--> 751             exception_prefix='input')
    752
    753         if y is not None:

~/sda3/Anaconda3/envs/deep2.0.0/lib/python3.6/site-packages/keras/engine/training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
    126                         ': expected ' + names[i] + ' to have ' +
    127                         str(len(shape)) + ' dimensions, but got array '
--> 128                         'with shape ' + str(data_shape))
    129                 if not check_batch_axis:
    130                     data_shape = data_shape[1:]

ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (7, 512, 512)

What I don't understand is that if my data dimension is wrong, then why not give an error at the beginning of training, but train a few batches before giving an error? Please guide me more, thank you!
In addition, I provided some data and my training script, put 00.py into the ssd_keras directory, change the data path to train

i meet the same problem

@zhouhao-learning @lcvcl same problem

same problem!
l set the n_classes = 12 and batch_size =16
ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (16, 1)


Turn fork PR into local branch PR that can run CI with secrets

Github Actions does not allow running CI for PRs from forks, as a user could extract secrets and other credentials by sending them to a remote location in the code. That makes sense and is a good default.
But sometimes it would be neat to be able to do that anyway: The diff of the PR is small enough to be reviewed, and then you are just missing a button to trigger that CI to double check that your tests are still passing.
An example: https://github.com/prisma/e2e-tests/pull/664
Refined Github could offer a button "Turn fork PR into local PR" or similar, that creates a new PR with the same code changes as the PR from the fork, a "closes #123" for the original PR and adds appropriate Co-Authored by attribution to the commit message or PR content.
This PR would get a normal CI run and could be safely merged with confidence.

IssueHunt Summary

Backers (Total: $10.00)

 janpio ($10.00)

Become a backer now!
Or submit a pull request to get the deposits!
Tips

Checkout the Issuehunt explorer to discover more funded issues.
Need some help from other developers? Add your repositories on IssueHunt to raise funds.

The easiest way to accomplish this I can think of is, one API call at a time:

Create a branch on origin
Change the PR base to that new branch
Merge the current PR into it, possibly as a "rebase" so commits are preserved
Open a new PR from that new branch

This is a niche and substantial feature, which is a bad combination as far as Refined GitHub is concerned.


Mod completly breaks resource pack loading

Here are logs, have fun with em https://gist.github.com/JustFoxx/d290412034b020d1df0c2e716db90e06

This would be one of your mods that uses Geckolib, not Geckolib itself.