Correct class name in Carousel

Which package has an issue?
@yamada-ui/react
Package Version
1.3.9
Description
Corrected the following class names according to BEM

ui-carousel__indicators__indicator

fix to ui-carousel__indicator

ui-carousel__slide__inner

fix to ui-carousel__slide-inner

ui-carousel__sliders__inner

fix to ui-carousel__sliders-inner

Create the changeset with major.
Please derive a new branch from the v2.0 branch and create a pull request for the v2.0 branch, not the main branch, as we plan to release the product in v2.0.0.
Link to Reproduction
No response
Steps to Reproduce

Go to '...'
Click on '...'
Scroll down to '...'
See error

Browser
None
Operating System

[ ] macOS
[ ] Windows
[ ] Linux

Do you know how to fix the issue?
None
Are you willing to participate in fixing this issue and create a pull request with the fix?
None
Additional Information
No response

Fix the test code if necessary.

Fix the test code if necessary.

got it


Incorrect loop behavior using slidesPerView, slidesPerGroup, and centeredSlides.

This is a (multiple allowed):

[x] bug

[ ] enhancement

[ ] feature-discussion (RFC)

Swiper Version: 4.1.6.

Platform/Target and Browser Versions: macOS/Chrome.

Live Link or JSFiddle/Codepen or website with isssue: https://codepen.io/anon/pen/qoarzj_.

What you did
Setup swiper with loop, slidesPerView, slidesPerGroup, and centeredSlides using 12 slides.
Expected Behavior
Next and Previous arrow should loop the slides continuously
Actual Behavior
The next arrow works as expected but on the second click the previous arrow, instead of the slide moving to the right to reveal [6][7][8], the slider slides the opposite direction.
i've been increasing the loopedSlides and it looks like the magic number which gives slide 1 the correct starting position and the slide to not have empty gaps while clicking on previous arrow is 9. however, any number higher than that in multiples of 3, e.g, 12, 15, 18, etc. doesn't seem to do anything different than 9.
i've also tried adding loopAdditionalSlides into the mix with no changes.

I also get a slightly different behavior if i drag it. When i drag to the right, I can actually get to [6][7][8], but as soon as i start the drag again from that position, [6][7][8] becomes [12][1][2]

I'm having the same problem. Is it possible to use centeredSlides with loop?


Styling seems to be broken in some places

the contentside does not stretch to the height of the whole screen anymore (on mobile, when a chatview is open with only one or two messages for example)
the styling of the search and post buttons (on mobile and only when no other content is present) is off:

Turned out to be a caching issue


Access is denied error

Getting the following error upon execution of this node:
Error occurred when executing TopazPhotoAI:
[WinError 5] Access is denied
File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfy-Topaz\topaz.py", line 266, in upscale_image
(upscaled_img_file, user_settings, autopilot_settings) = self.topaz_upscale(img_file, compression, format, tpai_exe=tpai_exe, upscale=upscale, sharpen=sharpen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfy-Topaz\topaz.py", line 241, in topaz_upscale
p_tpai = subprocess.run(tpai_args, capture_output=True, text=True, shell=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "subprocess.py", line 548, in run
File "subprocess.py", line 1026, in init
File "subprocess.py", line 1538, in _execute_child

If I execute tpai.exe from cmd, I get this message:
Checking if log directory should be pruned. Currently have 10 log files.
Log file count is within bounds
QObject::moveToThread: Cannot move objects with a parent
Logger initialized
Error | Attempted to set index out of range: 0 images loaded, but setting index to 0
No valid image files passed

Looks like you do have access to execute tpai.exe, so the error message from the node is indeed puzzling.
Would you confirm the following please?

The tpai_exe value within the comfy node points to the file (tpai.exe) and not the directory.
The system user that's running comfy is the same user that ran tpai.exe from cmd (can check from Task Manager, under the details tab). Is comfy running on a remote server that doesn't have Topaz Photo AI installed? Is comfy running locally but as a different user with no access to tpai.exe?

If both of these are true, then I'd be at a loss and have to add some more logging to debug.

Believe it or not, I did try to link the exe at first but got an error so I just input the directory only. Now when I include the /tpai.exe, everything seems to work just fine.


Question about downloading file

Hello,
it may be a dummy question, but I am having trouble understanding on how to do request/recieve response over HTTP. I would like to use UDT to speed up downloads of big files from Amazon S3.
I have tried doing this, but it is creating only echo server and not actually doing any HTTP requests to amazon.
nc -l 80 #recieved GET / instead of response
parcel-udt2tcp http://commoncrawl.s3.amazonaws.com
parcel-tcp2udt localhost:80
nc localhost 80 # send GET /

I have tried to use UDT directly, but that can't even connect.
string host = "google.com";
	int port = 80;
	string message = "GET " + url_tokens[6];

	//create socket
	UDTSOCKET socket = UDT::socket(AF_INET , SOCK_STREAM , 0);

	//resolve host name
	struct hostent *he;
	if ((he = gethostbyname( host.c_str())) == nullptr)
	{
		cout <<"Failed to resolve hostname " << host << endl;
		return false;
	}

	//Cast the h_addr_list to in_addr , since h_addr_list also has the ip address in long format only
	struct sockaddr_in server;
	struct in_addr **addr_list = (struct in_addr **) he->h_addr_list;
	for(int i = 0; addr_list[i] != NULL; i++)
	{
		server.sin_addr = *addr_list[i];
		cout << host <<" resolved to "<< inet_ntoa(*addr_list[i]) <<endl;
		break;
	}
	server.sin_family = AF_INET;
	server.sin_port = htons(port);

	// connect to the server, implict bind
	if (UDT::ERROR == UDT::connect(socket, (sockaddr*)&server, sizeof(server)))
	{
	  cout << "connect: " << UDT::getlasterror().getErrorMessage();
	  return false;
	}

Please would you be so kind and explain me how can i send classic HTTP request over UDT and recieve back the answer? I guess that what your library is for, i am just really lost, I am unfortunately not a network pro, i used only libcurl so far.

Hi,
UDT is a protocol that has to be supported on both ends in order for it to work. In this case, AWS would have to be running a UDT S3 server in order for you to download data from them. They of course aren't doing this however.
With this tool, you could spin up an EC2 instance and run the parcel server there which would then translate the request to http. The UDT <-> TCP(HTTP) process would then be accessing S3 over the local network on Amazon's side which you could then access with a Parcel client running on your computer.
That said, I have no idea if you'd see a performance improvement in doing this or not. If I had to guess I'd say the performance improvement probably isn't work the effort.


[Runtime] Export GraphRuntime in tvm_runtime.dll

Currently, the GraphRuntime class is unusable in C++ from Windows. This change exposes the class.
@jmorrill would you be able to take a look?

@soiferj  This is where it gets a little embarrassing for me.  I've never been able to get a good link to tvm_runtime.dll, even using tvm_runtime_pack.cc...So like killing a a fly with a rocket launcher, I work off this CMake change:
https://github.com/jmorrill/tvm/blob/cc0b1e750512b690bbecc9e98a30f7a9945843b1/CMakeLists.txt#L282 aka "export everything"
I can try again to get this tvm_runtime_pack.cc method to give me a link and then see if your fix solves it :).

@soiferj  Thank you.  This fixes my need to have set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) and can re-enable INTERPROCEDURAL_OPTIMIZATION on it.
tvm_runtime.dll links fine on VS2019!

Awesome! Thanks @jmorrill. Would you mind approving the PR if it looks good? :)


How can we change the expression delimiters to some of our components?

@Danilo-Araujo-Silva: Wrong repository. See #332.

Sorry. Cleaned and closed.


Screen shot for API failure step

Hi,
I have two BDD scenarions, first BDD for UI screen which has code to takes screen shot for Pass/fail BDD step. However,Second BDD is about to API steps automation. If we find API test case failure then failure step shows screenshot of earlier last screen shot of first BDD step.

As quick work around you can cleanup screenshot in step listener before execution method.
TestBaseProvider.instance().get().setLastCapturedScreenShot("");


[core-lro] Support resourceLocation in response body

Fixes a JS version of https://github.com/Azure/autorest.csharp/issues/2672 by getting a resource location from the final response. See the added test case for an example of the newly supported scenario.

API change check
API changes are not detected in this pull request.


[3/5] Clustered Purge - Rewrite pluggable storage engine tests

This PR updates the pluggable storage engine test suite so that its a self contained app to clean up code and various other odds and ends.
The biggest change is that this also makes the tests go through couch_server instead of instantiating the engines directly. This allows a storage engine to open itself as a database which turned out to be necessary for compactions with purge so that we can enable code re-use without requiring every engine to correctly implement the get_minimum_purge_seq logic.
This PR depends on #1366 and #1367.

Getting this error in eunit
undefined
*** test generator couch_bt_engine_tests:couch_bt_engine_test_/0 failed ***
**in function cpse_util:create_tests/3
  called as create_tests(couch,couch_bt_engine,"couch")
in call from couch_bt_engine_tests:couch_bt_engine_test_/0
**error:undef

Thanks @davisp I already squashed that merge conflict to the commit it goes in.


chore: frontend and backend telemetry updates for execute flow

Description

Added frontend and backend custom OTLP telemetry to track execute flow
Updated end vars in client side code to match with server sdk intialisation code.

PR fixes following issue(s)
Fixes #28800 and #28805
Type of change

Chore (housekeeping or task changes that don't impact user perception)

How Has This Been Tested?

[x] Manual
[ ] JUnit
[ ] Jest
[ ] Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

Can you please udpate the PR description ?

Hi @vsvamsi1 just a minor info - as per convention when we raise a PR the branch name should either be fix/... or feat/... or chore/... .

/ok-to-test sha=583cf9412c80a437be3fc6698b4864ad25401c2c

Server side changes LGTM.

/build-deploy-preview skip-tests=true

/build-deploy-preview skip-tests=true

/ok-to-test sha=e50a50836d8955757000833b6724eb13dd0877ba

/build-deploy-preview recreate=true

/build-deploy-preview skip-tests=true

/build-deploy-preview skip-tests=true

/build-deploy-preview skip-tests=true

/build-deploy-preview skip-tests=true

/ok-to-test sha=9e5d108ba7a593144e7c692bdb83cf669616f508

/ok-to-test sha=bef3ffa1c1b856612235e0e1378da4e0122e16ac

/build-deploy-preview skip-tests=true

/ok-to-test sha=fbe45a959ad391087d6cf3878991efec07286a05

/build-deploy-preview skip-tests=true


Discriminator for oneOf schemas ignored

If a discriminator is set for a list of oneOf schemas only the matching schema should be validated against and therefore useful errors can be provided:
schema
requestBody:
  content:
    application/json:
      schema:
        oneOf:
          - $ref: '#/components/schemas/cat_type'
          - $ref: '#/components/schemas/dog_type'
        discriminator:
          propertyName: type
          mapping:
            cat: '#/components/schemas/cat_type'
            dog: '#/components/schemas/dog_type'

request
{'type': 'dog' ...}

If the request is invalid the validator raises: "Exactly one valid schema should be valid, None found."
But if there's a discriminator we know which schema to validate against and could provide a useful error message. Such as what property is missing or invalid.

See https://github.com/p1c2u/openapi-core/issues/257#issuecomment-964053231 for a workaround.


Conversion of many tests to SimpleTestCase.

This builds on top of #4522.
I plan to squash all commits if required, it was just easier working this way.

Note that I used this poorly written stashed patch to detect possible candidates and I might have missed some.
While this doesn't makes a big speed-up difference on in memory SQLite and PostgreSQL I assume it should make one on databases that don't have fast transaction support.

Buildbot test on Oracle.

buildbot, test on oracle.

Unfortunately, no measurable speedup on Oracle in my testing.

Do you think it's still worth merging in this case? I guess we still make sure no queries are executed during those tests.

I would still merge it after squashing all the "Used SimpleTestCase....".

Squashed all commits, will merge if tests still pass.


Grad_norm is Nan when resume training

TorchVision: 0.10.1+cu111
OpenCV: 4.5.3
MMCV: 1.3.9
MMCV Compiler: GCC 7.5
MMCV CUDA Compiler: 11.1
MMDetection: 2.12.0+/2.14.0+
TORCH_VERSION=1.9.1
Train SparseRCNN_R50_8stages
Train on single GPU 3080ti. Each GPU has 4 images. Cumulate gradients for 4 iterations to backpropagate.
Nothing else has been changed compared to the "sparse_rcnn_r50_fpn_1x_coco.py"
When I resumed training, I found that grad_norm become NaN but the original training (training at one time) will not have any NaN value.
If the checkpoint file is needed, I am very happy to upload it.

Maybe there are potential bugs in the  Cumulate gradients hook,  because I check the normal resume operation is no problem. we will check it asap

I encountered the same problem, did you solve it?

samething happened on me, could you pls solve it?


Felix's is thrashing CPU and increasing etcd usage at 60s intervals

In a recent simulated scale test, I noticed that every 60 seconds:

Felix has a spike of 80% CPU
etcd has a spike of 20% CPU
RAM disk usage jumps by ~120 kiB

This occurs even when the test framework is idle. Full results are on Google Drive; the relevant graphs start on page 3.
I saw similar results in the previous simulated scale tests (see page 8), but we mostly overlooked them because a 60s interval was too short to notice in the other tests.
It seems likely that something is going wrong in the periodic resync (which happens on a 60s interval). What's unusual is that the periodic resync code comes from mech_calico.py, so it's not obvious why that would affect Felix.
For a short-term fix, we can bump up the resync interval, but we should really find out what's leaking, and fix it.

etcd is garbage collected so it's normal operation is to increase disk usage up to some limit and then do a GC, which should reduce it back down again.  It's important to run the test long enough to get it to do a GC.  It'll take a long time without heavy churn going on, I think we have to make several thousand writes before it GCs.
The CPU spikes at the pluign/etcd are normal, I think.  The periodic resync is intensive and should use plenty of CPU if available.
However, if the periodic resync doesn't find anything to change then I'd expect it not to update etcd, so felix shouldn't see any changes and hence it shouldn't do anything.

@alexwlchan are there any logs from the periodic resync on the control node?  I think it should log if it finds anything that it needs to do.

(Or from felix, for that matter.)

@plwhite I think @alexwlchan is on vacation, are we likely to get any more diags or is anyone able to repro?

I can repro easily enough - just set up a system with a lot of data in it (a few thousand endpoints, a thousand hosts) and wait a bit. You'll see spikes of CPU every 60 seconds.
This is caused by the OpenStack plugin resyncing its data (we think). Most likely it's a simple bug where the data read back is not as expected and so it rewrites something.
If you want to investigate, feel free to take the issue; otherwise I'll get to it later in the week.

That's almost certainly right.
OpenStack resync is something we need to continue to think about over the next few weeks to try to reduce its impact. I'm going to sketch out some possible enhancements and solicit feedback from the team, I think.

I've done a bit more testing, and discovered that I can reproduce this bug on the newest version of Calico (0.25). I've also captured a stack of debug logs from Felix, which we can go through to hopefully narrow down the bug. Details on Google Drive.

Here's a relevant part of the logs. Looks like we fail to correctly parse a timeout of some sort.
2015-06-22 14:00:50,676 [DEBUG][46626/8] calico.felix.actor 245: Finishing message batch
2015-06-22 14:01:52,051 [ERROR][46626/3] calico.felix.fetcd 371: Unknown etcd error 'Unable to decode server response: timed out'; doing resync.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/calico/felix/fetcd.py", line 329, in _wait_for_etcd_event
    check_cluster_uuid=True)
  File "/usr/local/lib/python2.7/dist-packages/python_etcd-0.3.3_calico_2-py2.7.egg/etcd/client.py", line 357, in read
    return self._result_from_response(response)
  File "/usr/local/lib/python2.7/dist-packages/python_etcd-0.3.3_calico_2-py2.7.egg/etcd/client.py", line 541, in _result_from_response
    'Unable to decode server response: %s' % e)
EtcdException: Unable to decode server response: timed out
2015-06-22 14:01:52,051 [ERROR][46626/3] calico.felix.fetcd 371: Unknown etcd error 'Unable to decode server response: timed out'; doing resync.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/calico/felix/fetcd.py", line 329, in _wait_for_etcd_event
    check_cluster_uuid=True)
  File "/usr/local/lib/python2.7/dist-packages/python_etcd-0.3.3_calico_2-py2.7.egg/etcd/client.py", line 357, in read
    return self._result_from_response(response)
  File "/usr/local/lib/python2.7/dist-packages/python_etcd-0.3.3_calico_2-py2.7.egg/etcd/client.py", line 541, in _result_from_response
    'Unable to decode server response: %s' % e)
EtcdException: Unable to decode server response: timed out
2015-06-22 14:01:52,052 [INFO][46626/3] calico.felix.fetcd 199: (Re)connecting to etcd. Old etcd cluster ID was f2e800cca50551bc.
2015-06-22 14:01:52,054 [INFO][46626/3] calico.felix.fetcd 231: Polling aborted, doing resync.
2015-06-22 14:01:52,054 [INFO][46626/3] calico.felix.fetcd 216: Reconnecting and loading snapshot from etcd...
2015-06-22 14:01:52,055 [INFO][46626/3] calico.felix.fetcd 201: (Re)connecting to etcd. No previous cluster ID.

I think we fixed this already with an update to our fork of python-etcd: https://github.com/Metaswitch/python-etcd/commit/03ea4610e6bf22e28ff5830953f47f4ea4664efb
The problem was that the timeout was being re-wrapped instead of being propagated.

Good stuff - so follow on questions.

This goes away as soon as we take the updated python-etcd, i.e. next release (or a release soon), right? Or does something have to happen on that one.

Are we getting these fixes upstreamed into python-etcd (assuming we are, but not happened yet)?

I have the latest version of etcd on the scale test rig, but I don't know what version of python-etcd it's using. I'll have a look tomorrow and see if it needs updating. (If so, it wasn't updated by the dpkg's – is that a problem?)

I suspect that the version of python-etcd in our PPAs is out of date, and hasn't got this fix yet. We could get the version of python-etcd direct from the GitHub repo and put that in - might be worth trying if it's quick.

I don't think that's true, I recall checking yesterday and confirming that it wasn't the case.

On 23 Jun 2015, at 09:17, Peter White<EMAIL_ADDRESS>wrote:
I suspect that the version of python-etcd in our PPAs is out of date, and hasn't got this fix yet. We could get the version of python-etcd direct from the GitHub repo and put that in - might be worth trying if it's quick.
—
Reply to this email directly or view it on GitHub.

So here's the version of python-etcd on my test kit:
$ dpkg -l | grep etcd
ii  etcd             2.0.11-1~ubuntu14.04.1~ppa3      amd64        Highly-available key value
                                                                   store for shared configuration
                                                                   and service discovery
ii  python-etcd      0.3.3-1calico0.22.1              all          A python client for etcd

I updated from the 0.22.1 release to the 0.25 release yesterday, but didn't touch python-etcd. Since Shaun's fix went in to python-etcd after Calico 0.22.1 was released, I assume that's why I don't have the fix yet. I'll update to the latest version of python-etcd to check if this goes away.

I think we released python-etcd mid-cycle, and gave it the release number of the active release at the time. I don't think we missed this.

On 23 Jun 2015, at 09:58, Alex Chan<EMAIL_ADDRESS>wrote:
So here's the version of python-etcd on my test kit:
$ dpkg -l | grep etcd
ii  etcd             2.0.11-1~ubuntu14.04.1~ppa3      amd64        Highly-available key value
store for shared configuration
and service discovery
ii  python-etcd      0.3.3-1calico0.22.1              all          A python client for etcd
I updated from the 0.22.1 release to the 0.25 release yesterday, but didn't touch python-etcd. Since Shaun's fix went in to python-etcd after Calico 0.22.1 was released, I assume that's why I don't have the fix yet. I'll update to the latest version of python-etcd to check if this goes away.
—
Reply to this email directly or view it on GitHub.

I've just tried to update python-etcd, and apparently it can't find any updates:
root at calico23 in /h/ubuntu
# dpkg -l | grep etcd
ii  etcd             2.0.11-1~ubuntu14.04.1~ppa3      amd64        Highly-available key value store for shared configuration and service discovery
ii  python-etcd      0.3.3-1calico0.22.1              all          A python client for etcd
root at calico23 in /h/ubuntu
apt-get install python-etcd
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-etcd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
I also don't see a release of python-etcd from our fork that comes after Shaun's fix.

I'm going to take the latest code from our python-etcd fork and repeat the test. If it does, we should probably think about updating our PPAs so that other people don't get bitten by this bug.

I think what I did was check whether code from Shaun's patch was in the released package, which I believe it was. But maybe I hallucinated the entire procedure, it wouldn't be unheard of.

I've repeated the test with an updated version of python-etcd. It has no effect on etcd usage (etcd's virtual memory usage is somewhat higher, but that seems unrelated). Updated graphs and logs are in Google Drive.
I had another look through the logs: I can't find anything that looks like the etcd timeout message above, so that bug seems to have been squashed. But I did see this log fragment which seems to suggest a lot of etcd work is being done:
110942:2015-06-23 11:08:22,105 [DEBUG][39638/3] urllib3.connectionpool 390: Setting read timeout to 90
110943:2015-06-23 11:08:22,106 [DEBUG][39638/3] urllib3.connectionpool 430: "GET /v2/keys/calico/v1?waitIndex=2291&recursive=true&wait=true HTTP/1.1" 200 None
110944:2015-06-23 11:08:22,106 [DEBUG][39638/3] calico.felix.fetcd 334: etcd response: <class 'etcd.EtcdResult'>({'newKey': False, '_prev_node': <class 'etcd.EtcdResult'>({'newKey': False, '_children': [], 'createdIndex': 1662, 'modifiedIndex': 1662, 'value': u'{"ipv4_gateway": "<IP_ADDRESS>", "name": "tapbe12be96-69", "state": "active", "ipv6_nets": [], "mac": "00:01:02:03:04:05", "ipv4_nets": ["<IP_ADDRESS>/32"], "profile_ids": ["securitygroup3"]}', 'expiration': None, 'key': u'/calico/v1/host/felixhost-7/workload/openstack/be12be96-69bb-484c-a716-5ddab1f77111/endpoint/be12be96-69bb-484c-a716-5ddab1f77111', 'ttl': None, 'action': None, 'dir': False}), 'raft_index': 2977, '_children': [], 'createdIndex': 2291, 'modifiedIndex': 2291, 'value': u'{"ipv4_gateway": "<IP_ADDRESS>", "name": "tapbe12be96-69", "state": "active", "ipv6_nets": [], "mac": "00:01:02:03:04:05", "ipv4_nets": ["<IP_ADDRESS>/32"], "profile_ids": ["securitygroup3"]}', 'etcd_index': 2316, 'expiration': None, 'key': u'/calico/v1/host/felixhost-7/workload/openstack/be12be96-69bb-484c-a716-5ddab1f77111/endpoint/be12be96-69bb-484c-a716-5ddab1f77111', 'ttl': None, 'action': u'set', 'dir': False})
110945:2015-06-23 11:08:22,107 [DEBUG][39638/3] calico.etcdutils 45: etcd event set for key /calico/v1/host/felixhost-7/workload/openstack/be12be96-69bb-484c-a716-5ddab1f77111/endpoint/be12be96-69bb-484c-a716-5ddab1f77111
110946:2015-06-23 11:08:22,107 [DEBUG][39638/3] calico.etcdutils 64: Found handler for event set for /calico/v1/host/felixhost-7/workload/openstack/be12be96-69bb-484c-a716-5ddab1f77111/endpoint/be12be96-69bb-484c-a716-5ddab1f77111, captures: {'hostname': u'felixhost-7', 'orchestrator': u'openstack', 'endpoint_id': u'be12be96-69bb-484c-a716-5ddab1f77111', 'workload_id': u'be12be96-69bb-484c-a716-5ddab1f77111'}
110947:2015-06-23 11:08:22,107 [DEBUG][39638/3] calico.felix.fetcd 405: Endpoint EndpointId<be12be96-69bb-484c-a716-5ddab1f77111> updated
110948:2015-06-23 11:08:22,108 [DEBUG][39638/3] calico.felix.fetcd 600: Validated endpoint : {'ipv4_gateway': '<IP_ADDRESS>', 'name': u'tapbe12be96-69', 'state': 'active', 'ipv6_nets': [], 'mac': '0:1:2:3:4:5', 'ipv4_nets': ['<IP_ADDRESS>/32'], 'profile_ids': ['securitygroup3']}
110949:2015-06-23 11:08:22,108 [DEBUG][39638/3] calico.felix.actor 479: Message 3881f9115b3c (on_endpoint_update) sent by EtcdWatcher (processing d16dab847786) to UpdateSplitter, queue length 0
110950:2015-06-23 11:08:22,108 [DEBUG][39638/3] calico.felix.fetcd 326: About to wait for etcd update 2292
110951:2015-06-23 11:08:22,109 [DEBUG][39638/8] calico.felix.actor 224: Message 3881f9115b3c (on_endpoint_update) recd by UpdateSplitter from EtcdWatcher (processing d16dab847786), queue length 0
110952:2015-06-23 11:08:22,109 [INFO][39638/8] calico.felix.splitter 159: Endpoint update for EndpointId<be12be96-69bb-484c-a716-5ddab1f77111>.
110953:2015-06-23 11:08:22,109 [DEBUG][39638/8] calico.felix.actor 479: Message 99ea27888a3a (on_endpoint_update) sent by UpdateSplitter (processing 3881f9115b3c) to IpsetManager(IPv4), queue length 0
110954:2015-06-23 11:08:22,109 [DEBUG][39638/8] calico.felix.actor 479: Message fecf5ab6d9c8 (on_endpoint_update) sent by UpdateSplitter (processing 3881f9115b3c) to IpsetManager(IPv6), queue length 0
110955:2015-06-23 11:08:22,109 [DEBUG][39638/8] calico.felix.actor 479: Message a41b8012ab88 (on_endpoint_update) sent by UpdateSplitter (processing 3881f9115b3c) to EndpointManager(IPv4), queue length 0
110956:2015-06-23 11:08:22,110 [DEBUG][39638/8] calico.felix.actor 479: Message cacd1ce3bc0f (on_endpoint_update) sent by UpdateSplitter (processing 3881f9115b3c) to EndpointManager(IPv6), queue length 0
110957:2015-06-23 11:08:22,110 [DEBUG][39638/8] calico.felix.actor 245: Finishing message batch
110958:2015-06-23 11:08:22,110 [DEBUG][39638/11] calico.felix.actor 224: Message 99ea27888a3a (on_endpoint_update) recd by IpsetManager(IPv4) from UpdateSplitter (processing 3881f9115b3c), queue length 0
110959:2015-06-23 11:08:22,110 [DEBUG][39638/11] calico.felix.ipsets 304: Endpoint EndpointId<be12be96-69bb-484c-a716-5ddab1f77111> updated
110960:2015-06-23 11:08:22,110 [DEBUG][39638/11] calico.felix.actor 245: Finishing message batch
110961:2015-06-23 11:08:22,110 [INFO][39638/11] calico.felix.ipsets 424: Finishing batch, sending updates to any dirty tags..
110962:2015-06-23 11:08:22,110 [INFO][39638/11] calico.felix.ipsets 426: Finished sending updates to dirty tags.

If I grep through the log for similar occurrences, and plot the frequency against time:

Lots of logs like that at 60s intervals. Possibly I'm barking up the wrong tree entirely, but that seems significant to me.

I'm seeing similar logs in the plugin log for the test framework:
Write port {{port info}} to etcd

500 logs at a time, once every 60s, one for every endpoint. I'm going to sprinkle some exception logging through the codebase, so that I can get some tracebacks and work out exactly where the resync is coming from.

That resync is coming from the resync, which is a 60s timer. What matters is: why does the plugin think all the ports are missing?

Turns out this was a bug in our simulated scale test framework, not Felix. As part of the resync, mech_calico gets a list of missing ports with get_ports() from the Neutron plugin. That gets stubbed out in the test framework as follows:
def get_ports(self, context, filters):
    return self.driver.ports.values()

Although mech_calico was passing a filter that shouldn't match anything ({'id': set([])}) to get a list of missing ports, that was being ignored. Hence every port gets treated as missing. Oops.
I've tweaked the stub so that it returns an empty list if it detects this empty resync filter. This seems to have fixed the issue:

etcd disk usage still increases slowly, at ~4KB every 10 seconds, but it's much more gradual than before.
CPU usage for both etcd and calico-felix is way down.
etcd's (resident) memory usage is noticeably down.
Once the network stabilises, calico-felix's CPU usage drops to 0.

This explains why we couldn't repro the issue on a vanilla OpenStack setup.


Prevented default on all modifier keys (temporary fix for 216)

This is a temporary fix, but I think it's in the right direction for #216. Odds are we're going to only be whitelisting keys based on config, everything else should be blocked. This fixed command-a select for me and made ctrl-r work
Also this was an excuse to get rid of some gross whitespace

Great, thanks! The only downside that I can see is that I can't use Control+Shift+I to open the dev tools anymore - but it still works from the menubar, right?

If you have any other white listed things I can put them in before this is
merged in,  just list them
On Feb 15, 2017 10:53 AM, "extr0py"<EMAIL_ADDRESS>wrote:

Great, thanks! The only downside that I can see is that I can't use
Control+Shift+I to open the dev tools anymore - but it still works from
the menubar, right?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/extr0py/oni/pull/223#issuecomment-280049629, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AICBCYZZdg6GcpXXIkD7zOIa1z9a2AZ7ks5rcx-HgaJpZM4MB3J4
.

That's the only one I can think of for now - thanks for whitelisting it

@extr0py: Uhm, is there a different way to open it on mac? Which menu bar should it be under? I can't seem to open it with ctrl-shift-I, and that's after removing any of the code I put in originally.

Looks like it's Cmd+Opt+I on Mac - try that and see if they open. Sorry, the Ctrl+Shift+I is the windows shortcut.

Actually as of right now I can't, and that's after removing all evt.preventDefault(). Is there a specific way I need to be building it?

Which menu bar should it be under?

It's under View -> Toggle Developer Tools

Perhaps this is another issue for another time, but I can't find it

Ahh, interesting, thanks for the screenshot.  We're defining the menus by telling Electron "generate your default menus" (which includes the default View menu) and then we override menu[3] with our Window items.  It looks like on Mac, menu[3] is the View menu, not Window.
It looks like there's the default Electron menu provided by Mac and then there's the File menu which on your system is also labeled Electron, throwing off the indexing and creating an off-by-one issue.
I wonder if all Mac users are seeing this behavior or if there's something screwy in your environment.  At the very least, I'd expect that second Electron menu to be labeled Oni since that's what the code is trying to do:
    let firstMenu = os.platform() == "win32" ? 'File' : 'Oni';
    menu.unshift({
         label: firstMenu,

It's got to be something weird, because after leaving it open for a while and coming back to it, it's there... What I showed you was immediately after startup. I'd say ignore that for now, it might just be me. However, the issue I'm running into with this PR is getting the actual key combined with the modifier state. We might have to abuse key codes or something similar in order to catch key chords involving more than one modifier. Until then, the developer tools (for me at least) does work when invoked from the menu, and I can catch

I was able to repro this on Mac as well, it looks like there is some craziness there. I'm wondering if at this point, we should just scrap the default menu and use the custom built one we have.
This PR looks good though in the scope of fixing this bug. We can continue to iterate / improve the menu - it would be worth having a separate issue to track the Mac menu craziness.
Thanks for the PR @bert88sta ! I'll merge it in.


Possible format string issue in Slim\Http\UploadedFile::moveTo()

throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));
throw new RuntimeException(sprintf('Error removing uploaded file %1s', $this->name));
throw new RuntimeException(sprintf('%1s is not a valid uploaded file', $this->file));
throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));
throw new RuntimeException(sprintf('Error moving uploaded file %1s to %2s', $this->name, $targetPath));

According to the documentation, 1 and 2 in %1s and %2s are width specifiers (that is, the minimum length of the converted string).
That is, %1s will give the string with at least one character, %2s with at least to characters, that is:
> echo sprintf("Error moving uploaded file %1s to %2s", "a", "b");
Error moving uploaded file a to  b

But other than with empty or single letter file names, this is probably meaningless.
As far as I understand, the original intent was to facilitate internationalization to make sure that the first parameter is always the name of the source file, and the second one is the destination. If so, the correct syntax will be
sprintf('Error moving uploaded file %1$s to %2$s', $this->name, $targetPath)

E.g.,
> echo sprintf("Error moving uploaded file %1\$s to %2\$s\n", "file1", "file2");
Error moving uploaded file file1 to file2
> echo sprintf("Error moving uploaded file %2\$s to %1\$s\n", "file1", "file2");
Error moving uploaded file file2 to file1

I don't see an actual problem here?

It seems to be confusing. I think the author meant to use numbered placeholders, not padded strings. I propose just using plain placeholders (%s). I have added a PR.

As the PR was merged to alter behaviour, and no more info or comments have been added by @sjinks, I'm closing this issue. If there is any more info, please add it and it can be reopened if necessary.


Can ted policy uses distributed training ?

What problem are you trying to solve?
I'm trying to use multiple gpus to optimize ted policy during training time.
What's your suggested solution?
At first, I tried to add mirrored strategy to training function of ted policy. Below is the run_training in ted_policy.py, I added a segment where I use mirrored strategy and the old segment which uses only one gpu.
Examples (if relevant)
    def run_training(
        self, model_data: RasaModelData, label_ids: Optional[np.ndarray] = None
    ) -> None:
        """Feeds the featurized training data to the model.

        Args:
            model_data: Featurized training data.
            label_ids: Label ids corresponding to the data points in `model_data`.
                These may or may not be used by the function depending
                on how the policy is trained.
        """
        # os.environ.pop('TF_CONFIG', None)
        # tf_config = {
        #     'cluster': {
        #         'worker': ['localhost:12345', 'localhost:23456']
        #     },
        #     'task': {'type': 'worker', 'index': 0}
        # }
        # os.environ['TF_CONFIG'] = json.dumps(tf_config)
        # tf_config = json.loads(os.environ['TF_CONFIG'])
        # num_workers = len(tf_config['cluster']['worker'])
        if not self.finetune_mode:
            # This means the model wasn't loaded from a
            # previously trained model and hence needs
            # to be instantiated.
            self.model = self.model_class()(
                model_data.get_signature(),
                self.config,
                isinstance(self.featurizer, MaxHistoryTrackerFeaturizer),
                self._label_data,
                self._entity_tag_specs,
            )
            self.model.compile(
                optimizer=tf.keras.optimizers.Adam(self.config[LEARNING_RATE])
            )
            (
                data_generator,
                validation_data_generator,
            ) = rasa.utils.train_utils.create_data_generators(
                model_data,
                self.config[BATCH_SIZES],
                self.config[EPOCHS],
                self.config[BATCH_STRATEGY],
                self.config[EVAL_NUM_EXAMPLES],
                self.config[RANDOM_SEED],
            )
        callbacks = rasa.utils.train_utils.create_common_callbacks(
            self.config[EPOCHS],
            self.config[TENSORBOARD_LOG_DIR],
            self.config[TENSORBOARD_LOG_LEVEL],
            self.tmp_checkpoint_dir,
        )
        self.model.fit(
            data_generator,
            epochs=self.config[EPOCHS],
            validation_data=validation_data_generator,
            validation_freq=self.config[EVAL_NUM_EPOCHS],
            callbacks=callbacks,
            verbose=False,
            shuffle=False,  # we use custom shuffle inside data generator
        )

        global_batch_size = self.config[BATCH_SIZES]*2
        # tf.debugging.set_log_device_placement(True)
        gpus = tf.config.list_logical_devices('GPU')
        strategy = tf.distribute.MirroredStrategy(gpus)

        if not self.finetune_mode:
            # This means the model wasn't loaded from a
            # previously trained model and hence needs
            # to be instantiated.
            with strategy.scope():
                self.model = self.model_class()(
                    model_data.get_signature(),
                    self.config,
                    isinstance(self.featurizer, MaxHistoryTrackerFeaturizer),
                    self._label_data,
                    self._entity_tag_specs,
                )
                self.model.compile(
                    optimizer=tf.keras.optimizers.Adam(self.config[LEARNING_RATE])
                )

                (
                    data_generator,
                    validation_data_generator,
                ) = rasa.utils.train_utils.create_data_generators(
                    model_data,
                    global_batch_size,
                    self.config[EPOCHS],
                    self.config[BATCH_STRATEGY],
                    self.config[EVAL_NUM_EXAMPLES],
                    self.config[RANDOM_SEED],
                )
        callbacks = rasa.utils.train_utils.create_common_callbacks(
            self.config[EPOCHS],
            self.config[TENSORBOARD_LOG_DIR],
            self.config[TENSORBOARD_LOG_LEVEL],
            self.tmp_checkpoint_dir,
        )
        self.model.fit(
            data_generator,
            epochs=self.config[EPOCHS],
            validation_data=validation_data_generator,
            validation_freq=self.config[EVAL_NUM_EPOCHS],
            callbacks=callbacks,
            verbose=False,
            shuffle=False,  # we use custom shuffle inside data generator

The first run without mirrored strategy is okay but when running with mirrored strategy, there is a conflict in ted model. I can't figure out where is the cause of it (the distributed training makes it very hard to debug).
Is anything blocking this from being implemented? (if relevant)
and this log after running:
/root/rasa/rasa/shared/core/slot_mappings.py:216: UserWarning: Slot auto-fill has been removed in 3.0 and replaced with a new explicit mechanism to set slots. Please refer to https://rasa.com/docs/rasa/domain#slots to learn more.
  UserWarning,
/root/rasa/rasa/shared/core/slot_mappings.py:216: UserWarning: Slot auto-fill has been removed in 3.0 and replaced with a new explicit mechanism to set slots. Please refer to https://rasa.com/docs/rasa/domain#slots to learn more.
  UserWarning,
Processed story blocks: 100%|███| 13/13 [00:00<00:00, 1271.09it/s, # trackers=1]
Processed story blocks: 100%|███| 13/13 [00:00<00:00, 148.73it/s, # trackers=12]
Processed story blocks: 100%|████| 13/13 [00:00<00:00, 21.72it/s, # trackers=50]
Processed story blocks: 100%|████| 13/13 [00:00<00:00, 26.74it/s, # trackers=50]
Processed rules: 100%|███████████| 48/48 [00:00<00:00, 252.89it/s, # trackers=1]
/root/rasa/rasa/utils/train_utils.py:530: UserWarning: constrain_similarities is set to `False`. It is recommended to set it to `True` when using cross-entropy loss.
  category=UserWarning,
/root/rasa/rasa/shared/utils/io.py:99: UserWarning: 'evaluate_every_number_of_epochs=20' is greater than 'epochs=2'. No evaluation will occur.
Processed trackers: 100%|█████| 512/512 [00:00<00:00, 965.76it/s, # action=1635]
/root/rasa/rasa/utils/tensorflow/model_data_utils.py:384: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  np.array(values), number_of_dimensions=4
/root/rasa/rasa/utils/tensorflow/model_data_utils.py:400: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  MASK: [FeatureArray(np.array(attribute_masks), number_of_dimensions=3)]
2022-02-17 08:55:08.464804: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-02-17 08:55:09.599068: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 30652 MB memory:  -> device: 0, name: Tesla V100-SXM2-32GB, pci bus id: 0000:0a:00.0, compute capability: 7.0
2022-02-17 08:55:09.601503: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1510] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 30652 MB memory:  -> device: 1, name: Tesla V100-SXM2-32GB, pci bus id: 0000:85:00.0, compute capability: 7.0
/root/rasa/rasa/utils/tensorflow/model_data.py:750: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  np.concatenate(np.array(f)),
Epochs:   0%|                                             | 0/2 [00:00<?, ?it/s]2022-02-17 08:55:10.764997: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:185] None of the MLIR Optimization Passes are enabled (registered 2)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_1_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_1_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_1_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_2_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_2_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_2_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
Epochs:  50%|██▌  | 1/2 [00:33<00:33, 33.25s/it, t_loss=6, loss=5.72, acc=0.518]/root/rasa/rasa/utils/tensorflow/model_data.py:750: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  np.concatenate(np.array(f)),
Epochs: 100%|██| 2/2 [00:53<00:00, 26.99s/it, t_loss=5.44, loss=4.94, acc=0.921]
Epochs:   0%|                                             | 0/2 [00:00<?, ?it/s]WARNING:tensorflow:Using MirroredStrategy eagerly has significant overhead currently. We will be working on improving this in the future, but for now please wrap `call_for_each_replica` or `experimental_run` or `run` inside a tf.function to get the best performance.
2022-02-17 08:56:05.702741: W tensorflow/core/grappler/optimizers/data/auto_shard.cc:695] AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy because of the following reason: Did not find a shardable source, walked to a node which is not a dataset: name: "FlatMapDataset/_2"
op: "FlatMapDataset"
input: "TensorDataset/_1"
attr {
  key: "Targuments"
  value {
    list {
    }
  }
}
attr {
  key: "f"
  value {
    func {
      name: "__inference_Dataset_flat_map_flat_map_fn_21967"
    }
  }
}
attr {
  key: "output_shapes"
  value {
    list {
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
      shape {
        dim {
          size: -1
        }
      }
    }
  }
}
attr {
  key: "output_types"
  value {
    list {
      type: DT_FLOAT
      type: DT_INT64
      type: DT_FLOAT
      type: DT_INT64
      type: DT_FLOAT
      type: DT_FLOAT
      type: DT_INT64
      type: DT_FLOAT
      type: DT_INT64
      type: DT_FLOAT
      type: DT_FLOAT
      type: DT_INT64
      type: DT_FLOAT
      type: DT_INT64
    }
  }
}
. Consider either turning off auto-sharding or switching the auto_shard_policy to DATA to shard this dataset. You can do this by creating a new `tf.data.Options()` object then setting `options.experimental_distribute.auto_shard_policy = AutoShardPolicy.DATA` before applying the options object to the dataset via `dataset.with_options(options)`.
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_4_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_4_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_4_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_5_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_5_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_5_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/cond_6_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/cond_6_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/cond_6_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/replica_1/cond_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/replica_1/cond_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/replica_1/cond_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/replica_1/cond_1_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/replica_1/cond_1_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/replica_1/cond_1_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/framework/indexed_slices.py:449: UserWarning: Converting sparse IndexedSlices(IndexedSlices(indices=Tensor("gradients/replica_1/cond_2_grad/Identity_1:0", shape=(None,), dtype=int64), values=Tensor("gradients/replica_1/cond_2_grad/Identity:0", shape=(None,), dtype=float32), dense_shape=Tensor("gradients/replica_1/cond_2_grad/Identity_2:0", shape=(1,), dtype=int32))) to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "shape. This may consume a large amount of memory." % value)
Traceback (most recent call last):
  File "/root/rasa/rasa/engine/graph.py", line 467, in __call__
    output = self._fn(self._component, **run_kwargs)
  File "/root/rasa/rasa/core/policies/ted_policy.py", line 777, in train
    self.run_training(model_data, label_ids)
  File "/root/rasa/rasa/core/policies/ted_policy.py", line 740, in run_training
    shuffle=False,  # we use custom shuffle inside data generator
  File "/root/rasa/rasa/utils/tensorflow/temp_keras_modules.py", line 190, in fit
    tmp_logs = train_function(iterator)
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 885, in __call__
    result = self._call(*args, **kwds)
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 950, in _call
    return self._stateless_fn(*args, **kwds)
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 3040, in __call__
    filtered_flat_args, captured_inputs=graph_function.captured_inputs)  # pylint: disable=protected-access
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1964, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager))
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 596, in call
    ctx=ctx)
  File "/root/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
    inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 3 root error(s) found.
  (0) Invalid argument:  Dimensions [0,1) of indices[shape=[17,2]] must match dimensions [0,1) of updates[shape=[24,50]]
	 [[{{node cond_4/StatefulPartitionedCall/cond_4_20/then/_877/cond_4/ScatterNd}}]]
	 [[div_no_nan_1/ReadVariableOp/_892]]
  (1) Invalid argument:  Dimensions [0,1) of indices[shape=[17,2]] must match dimensions [0,1) of updates[shape=[24,50]]
	 [[{{node cond_4/StatefulPartitionedCall/cond_4_20/then/_877/cond_4/ScatterNd}}]]
  (2) Invalid argument:  Dimensions [0,1) of indices[shape=[17,2]] must match dimensions [0,1) of updates[shape=[24,50]]
	 [[{{node cond_4/StatefulPartitionedCall/cond_4_20/then/_877/cond_4/ScatterNd}}]]
	 [[update_0/AssignAddVariableOp/_845]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_52312]

Function call stack:
train_function -> train_function -> train_function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run.py", line 54, in <module>
    run(cmdline_arguments)
  File "/root/rasa/tools/controller.py", line 53, in run
    run_train_core(args)
  File "/root/rasa/tools/training_tools.py", line 90, in run_train_core
    finetuning_epoch_fraction=args.epoch_fraction,
  File "/root/rasa/rasa/model_training.py", line 346, in train_core
    **(additional_arguments or {}),
  File "/root/rasa/rasa/model_training.py", line 242, in _train_graph
    is_finetuning=is_finetuning,
  File "/root/rasa/rasa/engine/training/graph_trainer.py", line 108, in train
    graph_runner.run(inputs={PLACEHOLDER_IMPORTER: importer})
  File "/root/rasa/rasa/engine/runner/dask.py", line 106, in run
    dask_result = dask.get(run_graph, run_targets)
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 558, in get_sync
    **kwargs,
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 496, in get_async
    for key, res_info, failed in queue_get(queue).result():
  File "/root/miniconda3/lib/python3.7/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/root/miniconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 538, in submit
    fut.set_result(fn(*args, **kwargs))
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 234, in batch_execute_tasks
    return [execute_task(*a) for a in it]
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 234, in <listcomp>
    return [execute_task(*a) for a in it]
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 225, in execute_task
    result = pack_exception(e, dumps)
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/local.py", line 220, in execute_task
    result = _execute_task(task, data)
  File "/root/rasa/.venv/lib/python3.7/site-packages/dask/core.py", line 119, in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
  File "/root/rasa/rasa/engine/graph.py", line 476, in __call__
    ) from e
rasa.engine.exceptions.GraphComponentException: Error running graph component for node train_TEDPolicy2.
Epochs:   0%|                                             | 0/2 [00:23<?, ?it/s]
2022-02-17 08:56:29.372037: W tensorflow/core/kernels/data/generator_dataset_op.cc:107] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated.
	 [[{{node PyFunc}}]]

Definition of Done
I really need help  from anybody who is familiar with Ted model and distributed training to fix this bug. much appreciated!

Thanks for submitting this feature request 🚀 @koaning will get back to you about it soon! ✨

Hello, can anyone help me?


Send SIGTERM before send SIGKILL

It would be great to have a SIGTERM signal before being killed, this could allow test program that want test signal handling, a fair delay between the two signal could be 1 seconde. SIGTERM is often used to allow such gracefully termination for example in docker. Example of program that test signal handling playground:
use core::time::Duration;

use tokio::{
    select,
    signal::unix::{signal, SignalKind},
    sync::watch,
    time::sleep,
};

#[tokio::main]
async fn main() {
    let (stop_tx, mut stop_rx) = watch::channel(());

    tokio::spawn(async move {
        let mut sigterm = signal(SignalKind::terminate()).unwrap();
        let mut sigint = signal(SignalKind::interrupt()).unwrap();
        loop {
            select! {
                _ = sigterm.recv() => {},
                _ = sigint.recv() => {},
            };
            stop_tx.send(()).unwrap();
        }
    });

    loop {
        select! {
            biased;

            _ = stop_rx.changed() => break,
            i = some_operation(42) => { println!("Recieve {i}")},
        }
    }
}

async fn some_operation(i: u64) -> u64 {
    println!("Task started.");
    sleep(Duration::from_millis(i)).await;
    println!("Task shutting down.");
    i
}

quick solution use unsafe { libc::raise(libc::SIGTERM)}; for testing purpose. Unpractical but work.


Fix react-refresh transform

Change the transform call from with .js suffix into with .jsx in order to ensure the useReactRefresh flag in the React plugin
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/src/index.ts#L184

Thanks for your contribution, but the plugin you linked to is not the one that this MDX plugin is using, it's referring to @vitejs/plugin-react-refresh, so I don't think that modifying the id extension would make a difference.
If you're using this plugin with the latest version of the React Vite plugin, it's possible that you're also using a modern Vite version that this plugin doesn't support. The maximum supported version of @vitejs/plugin-react is v1.3.2 because vite-plugin-mdx supports up to Vite v2.
The ecosystem has already progressed so far past this plugin, is there anything stopping you from using @mdx-js/rollup? @vitejs/plugin-react even has an example with MDX.

the plugin you linked to is not the one that this MDX plugin is using, it's referring to @vitejs/plugin-react-refresh, so I don't think that modifying the id extension would make a difference.

My bad, it's also taking the React plugin into account as well, apparently, but if you're using the correct version of @vitejs/plugin-react then it's also using imports to React to detect JSX, it's not only using the extension.
The change in this PR looks safe enough, I just need to find a way to verify whether it fixes a problem, feel free to lend me a hand by providing some context about the problem you were facing.
But I'd still like to know if you need to use vite-plugin-mdx over @mdx-js/rollup.

Published in v3.6.1 🚀  Thank you!


TestNet Crash 07/02

Tried launching a TestNet right now and am getting this crash log:
💀 Coda's Daemon Crashed. The Coda Protocol developers would like to know why!

  Please:
    Open an issue:
      https://github.com/CodaProtocol/coda/issues/new

    Tell us what you were doing, and paste the last 20 lines of log messages.
    And then paste the following:

    (monitor.ml.Error (B58.Alphabet.Invalid_base58_character)
  ("Raised at file \"lib/read.mll\", line 712, characters 13-36"
    "Called from file \"lib/read.mll\", line 241, characters 23-47"
    "Caught by monitor coda"))

cc @jkrauska @psteckler @bkase

@Schmavery and I have tracked it down to the pk formatting by running this command:
coda client dump-keypair -privkey-path testkeys/high0

which results in the following output:
Error: (B58.Alphabet.Invalid_base58_character)

What's the text in testkeys/high0 ?

@psteckler https://github.com/CodaProtocol/coda-automation/blob/master/ansible/testkeys/high0

Yes, the ciphertext field there contains text that is not base58. Can those testkeys be regenerated?

I'll look into it.

Regerated the keys in https://github.com/CodaProtocol/coda-automation/pull/47/, closing.


web-ui: codecov integration, adjust codecov upload command

web-ui: codecov integration, adjust codecov upload command.
NOTE: @fmueller we should delete and recreate the project @ http://codecov.io and then maybe codecov will just consider webui reports.

Codecov Report

Merging #246 into master will decrease coverage by 18.5%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master     #246       +/-   ##
=============================================
- Coverage     78.36%   59.86%   -18.51%
=============================================
  Files            90       24       -66
  Lines          1840      289     -1551
  Branches        293        9      -284
=============================================
- Hits           1442      173     -1269
+ Misses          318      116      -202
+ Partials         80        0       -80

Flag
Coverage Δ
Complexity Δ

#webui
59.86% <ø> (-18.51%)
0 <ø> (-597)

Impacted Files
Coverage Δ
Complexity Δ

...n/java/de/zalando/zally/rules/AvoidSynonymsRule.kt

...src/main/java/de/zalando/zally/utils/WordUtil.java

...o/zally/rules/EverySecondPathLevelParameterRule.kt

...de/zalando/zally/cli/api/SpecsWrapperStrategy.java

...ndo/zally/rules/NestedPathsCouldBeRootPathsRule.kt

.../de/zalando/zally/rules/SnakeCaseInPropNameRule.kt

...n/java/de/zalando/zally/cli/reader/YamlReader.java

...ain/java/de/zalando/zally/ApiDefinitionReader.java

...r/src/main/java/de/zalando/zally/GithubClient.java

...ain/java/de/zalando/zally/rules/HttpHeadersRule.kt

... and 56 more

Continue to review full report at Codecov.

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

👍

👍

Codecov Report

Merging #246 into master will decrease coverage by 20.35%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master     #246       +/-   ##
=============================================
- Coverage     78.23%   57.87%   -20.36%
=============================================
  Files            90       24       -66
  Lines          1824      273     -1551
  Branches        293        9      -284
=============================================
- Hits           1427      158     -1269
+ Misses          317      115      -202
+ Partials         80        0       -80

Flag
Coverage Δ
Complexity Δ

#webui
57.87% <ø> (-20.36%)
0 <ø> (-597)

Impacted Files
Coverage Δ
Complexity Δ

...n/java/de/zalando/zally/cli/reader/YamlReader.java

...va/de/zalando/zally/rules/DefineOAuthScopesRule.kt

...rc/main/java/de/zalando/zally/utils/SwaggerUtil.kt

...n/java/de/zalando/zally/cli/reader/JsonReader.java

...de/zalando/zally/rules/AvoidTrailingSlashesRule.kt

...e/zalando/zally/cli/api/RequestWrapperFactory.java

...ain/java/de/zalando/zally/ApiDefinitionReader.java

...er/src/main/java/de/zalando/zally/Application.java

...a/de/zalando/zally/cli/domain/ViolationsCount.java

...alando/zally/configuration/OAuthConfiguration.java

... and 56 more

Continue to review full report at Codecov.

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


'resizable' and 'show_titlebar' options

This PR solves #427 for linux only. I created the needed functions on windows and mac too, but they are not used in the 'build' function, so for now they do nothing.

CI looks good, anything else you want me to look at?


Instance does not shut down after commands exit

Call ShutdownListener::publish in CoreLauncher's currently empty exit method. This will notify the ConsoleLogger to shut down its thread and the application shoild exit.
Verify that the shutdown hook still works and that exit messages are logged.

Fixed in 45e82e8b1091851c274299652f22ad4e1a6f6a14.


Optional character

There is a way to use a optional char?
Example:
<MaskInput mask="(99) 9999-9999[9]" />
or
<MaskInput mask="(99) 9999-9999{9}" />
or
<MaskInput mask="(99) 9999-99999?" />
Thanks!

Don't understand. How should optional char act?

Por exemplo, aqui no Brasil, alguns Estados tem o número de telefone com um dígito a mais. Enquanto alguns tem 8 dígitos, outros tem 9 dígitos.

Hi @sanniassin, any progress?
Thanks! :)

@CezarLuiz0 Pretty busy right now, so this project temporarily abandoned :)

Can I fork this project and send pull requests with new features?
Thanks!

Sure, but i will not be able to review and test PR for a while.

Hi guys! Is there any progress on this feature?

Can do it for 100$ )

Ok, please do it then)

Just use such configuration:
<Input
  mask="(99) 9999-99999?"
  defaultValue="1234"
  formatChars={
    "9": "[0-9]",
    "?": "[0-9]"
  }
 />

Thank you!)

Guys, is this issue solved?

Not yet :/

Does not last solution fit?

Hey guys, how is this issue?

Does anyone has a solution to have a formatted input for currencies, like USD 1,000?

There is Intl standard. You can use react Intl as well

Sure, but the difficult part is to have an <input> that auto-format the number as the user types it. Like autoNumeric in the jQuery world.

@mquandalle I use http://numeraljs.com/ for this solving this task

Hi guys,
I had the same problem with the different formatted phone numbers. I solved using the masks like this:
<InputElement mask="(99) 9999tt999?" formatChars={{"9": "[0-9]", "t": "[0-9\-]", "?": "[0-9 ]"}} maskChar=" " />

Great solution, @alymenbr!
But i don't think that the issue is solved, because all this solutions are just "work arounds" for a feature that does no exists.

For controlled inputs:
handlerChangeBrazilianPhone = (ev) => {
  const brazilianPhone = ev.target.value.replace(/[^0-9]+/g, '')
  this.setState({ brazilianPhone })
}
...
mask={this.state.brazilianPhone.length <= 10 ? '(99) 9999-9999?' : '(99) 99999-9999'}
formatChars={{ 9: '[0-9]', '?': '[0-9 ]' }}
onChange={this.handlerChangeBrazilianPhone}
value={this.state.brazilianPhone}

is there a way to achieve this inputmask("9{2,3}/9{2,3}").inputmask("option", {tabThrough: true}) using input mask in react?
I am looking to use a mask where i can enter 2 or 3 numbers before / if i enter 2 and press tab it should take me to the second portion after /.
Any help is highly appreciated.

hi i  want react mask for values 1 to 100
i am using "99%" mask but its not taking the 100 value i want to include the 100 max value also

import React, { useState } from 'react';
import InputMask from 'react-input-mask';
import { trim, size } from 'lodash';

const PhoneInput = ({ className, ...props }) => {
  const [mask, setMask] = useState('(99) 99999-9999');

  return (
    <InputMask
      {...props}
      mask={mask}
      onBlur={e => {
        if (size(trim(e.target.value, '_')) === 14) {
          setMask('(99) 9999-9999');
        }
      }}
      onFocus={e => {
        if (size(trim(e.target.value, '_')) === 14) {
          setMask('(99) 99999-9999');
        }
      }}
    >
      {inputProps => (<input {...inputProps} type="tel" />)}
    </InputMask>
  );
};

to whoever fall here searching for an react-number-format solution
          const s = values.phone
            .split(" ")
            .join("")
            .split(")")
            .join("")
            .split("(")
            .join("")
            .split("-")
            .join("")
            .split("_")
            .join("")

format={s.length < 11 ? "(##) ####-#####" : "(##) #####-####"}
mask={s.length < 10 ? "_" : ""}

I did like this
with: react-input-mask: ^2.0.4
import React from "react";
import InputMask, { InputState } from "react-input-mask";
import { TextField } from "@material-ui/core";

function Test() {
  const beforeMaskedValueChange = (newState: InputState) => {
    let { value } = newState;

    const newValue = value.replace(/\D/g, "");
    if (newValue.length === 11) {
      value = newValue.replace(/^(\d{2})(\d{5})(\d{4})$/, "($1) $2-$3");
    }

    return {
      ...newState,
      value
    };
  };

  return (
    <>
      <InputMask mask="(99) 9999-99999" maskChar={null} beforeMaskedValueChange={beforeMaskedValueChange}>
        {(props: any) => <TextField {...props} fullWidth label="Phone" id="phone" name="phone" />}
      </InputMask>
    </>
  );
};

perfect, @hugosbg 👌
thank you.

`
const phoneMask = '+55 (99) 9999-9999';
const celphoneMask = '+55 (99) 99999-9999';
const [mask, setMask] = useState(phoneMask);
const changeMask = (e) => {
if (/^+([0-9]+) (([0-9]+)) 9/.test(e.target.value)) {
if (mask !== celphoneMask) {
setMask(celphoneMask);
}
}
else if (mask != phoneMask) {
setMask(phoneMask);
}
}

`

I made it work on version 3, alpha 2. I'm using material UI and typescript. For anyone interested.
https://codesandbox.io/s/confident-bird-fek84?fontsize=14&hidenavigation=1&theme=dark

No meu caso funcionou da seguinte maneira:
mask={     formik.values.phone.length > 14       ? '(99) 99999-9999'       : '(99) 9999-99999' }
espero que ajude 🙏

No meu caso funcionou da seguinte maneira:
mask={     formik.values.phone.length > 14       ? '(99) 99999-9999'       : '(99) 9999-99999' }
espero que ajude 🙏

Deu certo assim aqui
<TextField 									error={touched.number && Boolean(errors.number)} 									helperText={touched.number && errors.number} 									label={i18n.t("contactModal.form.number")} 									name="number" 									variant="outlined" 									margin="dense" 									onKeyUp={e => { 										if (e.target.value.replace(/\D/g, "").length === 10) { 											let x = e.target.value.replace(/\D/g, "").match(/(\d{0,2})(\d{0,4})(\d{0,4})/); 											e.target.value = !x[2] ? x[1] : "(" + x[1] + ") " + x[2] + (x[3] ? "-" + x[3] : ""); 										} else { 											let x = e.target.value.replace(/\D/g, "").match(/(\d{0,2})(\d{0,1})(\d{0,4})(\d{0,4})/); 											e.target.value = !x[2] ? x[1] : "(" + x[1] + ") " + x[2] + " " + x[3] + (x[4] ? "-" + x[4] : ""); 										} 									}}								 								/>

Hi guys, I used InputMask from react-input-mask and TextField from @material-ui/core and it works that way:
const [inputTextData, setInputTextData] = useState({
    celular: '',
});`

const handleInputTextChange = (event) => {
    const { name, value } = event.target;

    setInputTextData({...inputTextData, [name]: value});
}

<InputMask
    mask={inputTextData.celular.length > 14 ? "(99) 99999-9999" : "(99) 9999-99999"}
    maskChar=""
    value={inputTextData.celular}
    onChange={handleInputTextChange}
>
    {() => (
        <TextField
            variant="outlined"
            type="tel"
            label="Celular"
            name="celular"
        />
      )}
</InputMask>

Attention to the second condition on prop mask. It must be have 15 characters to can pass to the first condition.

mask={watch('phone')!.charAt(5) === '9' ? '(99) 9 9999-9999' : '(99) 9999-9999'}
doesn't this work too?
(using with react-hook-form)

Have done. Just use this configuration:
<Input
  mask="(99) 9999-99999?"
  formatChars={
    "9": "[0-9]",
    "?": "[0-9]"
  }
 />

This solution does not solve the issue.
Unfortunately the presented mask is not correct, because is the first digit after the area code that should be optional.
Also, the five digit sequence is bad for reading.
A good solution would be using for instance "9" for mandatory positions and "0" for optional positions or vice versa like this:
"(99) 0 9999-9999", with the empty mask like this "(__) _ -"
The spaces around the optional digit should make the value easyer to read.
This package seems to be dead, will search for other options


Fix offerings

Changes
removed from as required arg for tbdex.CreateOffering
offering.Metadata.From is set as a byproduct of calling Sign since Sign takes a bearerDID

set protocol when creating offering
option existed but wasn't being set on the actual offering

going to go ahead and merge.


cout>> error

Someone made error in the code.
This the link: https://github.com/Nivedita967/Data-Structure-and-Algorithms/blob/main/Codechef/Number Mirror/Number Mirror.cpp
This is the image

I want to correct it.

@kavania2002 Sure.


Can't use versions after 1.4.1 with Qt QML

I've been using Sugar with Qt's QML for a long time, and it's been very useful. However, I've noticed that upgrading to a newer version won't be possible out-of-the-box, due to the following change:
// The global context
var globalContext = typeof global !== 'undefined' ? global : window;

which raises ReferenceError: window is not defined, since there is no window in QML's JavaScript. I can fix it manually but I just wanted to raise awareness for another platform where Sugar's been used extensively, so that it can be taken into consideration for future changes.

I've tried patching this manually but couldn't succeed, I'll describe my attempts here.
The obvious first step was to change window to this, since that's how it was in the version that works. However, that triggers sugar_patched.js:74: TypeError: Cannot assign to read-only property "Sugar" (offending line is globalContext.Sugar = Sugar;).
Then I tried juggling around, making window an empty object, copying over properties instead of re-assigning etc. but most I could do is get rid of the errors but have Sugar functionality inaccessible (e.g. no create function on Date).
If you get around to doing anything about this, you might find this QML issue relevant. Also, not specific to this issue, but in actual use we prepend the QML-specific .pragma library (docs) at the top of the file as an optimization - just something to be aware of, in case it changes how the code behaves.

Might be relevant: https://github.com/moment/moment/issues/2031

OK, looking into it now... although this was asked in the moment thread, do you have a simple command line workflow to test the environment out? Ideally one that doesn't need me to install 12GB on my machine?

I'm not sure how up-to-date the distro packages are, I've always installed by downloading one of the "offline" Qt installations, that should be pretty straightforward (should work out of the box, no dependencies AFAIK), and significantly less than 12GB :stuck_out_tongue_closed_eyes:.
Then you can create a qml file, e.g. Test.qml:
import QtQuick 2.5
import "sugar.js" as Sugar

Item {
    Component.onCompleted: {
        var r = Date.range(Date.create("26 May 22:00"), Date.create("27 May 04:00"));
        console.log(r.every("30 minutes"));
    }
}

in the same directory where you have a "sugar.js" file, and try running:
qmlscene Test.qml

(qmlscene binary can be found in e.g. .../Qt/Qt5.5.1/5.5/<compiler>/bin)

OK, managed to get up and running and hacked around to get Sugar loaded but it takes a bit of work.
First, I would like to know if there is any way whatsoever to reference the global context in QML. This is the optimal solution as Sugar goes through this when it accesses natives. The main reason for this right now is essentially Sinon, which hijacks the global "Date" object for testing purposes, and I want to support this (plus other similar unavoidable global hijacks). That said, I did get the script up and running by holding onto native objects by name as a fallback, which may also work.
Another reason for wanting the global context is to assign the Sugar value to it, however I understand that QML has a different module import system. One possible solution to this is to create a "QML" build, which simply exports a "Sugar" token like this:
``
var Sugar = (function () {
// Main code + init stuff
}).call(this);

This way it can be used as `Sugar.Sugar` when requiring. It might even be OK to update the current development build with this (right now it's just the closure) as long as it wouldn't have any negative side effects. One question: would potential QML users need a minified build or is the non-minified source code enough?

At any rate, If you can help me find out any way to reference the global, I can have a look at providing support for this.

I'm not that familiar with JavaScript (or QML's JavaScript) internals and terminology, but I guess this gives you the as-global-as-it-gets object, with the caveat that it's read-only, as far as I saw. It seems like it's the global you want - I've tried importing just in a nested child QML component and that makes Sugar functionality available in the parent (which didn't have the import), and vice versa. Note that the example QML that I gave is valid code which works fine with 1.4.1 - Date has create and range, so if a fallback can be elegantly plugged in to make it behave as it did back then, that's perfectly fine by me.
As far as assigning Sugar to global goes, in QML everything that's in the js file is available on the alias you give when importing, so import "../lib/my_file.js" as AnyName will expose all members in my_file.js to be accessed via AnyName.member, if that makes any difference for what you need to do.
I've been using minified version for the last 2 years but only because that's what "Download" button pointed to and I never had to go into source until yesterday. I'd assume it's irrelevant for QML users since it'll be bundled with the app which is huge anyway.

It seems like it's the global you want

It's unfortunately not, as it doesn't have any of the built-in classes on it, for example this.Date, which is what I need...

So, if we assume that the global reference doesn't exist (which it doesn't seem to), and also given your last 2 points, I think the best solution is to update the code to use built-ins by name Date etc, when a reference to the global scope isn't available, then have a qml gulp task that essentially creates a non-minified build with a single var Sugar = ... token output that can then be accessed as Sugar.Sugar. What do you think?

That sounds good, however just to be sure - I never had the need to access anything via Sugar. (that as Sugar in import statement is just because QML requires an alias to be there, it remains unused), I hope that what you're suggesting doesn't mean one would have to now type Sugar.Date.create(...), since that would suck.

OK sorry it seems I was wrong above, the this object in fact is a global reference (I was testing the onCompleted block previously, which appears to be different), however you're right that it's read only, so I can't expose the Sugar global that way.

however just to be sure - I never had the need to access anything via Sugar.

Sorry, I think most of the above statements are confusing because of something I should have clarified earlier. I've been talking about 2.0.0, which is about to be released and functions differently in that it exposes a single Sugar global object. You will have to then call Sugar.extend to extend the prototypes yourself. Think of this as a one-time init.
The problem you were having previously was because 1.4.1 asks for window, which doesn't exist in QML. 2.0.0 actually fixes this by referring to this instead, (which as mentioned above is in fact the read-only global object), however fails when trying to write to the global. This could be wrapped in a try/catch block so that line doesn't error out, however in order to use 2.0.0 properly you will need to access the Sugar object, which can't be exported to the global since it's read only. Instead, from what I've found, a single var Sugar =  will  have to be wrapped around the file to follow QML conventions. Then you will have to access that object with Sugar.Sugar. The export keyword could be anything... for example it could be Sugar.foo, however I can't see any way getting around needing something as there doesn't seem to be an equivalent in QML to module.exports =  in commonjs, so Sugar.Sugar probably makes the most sense.

I hope that what you're suggesting doesn't mean one would now have to type Sugar.Date.create(...)

Well in fact that's exactly how accessing the global would work, except it would require one more Sugar, so it would in fact be Sugar.Sugar.Date.create. Of course you could easily alias with Sugar = Sugar.Sugar. But don't worry, I know you're more interested in the native extension anyway, so basically all this means is that you will have to call Sugar.Sugar.extend() once, then you will be able to access Date.create as usual. I've already tested this out and it does seem to work.
So basically what I need to do is wrap the global write in a try/catch block, and also write a QML specific wrapper to export the global, which it seems to make sense to me should be a gulp task.

That sounds great. Thanks for finding the solution this quickly!
While you're messing with it, make sure to check if adding .pragma library at the top of the sugar.js file breaks anything. It can be left out from the build, of course.
I wasn't taking 2.0.0 into consideration for upgrading, as I didn't know what shape it's in. Do you suggest upgrading straight to 2.0.0, 1.5.0 or something else? As long as it's considered tested and stable, I'm fine with any (actually all this was summoned by a bug that I encountered in the version I'm currently using, which seems fixed in the meantime).

So I added .pragma library to the top, and it didn't seem to have any side effects, but I'm not 100% sure what it's doing, so I'm not sure what to expect. Seems OK though.
2.0.0 is very close to release (I've said this before on other issues, but I actually mean it this time... talking weeks here), so I suggest waiting if possible. To recap about what I'm doing, essentially what was happening before was this:
(function () {
  // Get the global context
  var context = typeof global !== 'undefined' ? global : this;
  var Sugar = function () { // lots of stuff here... };
  context['Sugar'] = Sugar;
})();

I am going to update to do this:
(function () {
  var context = typeof global !== 'undefined' ? global : this;
  var Sugar = function () { // lots of stuff here... };
  try {
    context['Sugar'] = Sugar;
  } catch(e) {
    // Global may be read-only
  }
})();

Then add a QML task that will wrap the above and output this:
.pragma library
var Sugar = (function () {
  var context = typeof global !== 'undefined' ? global : this;
  var Sugar = function () { // lots of stuff here... };
  try {
    context['Sugar'] = Sugar;
  } catch(e) {
    // Global may be read-only
  }
  return Sugar;
})();

This seems to do the trick. Sound good?

OK that was relatively straightforward. Try pulling the qml branch and running gulp build:qml (probably will have to do npm install). Will output sugar.js by default. Works for me with the following code:
import QtQuick 2.5
import "sugar.js" as Sugar

Item {
    Component.onCompleted: {
        Sugar.Sugar.extend();
        var r = Date.range(Date.create("26 May 22:00"), Date.create("27 May 04:00"));
        console.log(r.every("30 minutes"));
    }
}

Sounds great! I will try it out later on our QML project and report back.

Seems to be working great! (well, almost - I've encountered one error so far, I've reported it separately in #541).


Prioritize targeting new bases in visible range

This change makes the ion cannons target new bases in the always visible radar range before choosing long range targets.

Looking good! Do you have any further changes you'd like to make, or are you satisfied with things as they stand?

I think it's ready to go, targeting seems to work as expected now.


[FRONTEND][ONNX] Attribute based weight Initialization

Hi,
I'm trying to import ONNX models from CNTK-2.5 into nnvm. Even the simplest 1 layer network throws an exception "NotImplementedError: Filed t is not supported in nnvm" on
onnx_model = onnx.load('test.onnx')
sym, params = nnvm.frontend.from_onnx(onnx_model)
When trying to find a solution/work-around, I found the following CNTK issue, https://github.com/Microsoft/CNTK/issues/2825, mentioning that CNTK does not store its values in initializers, but in attributes. Apparently the ONNX standard allows both methods.
Is this the reason for the import failure? If so, can you recommend a workaround and/or conversion tool to import CNTK ONNX models into nnvm?
Thanks in advance for your help.
-Harry

Try put Field t's value in attrs[a.name].

if it is an actionable item, please open an issue in TVM repo


Add middleman; use Travis to test builds

Good suggestions, thanks! I'll make the .ruby-version change now, but I'll wait to revisit how we test until we've got the build and deploy factored in.


Update Build and Release workflow

Update Build and Release workflow for Windows, Linux and MacOS

Reference: release workflow from https://github.com/modmopet/modmopet (Thank you original author!)
Known issue:

workflow artifacts will need to be extracted twice. The first archive created by workflow is required to preserve the execution permission. The artifacts for workflow upload process will automatically create another archive outside it during the upload process. This won't cause any problem for release workflow.
Windows build have chance to fail fail attempt | success attempt, manually rerun the job if it fails.

Since gitHub currently does not offer Apple Silicon macOS runners, I'll build macOS Universal apps on my local machine for now. Maybe remove all macOS-related workflow?

The app build by the workflow on intel machine also seems to be universal, you can verify it yourself. Anyway, you can always change the release artifacts manually


adapty appsflyer integration not working

Hello Adapty! we integrated a service 2 months ago and added AppsFlyer as integration. However, the event list is empty!
Adapty package has only updateAttribution and we provided it like this:
appsflyer.appOpenAttributionStream.listen((event) async {       logInitialSource(event);       Adapty.updateAttribution(event,           source: AdaptyAttributionNetwork.appsflyer,           networkUserId: await appsflyer.getAppsFlyerUID());     });
But the list is empty, and your docs says that there should be events

here https://docs.adapty.io/docs/event-feed you show logging subscriptions to appsflyer

Help please!

any news?

Hey, sorry for long response.
We'll take a look and get back to you.

@Horum-dev it's easier and faster to use Intercom for such support cases like you have.
But in general, you only need to properly collect attribution. Here is an example of how to obtain it:
@override
Future<bool> initialize() async {
	appsflyerSdk.onInstallConversionData((data) {
		return _applyConversionData(data);
    });

    await appsflyerSdk.initSdk(
	    registerConversionDataCallback: true,
	    registerOnAppOpenAttributionCallback: true,
	    registerOnDeepLinkingCallback: true
	);

	return Future<bool>.value(true);
}

@Horum-dev it's easier and faster to use Intercom for such support cases like you have.
But in general, you only need to properly collect attribution. Here is an example of how to obtain it:
@override
Future<bool> initialize() async {
    appsflyerSdk.onInstallConversionData((data) {
        return _applyConversionData(data);
    });

    await appsflyerSdk.initSdk(
	registerConversionDataCallback: true,
	registerOnAppOpenAttributionCallback: true,
	registerOnDeepLinkingCallback: true
    );

    return Future<bool>.value(true);
}

doing the same thing, not working.

Can you send a samples of attribution you receiving from AppsFlyer?
And one more time – for such cases it's better to ask support directly through website Intercom.