Event Based Time Series

Proposing a new class for Traces EventSeries for handling data that is a series of timestamps denoting the occurrence of discrete events. For example this collection of 311 requests in Chicago, where each record is a request that has a timestamp for when it was opened and when it was closed. This is a fit for Traces because it is another example of unevenly-spaced time series and can use traces.TimeSeries for certain calculations
An example of how the API might look
df = pd.read_csv('311_Service_Requests.csv',nrows=10000)
creation = EventSeries(df['CREATED_DATE'].dropna())
completion = EventSeries(df['CLOSED_DATE'].dropna())

Event series could tell you the amount of events that occured between two arbitrary timestamps
>>> creation.events_between(pd.Timestamp('2018-01-01'),pd.Timestamp('2019-02-01'))
6681

EventSeries would also have a cumulative sum function which returns a TimeSeries of the cumulative number of events that have occured since the first record
>>>ts = creation.cumsum()
>>>ts.plot()

For events that have a "open" and "close" time stamp, EventSeries can calculate the number of active open cases
>>>diff = EventSeries.count_active(creation, completion)
>>>diff.plot()

Finally, EventSeries can calculate the inter-event arrival times and create visualizations for analysis
>>>after = creation.time_lag(how='after')
>>>creation.plot_time_lag(how='after')

I am already working on implementing this, but I would appreciate feedback and suggestions on API or features. Particularly interested if this can be extended to support the use case outlined in this issue https://github.com/datascopeanalytics/traces/issues/227

This looks very useful, although I wonder if EventSeries could just a special case of TimeSeries.
Using your example, each service request might be represented as a TimeSeries with two points.
service_call_event = traces.TimeSeries(default=0)
service_call_event[pd.Timestamp('2019-07-17 11:56:40')] = 1
service_call_event[pd.Timestamp('2019-07-30 13:14:54')] = 0

Suppose if you have the list of all service calls in a list named service_call_list where each event is a TimeSeries with 2 points, then your cumsum function might be the same as a merge operation:
active_events = traces.TimeSeries.merge(service_call_list, operation=sum)
All that said, I guess that this way of processing the data would be far less efficient than your method.
I have a device that flashes according to a timetable. It reports a "commencement" event when it starts flashing and a "cessation" event where it stops. I'm looking into a method to represent the state on a timeline by creating a TimeSeries for that state and adding a value of 1 for each commencement and a value of 0 for each cessation.
I'm also trying to represent the device's timetable as a time series for the desired state, with a value for 1 for when it should start flashing and 0 for when it should stop flashing. With this method I can use a xor operation to generate a plottable time series of all the times that the desired state didn't equal the actual state.
I like your time_lag function because I want to work out the total amount of time that my actual flashing state didn't match with the desired state. However, now that I have a TimeSeries where y=1 for any time that the actual state didn't match the desired state, maybe that function can be performed by existing operation as well. @devs, Histogram.total() calculate the area under the curve?

You are correct that you could represent this as a TimeSeries, and in fact, that was my first approach to modeling this kind of data. It's just slow because traces.TimeSeries.merge iterates through the entire SortedDict on every insertion.

Ah. Understood.
I feel like event_series is just a list of events, rather than something that fits into the library.
A faster way to build a timeseries could be
ts = traces.TimeSeries(default:0)
for row in df:
    ts[df['CREATED_DATE'].dropna()] = 1
    ts[df['CLOSED_DATE'].dropna()] = -1

A cumulative sum function could be an awesome addition to the api
cumsum_trace = traces.TimeSeries(default:0)
cumsum = 0
for k, v in ts.items():
    cum_sum += v
    cumsum_trace[k] = cumsum

As for feature requests, it could be cool if there was a function get_events(self, start_signal, end_signal) that returned a list of "events". Given key, value pairs in a time series, each event will have a start (key when value == start_signal) and an end (key when value == end_signal).

I think the code above is bad.
The more I think about it though, the more I think being able to convert a time series into a list of events.
Another function prototype suggestion might be get_events(self, start_signal, end_signal, match_criteria), where match criteria can be a function to determine if two items in a time series should be grouped into a single event.

I think that EventSeries fits in with Traces because it tries to follow a similar design and API to TimeSeries. There are obviously many ways to accomplish this, but I often found myself frustrated trying to accomplish this with pure pandas, and unable to do a lot of the things I wanted to with TimeSeries.
The main difference is that TimeSeries are designed around a model of an irregularly sampled continuous signal. I'm not sure what physical quantity a cumulative sum function would correspond to for a general TimeSeries.
Could you explain the get_events(self, start_signal, end_signal) request a bit more?

I think it could be nice to have a function that transforms a timeseries into a list of periods (each with a start and end time or a start time and duration) based on the values.
You can then answer questions like "provide a list of periods where a light was switched on" or, using the shopping cart example from the docs, "provide a list of periods where the user had apples in their cart".
start_signal and end_signal could be functions so that it works on non-numeric traces.

Hey @nsteins, coming here from #227. Are you working on this? The feedback was short but I think this would be a great addition to the library, as an EventSeries equally falls into the task traces tries to solve: Handling time series. The fact that there are these two main classes makes EventSeries quite logical.
@stringertheory came to the same conclusion in #227
Any timeline for this or questions you still want to discuss? I guess that would be easiest managed in a preliminary PR.


Typo in Citation 7 under Table

[Enter feedback here]
7 Teams honors the Outlook on the web mailbox policy setting that's configured by tenant admins to control whether users can change their profile picture. If the -SetPhotoEnabled setting is turned off in the policy, users cannot add, change, or remove their profile picture, so the porfile picture wont be synced to teams if the admin changes the photo.
Should be "profile" towards the bottom.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8456689d-6f04-fa5e-4f51-f413cb0b9d89
Version Independent ID: e9b85126-0db7-4378-ad44-514e52f9fde1
Content: How Exchange and Microsoft Teams interact - Microsoft Teams
Content Source: Teams/Exchange-Teams-interact.md
Service: msteams
GitHub Login: @dstrome
Microsoft Alias: dstrome

@Reveiller Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


Implement a service to enable large scale analysis of source data

Prototype done, production version next quarter.


Refactor the messy stuff

Make sure things are consistent, and add comments when necessary.

https://github.com/cadejscroggins/omgcatz/commit/4a63f4bd6765159374916b18cc5ef15562e7f30a


2 character sequence now working

Here is my issue. I have a single key binding (down) to handle when I am manuevering through a list.
I also have set up a key sequence 'd c' to handle whenever i'm ready to delete something (stands for 'delete card' - but not important.
From my understanding on the documentation - the only way 'd c' would be fired is if those two keys were pressed simultaneously. However, I have found, if I type 'd', 'down', 'c' - my down sequence is in fact performed and the 'd c' events will still fire. 'd c' should not have fired since a down was thrown in the middle.
Any ideas?

d c would be considered a sequence and would fire when you press one after the other.  The only keys that work if you press them at the same time is modifier keys + regular keys written as ctrl+s or something like that.  Can you provide code examples of what specifically is not working?

I have a same issue, too. I set up a key sequence 'shift shift' . I want to fire event only sequence 'shift shift', but when I keypress 'shift anykey shift', It also fired.

Not sure if my issue will share the solution with the other issues here, but here it is.
The app is heavy on shortcuts. "m" is taken for a navigation, "s" is taken for subnavigation (that is easy and works fine). However, I also have "m s", "m e" and "m d" as sequences to swtich modes as well as "p e" and "p d" as other sequences to do some image processing. All those shortcuts fire in pairs - if I press "m" followed by "e" I also trigger the sequence "p e". If I press "m" followed by "s", the "s" shortcut is being fired.
An even bigger issue is handling sequences which use some common patterns like "+" or "-" for increasing/decreasing values. Say I have to handle brightness, contrast and gamma, for which I set up seuqences "b +", "b -", "c +", "c -", "g +" and "g -". Not only it is buggy when defining the shortcut, it also doen't fire.
I have to handle around 20 shortcuts, some of them as sequences, in this app and using mousetrap is somehow a given. Please.

I will look into the fact that pressing some keys in the middle of a sequence is not breaking the sequence.  This definitely sounds like a bug.  There are unit tests for this though
For example
https://github.com/ccampbell/mousetrap/blob/5da6a165839bcf37750942d8c1823c677f5dc730/tests/test.mousetrap.js#L454-L465
and
https://github.com/ccampbell/mousetrap/blob/5da6a165839bcf37750942d8c1823c677f5dc730/tests/test.mousetrap.js#L413-L438
If one of you could provide a js fiddle it would be pretty helpful

OK, I have to correct myself. While in my case binding to m and on the same page to a sequence m e makes little sense, I also realized that key combinations with + are only meant for modifiers, like shift or ctrl but not for key combinations like n+1 or b+n. So in my case I just re-wired the shortcuts to avoid conflicts - so there is no bug.
Having a key+key combination would be a nice feature to have, though.


Elder Guardians are counted as guargians

Hi,
Elders guardians are counted as guardians, even if the spawn boss option is enabled.
They should be counted as elder guardians.
Versions used:
SoulShards-TOW-1.10.2-2.6.6-46
Forge: <IP_ADDRESS>5

This is fixed in 1.11 due to how Mojang changed entity handling. I'll add (yet another) special case for 1.10


[Feature Request] Split Window Status Line

Not sure if it was intensional, but when you split the window, you share the status line across all splits, and statusline shows the one you have focusing:

I would love to be able to have one status line per split... not sure if everyone prefers that or having a option to have a global one and one per split.
Great work on the plugin btw, loved it. :tada:

I'll look into making this a config option asap. Thanks 👊


CocoaScrollView does not adapt to width

CocoaScrollView does not adapt to width

@wisepmlin I tried to get this to work, but it seems that Apple is using some private APIs to efficiently calculate the intrinsic width of the hosted SwiftUI content. Going to close it as out of scope for now, please use manual frames for the time being.


Unclear how to update the Menu links on the Index Page

I have generated the site via travis which was pretty cool. I'm unable to find any docs though that show me how to update the markdown to create Menu Links on my index page.
I have tried creating an index.md in my site folder but haven't yet discovered how to update the existing links it generates. Is this part of the site able to be updated?

I finally figured out I need to create the similarly named strructre under my own assets based on the templates folder for the site
https://github.com/easystatic/easystatic/tree/master/template

header.ejs
header.css
main.css
main.ejs
main.js
index.md

Pretty cool job, Would be interested in contributing once I have had a play and may offer some different starter templates to bundle


Europarl

Transcripts from EU Parliament meetings from 1996 to 2011. Contains approximately 4.5 GB of text.
Languages: French, Italian, Spanish, Portuguese, Romanian, English, Dutch, German, Danish, Swedish, Bulgarian, Czech, Polish, Slovak, Slovene, Finnish, Hungarian, Estonian, Latvian, Lithuanian, and Greek.
Link: www.statmt.org/europarl/

Temporarily closing while we finish version 1.

I could pull this, clean it up and look to see how it's organized if we are still interested. The parallel texts in many languages is interesting too. For v1, do we still want to keep all languages in though?

We are pretty much done with V1 (8 GiB short) so I went ahead and removed
the “deferred” label from all of the V2 datasets. You’re welcome to do
this, but it’s going in V2 not V1.
On Sun, Sep 20, 2020 at 10:59 PM Travis Hoppe<EMAIL_ADDRESS>wrote:

I could pull this, clean it up and look to see how it's organized if we
are still interested. The parallel texts in many languages is interesting
too. For v1, do we still want to keep all languages in though?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/EleutherAI/The-Pile/issues/25#issuecomment-695880121,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZJVMDWU2VEL6EYJR4NQO3SG26RHANCNFSM4Q5A5NRQ
.

Starting the processing on this. For reference, the data file is 1.5GB but it takes over 14 hours to download from the main site.

This is complete. The processing code is here
https://github.com/thoppe/The-Pile-EuroParl
with the temporary download link here  https://drive.google.com/file/d/15kQ6jAGHsI3ZrA0ibXGuTmzGdib9NA63/view?usp=sharing
  ✔ Saved to EuroParliamentProceedings_1996_2011.jsonl
  ℹ Saved 187,072 articles
  ℹ Uncompressed filesize   4,941,430,389
  ℹ Compressed filesize     1,475,803,930

Once incorporated, this issue can be close and moved to the completed section.


Touching with a second finger while dragging prevent sliding (iOS / UIWebview)

First of all : great lib !
It working great on iOS / UIWebview.
However I have two small problems :

If I start dragging and touch with a second finger and then release both fingers swiper will stay in this position (in between transition)
If I start dragging with on finger and drag out the screen on the right it will stay in this position (in between transition). It will not do that if dragging out the screen on the left...

Any thoughts ?
Cheers,
Julien

Me too. In the sliding process, another finger's touch will stick

me too,when I slide page with two fingers,happen error

Issue is closed because of outdated/irrelevant/not actual/needed more information/inactivity.
If this issue is still actual and reproducible for latest version of Swiper, please create new issue and fill the issue template correctly:

Clearly describe the issue including steps to reproduce when it is a bug.
Make sure you fill in the earliest version that you know has the issue.
Provide live link or JSFiddle/Codepen or website with issue


invalid_request after logging into the app

I am new to the Graph API and I've just tried pulling and running the code as per the tutorial. I've also configured the app registration accordingly on Azure AD admin center and filled out the app id and secret in the .env file. However, after logging in, it redirects me back to the home "/" page and the UI shows an "invalid_request" in a red error box. There wasn't any console.log messages and don't see much in Fiddler.

A common cause of invalid_request during auth is a problem with the redirect URI. Double-check that the URI specified in OAUTH_REDIRECT_URI in your .env file matches up with the redirect URI you configured on your app registration exactly.

I am also getting this same issue, and my reply URI matches in both the env file and in my app's authentication page in Azure.
http://localhost:3000/auth/callback

Thanks @MrJohnLocke. How did you get the code? Did you clone this repo, download from our quick start page, or follow the tutorial? I'm asking so I know which avenue to investigate further :).

I used the Quick Start page.  It created the app in AAD, gave me the graph-tutorial folder (in a zip file).  Made sure the graph API permissions were added in the app registration.  Then I just opened the folder in VSCode, ran npm install, then npm start.  The app started just fine.  I tried to log in with my credentials, including MFA, and then it returned me to the home/index page with the error.  In VSCode, it even says that it returned me to /auth/callback after the sign-in process.

Thanks for that. Let me check it out and post back.

Ok I just pulled the quick start and tried to reproduce it, unsuccessfully. I want to see if maybe it's a specific combo of account types, MFA, etc.

When you are prompted to sign in to get an app ID and secret in the quick start tool, did you use a work/school account, or a personal Microsoft account (like outlook.com, etc.)?
When you login to the app, which type of account do you use?
There should be a file named version in the root of the zip file you downloaded, can you tell me the version number in that file?
You mentioned adding graph API permissions in the app registration - you shouldn't have to add anything. Do you remember exactly what you changed (if anything)?
What version of node.js are you using, as reported by node --version?

I have tried with two different accounts, getting the same result with each.  One of them is an onmicrosoft.com account, and the other is a Microsoft work account.  The Microsoft work account does not use MFA.  The onmicrosoft.com account does use MFA.

version of the zip was 1.2

User.Read was the only API permission after the app was added to my AAD.  I was able to add the other required perms without issue though. (Calendars.Read, offline_access, openid, profile)

12.16.1

Thanks. 1.2 is the latest version. There is no need to set those other perms on the app registration: the app requests them dynamically. However, that should not break anything. Just to be sure, I added it to my app registration and I'm still working fine :). I'm also using Node 12.16.1.
I enabled require MFA on one of my onmicrosoft.com test accounts and I don't reproduce the error. So there's some disconnect here. I'd like to see if we can get more info on your particular error. The sample uses passport.js to do the initial sign-in, with the setting to report errors in a flash message, which is what you're seeing with the red box. Passport.js seems to only show the error code, but there's usually a message that goes along with it. Let's see if we can dump the rest of that error. Can you add a console.log(JSON.stringify(req.body)); into your callback in auth.js? It would look like this:
router.post('/callback',
  function(req, res, next) {
    console.log(JSON.stringify(req.body));
    passport.authenticate('azuread-openidconnect',
      {
        response: res,
        failureRedirect: '/',
        failureFlash: true,
        successRedirect: '/'
      }
    )(req,res,next);
  }
);

Let me know what that outputs.

With your code, we do have some more info!  And a fix!
Here's the output: AADSTS50194: Application (My Node.js App) is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after '10/15/2018'. Use a tenant-specific endpoint or configure the application to be multi-tenant.
So in my AAD registration, I did change the supported account types from multi-tenant to single, because I only wanted accounts from my AD to have sign-in capabilities.  So it looks like this is what broke the sign-in process, because when I change back to the multi-tenant, it works just fine.
The fix for anyone wanting to only use a single tenant is to replace the "common" endpoint of OAUTH_AUTHORITY (.env file) to your tenant ID.  So it should look something like:
OAUTH_AUTHORITY=https://login.microsoftonline.com//
Thank you for the help on this.

Glad you figured it out :). The sample uses common just because it reduces the steps to get this working, so yep, the app registration has to be configured as multi-tenant, unless you make the code change you suggested.
@yhrchan do either of the suggestions fix your issue?

Make sure redirect URI is correct in app registration
Make sure app is configured as multi-tenant, or make the code change @MrJohnLocke describes above.

Hi @jasonjoh and @MrJohnLocke
Thanks for your help. The sample created from https://developer.microsoft.com/en-us/graph/quick-start works fine without errors while the one from this repo is where I am having problems with. It turns out what @MrJohnLocke described resolved the issue to put in a tenant id in the OAUTH_AUTHORITY parameter as the one I created myself is targeted as a single-tenant.
Thank you!


add support for custom resolvers

per discussion https://github.com/iambumblehead/resolvewithplus/issues/58, this PR adds support for using different resolvers with esmock. Specifically, a yarn PnP resolver be specified, so that esmock would yarn PnP module resolution rather npm.
const modulePnP = await esmock('../src/modulePnP.js', {
  '../src/moduleIdChildPnP.js' : () => ['a', 'b']
}, null, {
  resolver: pnpapi.resolveRequest
})

When the pipelines pass ... lets consider the changes a bit before merging.
Instead of a list of resolvers, a single resolver definition is probably sufficient, eg,
const modulePnP = await esmock('../src/modulePnP.js', {
  '../src/moduleIdChildPnP.js' : () => ['a', 'b']
}, null, {
-  resolvers: [ pnpapi.resolveRequest ],
+  resolver: pnpapi.resolveRequest
})

also, the configured resolver should probably fully replace resolvewithplus, so that resolvewithplus is never called when a custom resolver is defined.

The added test is a little cryptic and only runs in recent node environments where module.register is defined, but maybe this is sufficient. @koshic what do you think? Please review.

@koshic you have more skill with typescript than I do and I would be glad if you would update the type definitions file

@koshic you have more skill with typescript than I do and I would be glad if you would update the type definitions file

Sure

Type definitions diff:
// or export it at the end of file
export type Resolver = (id: string, parent: string) => string

type Options = {
  strict?: boolean | undefined,
  purge?: boolean | undefined,
  isModuleNotFoundError?: boolean | undefined,
  resolver?: Resolver | undefined
}

For PnP it works like that:
import { pathToFileURL } from "node:url";
import { type Resolver } from "esmock";

const resolver: Resolver = (id, parent) =>
  pathToFileURL(pnpapi.resolveRequest(id, parent)).href; // esmock works with file URLs internally, so...

@iambumblehead or you prefer that I make changes in the branch?

Custom resolver should process the following special module ids:

builtin Node module id -> should return id as is or 'node:' + id
'import' -> should return null (or other falsy) value.

It's ok for first implementation, but in the future we should remove such unnecessary calls - in my understanding, resolver is responsible to resolve only things can be resolved.

agreed and thank you

@iambumblehead fixed resolver return type. I'm moving my project to new esmock version in parallel, and found that mistake.

@koshic thanks for helping me! esmock is updated so that the resolver is not called with builtin moduleIds

changes here might be "ready"
I can't think of anything else to change or add

changes here might be "ready"

Let me to update my local project and re-run all tests with that version, it will take ~15m

@iambumblehead works fine, thx! lets merge it

@koshic the resolver spec does specify handling of builtin module names https://nodejs.org/api/esm.html#resolution-algorithm-specification

PACKAGE_RESOLVE(packageSpecifier, parentURL)
...
3. If packageSpecifier is a Node.js builtin module name, then
.   1. Return the string "node:" concatenated with packageSpecifier.

iow the resolver should be called with builtin moduleIds

@koshic yes let's publish and we could publish again any follow up changes we want

@koshic the resolver spec does specify handling of builtin module names https://nodejs.org/api/esm.html#resolution-algorithm-specification

Good catch ) So, we should answer to the following question: should esmock have some optimizations based on internal knowledge and skip useless queries?
My opinion - why not? I'm trying to imagine situation when we may need to process builtins differently, but without success.

<EMAIL_ADDRESS>is published.
If your resolver is later updated to handle core modules, I would be interested to remove iscoremodule condition from esmock. This way, esmock would be as flexible as possible for any resolver that might be used.
iscoremodule(id) ? addprotocolnode(id) : opt.resolver(id, parent)

psuedo-code using node:module isBuiltin
import { isBuiltin } from 'node:module'

const protocolNodeRe = /^node:/
const addprotocolnode = p => protocolNodeRe.test(p) ? p : `node:${p}`

const resolver = (moduleId, parent) => {
  if (isBuiltin(id)) return addprotocolnode(id)
  // ...
}

Good catch ) So, we should answer to the following question: should esmock have some optimizations based on internal knowledge and skip useless queries?

I don't have a strong opinion actually. maybe we should leave esmock as it is following this PR and not make any changes...

I removed that code (4 lines., hehe) right after you make "do not call custom resolver with builtin moduleId" commit ))
BTW, I'll make PR to the wiki to describe how to use custom resolver with esmock & yarn pnp

I suppose the best reasons to remove the iscoremodule condition would be

slightly simplifies esmock, esmock calls the resolver with any moduleId
anticipates that the resolver is spec compliant and handles builtin moduleIds

I removed that code (4 lines., hehe) right after you make "do not call custom resolver with builtin moduleId" commit ))

ok did not see that

anticipates that the resolver is spec compliant and handles builtin moduleIds

It makes sense... So if we both have concerns about 'too smart esmock', let's remove that magic. For me, It's better to redo some work than keep some non-ideal code.

ok will make a PR shortly


Use pickle in a pandas 2.x compatible way

Going by https://github.com/pandas-dev/pandas/issues/53300 this should
be backwards compatible with older versions of pandas down to 0.20.3.

Thank you very much for this improvement. BBP engineers have not found the time to ensure that the simulation toolchain using AstroVascPy is working with pandas 2x. Your proposal will be a huge plus.
I will proceed to additional internal tests to make sure it doesn't break anything on our side and will get back to you in this PR on Monday.

Gosh. You scared me there for a bit. I thought where has my weekend gone... :stuck_out_tongue_winking_eye:


perf(operator): simplify the implementation of the endWith operator

I would like to propose a simplification and optimization of the endWith operator.
Some operators may spend significantly more CPU and RAM than you expect from them. When trying to use the debugging tools, you can notice that often the problem lies in the fact that operators can consist of other operators. For example, in dealing with count you can see that the reduce operator is used in the implementation, but the code is quite simple and can hardly affect performance in any way. But if you take the operator from this PR (endWith), you can see that the relatively "heavy" operator concatAll is used in combination with the fromArrayLike functions.
I suggest trying to avoid using other operators in the implementation of operators if their implementation has a large amount of code that under no circumstances will be required (dead code) for the functionality of operators.
As an example, the difference in the number of created objects in this code:
new Observable<string>((subscriber) => {
  subscriber.next('a');
  subscriber.next('b');
  subscriber.next('c');
  subscriber.complete();
})
  .pipe(endWith('e', 'f', 'g'))
  .subscribe({
    next: (next) => {
      console.log('next', next);
    },
    complete: () => {
      console.log('complete');
    },
    error: (error) => {
      console.log('error', error);
    },
  });

Observable
Subscriber
Subscription

master
5
4
5

this PR
2
2
3

I would be very happy to hear reasoned criticism. 😄

LOL! I had forgotten that file was even in there. It wasn't even used. :)


  This PR adds a bunch of documentation that covers the following topics:

Project directory structure.
Event Sourcing architecture.
Database design and architecture.
Kafka design and architecture.
Deployment and run instructions.

The README is very clean, i can see utilization through it even with a limited knowledge base.


Components: Lists

[ ] check list vs. card vs. card list

Component: Cards (Product Cards / Product List) #1579
Figma
List
https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=61%3A371&mode=design&t=dVBMpdDtmgryaufE-1
Cards
https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=2433%3A65729&mode=design&t=v21xVVGydMFRQiHB-1
Card List
https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=14937%3A92525&mode=design&t=v21xVVGydMFRQiHB-1
Dev
https://next.design-system.post.ch/?path=/docs/components-card--docs
https://design-system.post.ch/#/bootstrap-samples/card

Ready for review

@rouvenpost
The list does not seem ready for review yet, should I review the selection list?
If so, is there another ticket for the list?

@alizedebray here are the different List combined :https://www.figma.com/design/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?m=auto&node-id=30030-39506&t=XSKgzdxmoPaUNLBT-1

Depends on #2988

@oliverschuerch is this needed for v1?

Closing in favour of #3658


first draft add of datasource for user grants

Adding this PR just to find out if this would be an acceptable addition to the provider.
Definition of Ready

[ ] Short description of the feature/issue is added in the pr description
[ ] PR is linked to the corresponding user story
[ ] Acceptance criteria are met
[ ] All open todos and follow ups are defined in a new ticket and justified
[ ] Deviations from the acceptance criteria and design are agreed with the PO and documented.
[ ] No debug or dead code
[ ] My code has no repetitions
[ ] All non-functional requirements are met
[ ] The generic lifecycle acceptance test passes for affected resources.
[ ] Examples are up-to-date and meaningful. The provider version is incremented.
[ ] Docs are generated.
[ ] Code is generated where possible.

@stebenz @hifabienne any feedback on this suggested feature?  is this something you could see incorporating into your next release?

Please also include the necessary templates and examples to regnerate the documentation, as a reference have a look in the paths templates/data-sources/application_saml.md.tmpl, templates/data-sources/application_samls.md.tmpl, examples/provider/data-sources/application_saml.tf and examples/provider/data-sources/application_samls.tf


[Feature Request]

I'm always
frustrated when Operations such as session restart or service update ,Local service will lost message.
Now, I can only actively obtain it through /api/{session}/chats/{chatId}/messages, and I also need to compare the information locally, which is too complicated.
I hope to communicate through webhook to push the incremental data generated during the waha outage

Hi!

I also need to compare the information locally, which is too complicated.

Yeah, agree on that point :(
We'll work on history sync webhooks for that purpose soon :crossed_fingers:
#458
Would it solve your problem?

Ok please post it asap


Fix README.md 'CGRectMake' is unavailable in Swift

Fix README.md 'CGRectMake' is unavailable in Swift
// as is
CGRectMake(10, 10, 200, 45)

// to be
CGRect(x: 10, y: 10, width: 200, height: 45)

Thanks :)


datapath: Few minor improvements to DevicesController

This pulls out couple improvemenst from https://github.com/cilium/cilium/pull/28712 to its own PR:
statedb: Add NewPrivateRWTableCell: Add ability for a constructor to provide the Table[T] and thus allow populating a table before readers can access it.
datapath: Ensure device and route tables are populated before readers: Make sure DevicesController has initially populated the devices table before anything reads it. Note that this was not a bug earlier as we didn't use Table[*Device] directly but rather via option.Config.GetDevices which came from DeviceManager wrapper around DevicesController and that did enforce the ordering.
datapath/devices: Flush routes on device delete: Fix cleaning of route entries when device is deleted. Surprisingly Linux doesn't send netlink notifications for each deleted route when link is removed. This was not a big issue yet as routes were only used to figure out if a 'veth' device should be selected based on if it had a default route or not.
datapath/devices: Avoid adding duplicate address: As DevicesController needs to populate the devices table before readers see it, it needs to do a Subscribe and List. This leads to a race where one might see an address both in listing and as an update. Fix this by not adding the address twice. (I did also think about using a sets.Set for addresses, but I prefer that they're in a slice and in a stable order. Happy to reconsider though).

/test


Support Azure VM Metadata

Support Azure Virtual Machine Metadata retrieval.
ref. https://docs.microsoft.com/azure/virtual-machines/virtual-machines-instancemetadataservice-overview

LGTM!

Thanks for the review!


web_benchmarks_html draw_rect_variable_paint & draw_rect_variable_paint need baselines...

They look pretty stable since their introduction; maybe we can take as-is?

I set the baseline/goal to the recommended numbers. It should be fine now.


Chore: Add go.dev badge to README

Add go.dev badge to README, for easy access to docs.

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


urlUtils and itemUtils: application-level modules?

I wonder if these are really an app-level or an app-base module?
urlUtils seems to be forcing the url/param structure to be a certain pattern and it should be up to the app to decide this. It's also loading libraries that I might not need to load. e.g. camera
https://github.com/Esri/application-base-js/blob/a7a3eecd54389739e8c2af6ed9643913cb12efdb/support/urlUtils.ts
itemUtils beyond this seems app-level too.
https://github.com/Esri/application-base-js/blob/master/support/itemUtils.js#L108
Move to app-template-examples?
@driskull @kellyhutchins

Those are the standard url parameters from ArcGIS Online that we'd like all the configurable apps to support so my vote is that they stay in app base.

Thanks @kellyhutchins. I wish I would have known this as I use totally different params to configure the view, marker, search...
Is this documented somewhere?

Probably not. We had an issue in devtopia for the app developers when we first started supporting the url params and then we added the urlUtils support to the boilerplate.

Is this what the Map View uses/will use in the future?

The parameters themselves are doc'd in ArcGIS Online doc.
http://doc.arcgis.com/en/arcgis-online/reference/use-url-parameters.htm
Although we don't use all of them.

Oh man. I don't use extent at all and use center, scale, zoom... since the map and view has changed a lot at 4.x.
There's other stuff in there too that can conflict with apps.  E.g. my app uses and clears the view.graphics...
https://github.com/Esri/application-base-js/blob/master/support/itemUtils.js#L109
Plus I also see this in here for loading the view (but not in the AGO doc). I did this totally differently...
https://github.com/Esri/application-base-js/blob/master/support/itemUtils.js#L38

And for basemap url params, we might want to add something to accept the actual name string. e.g. streets-vector

@alaframboise if you don't want the mixins, you don't have to use them. They are all apart of the helper methods your app doesn't have to call.


Mix & match behavior of array objects from different libraries

This question was raised by @shwina during an internal discussion: If I create two array objects, one from cupy.array_api and another from numpy.array_api, if I do a+b or b+a what would happen? I think we should obviously return TypeError following Python's convention, so the question is which page should we document this expectation?

In https://data-apis.org/array-api/latest/purpose_and_scope.html#out-of-scope it says:
Non-goals for the API standard include:
...
Making it possible to mix multiple array libraries in function calls.
Most array libraries do not know about other libraries, and the functions they implement may try to convert “foreign” input, or raise an exception. This behaviour is hard to specify; ensuring only a single array type is used is best left to the end user.
We have tended to not specify exception types and other such things that are out of scope, undefined behavior, etc. TypeError seems clearly the correct exception type, but I'm not sure it's a good idea to document this under the Python operators section or elsewhere. Unless we can think of a good way to have a self-contained section where we document the most common exceptions and when to use them somehow.

We don't really require type checks of any kind anywhere. We have type hints, but no requirement that those be translated to checks at runtime. My reading of the spec is that such a thing is garbage in, garbage out. It might produce an error or it might work, and if it does work, it might be on accident. Requiring a + b to raise a TypeError when b is not an array object of the same library as a (or a Python scalar) means a.__add__ has to have a if not isinstance(other, array): raise TypeError check at the top. And the same for every other method and function. Even the strict NumPy implementation does not do this (in fact, numpy.array_api.Array operator methods return NotImplemented, meaning another library could interface with them if it wanted to).

I believe the question is answered and we already have text that addresses the point, quoted in italics above. So I'll close this issue.


modifiable APY dropdown selection

The Dapp should offer an option to display either 1y, 30d & 7d APYs via a dropdown from the balance header. 30 day and 1 year APYs are already available from the  ContractStore module. They 7day apy needs to be fetched and stored to ContractStore via: https://analytics.ousd.com/api/v1/apr/trailing/7
UI should look like this:

It may be more involved, but I think we initially intended to have 7-day as well and apparently the old mockup had 3-day too. I'm happy to start with just 30 and 365 although it might make more sense to say "1y" instead of "365d".
Separately, it would be good to add the same feature to https://analytics.ousd.com/ and https://analytics.ousd.com/apy but that can also be a separate project.

Good points thanks, have updated my initial comment with your feedback. Also deploying this massive commit that makes it possible to query 7 day APY (previously under 10 day APYs weren't queryable): https://github.com/OriginProtocol/ousd-analytics/commit/6f6f7effabc9b404a390761f0ce0b3c0f238e81a

Most of the stable coin farmers I've talked to want to be stay in their positions for at least a few months. As a result, 30d,60d,90d are likely the most useful. I'd include 7d and 365d too.
IMO it would look better if we swapped the order to have the drop-down come before the label.

done in #952


There are no short integer literals

I replaced literals for short integer types with literals for medium integer types because there are no such literals (0S is not a valid short integer).

@yecril71pl : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@corob-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@yecril71pl
Thanks for the update. I don't know where the short part came from, unless by some analogy with float. I swapped "long long" in for "medium" since I'd rather not explain what the word "medium" means when it isn't used anywhere else.

I think it goes back to the time of 16–bit CPUs.


[BUG] Inconsistency in the Statistical API response

Describe the bug
The statistical API aggregation response is wrong.
To Reproduce
Steps to reproduce the behavior:
I will use the 10m Annual Land Use Land Cover (9-class) collection for the sake of clarity
Given a geometry, in WGS84 coordinates, which corresponds to a vineyard parcel:
geom = {"type": "MultiPolygon", "coordinates": [[[[-69.25938266016884, -33.606832780293296], [-69.26059349758972, -33.60682715386169], [-69.26163859816909, -33.60635828209652], [-69.26185275119607, -33.6063617921014], [-69.26182899745895, -33.6071406379151], [-69.25709711300503, -33.607522723568685], [-69.25709711300426, -33.6069279250077], [-69.25938266016884, -33.606832780293296]]]]}

Visualize on the EO Browser the LULC distribution of the pixels on the parcel for 2022 ✅

-> we see that most of the parcel is classified as Crops, which is consistent

Verify the consistency using the Processing API ✅

from sentinelhub import SHConfig
import datetime
import os

import numpy as np

from typing import Union, Tuple

from shapely.ops import transform
from shapely.geometry import Polygon, MultiPolygon, GeometryCollection

from pyproj import Transformer
from shapely.geometry import mapping, Point, shape

from sentinelhub.geo_utils import get_utm_crs

from sentinelhub import (
    CRS,
    BBox,
    Geometry,
    DataCollection,
    DownloadRequest,
    MimeType,
    MosaickingOrder,
    SentinelHubDownloadClient,
    SentinelHubRequest,
    bbox_to_dimensions,
)

def to_utm_crs(geom: Union[Polygon, MultiPolygon]) -> Tuple[Union[Polygon, MultiPolygon], pyproj.CRS]:
    """Project a geometry in WGS84 coordinates to UTM
    """
    wgs84 = pyproj.CRS('EPSG:4326')
    if isinstance(geom, (MultiPolygon, GeometryCollection)):
        if len(geom.geoms) == 0:
            return None, None
        p = geom.geoms[0].exterior.coords[0]
    else:
        p = geom.exterior.coords[0]
    p = Point(*p)
    utm_crs = get_utm_crs(p.x, p.y, source_crs=CRS.WGS84)
    utm_crs = pyproj.CRS(f'EPSG:{utm_crs.epsg}')
    project = pyproj.Transformer.from_crs(wgs84, utm_crs, always_xy=True).transform
    utm_geom = transform(project, geom)
    return utm_geom, utm_crs

eval_script = """//VERSION=3

function setup() {
    return {
        input: [
            "lulc",
            "dataMask"
        ],
        output: [
            {
                id: "lulc",
                bands: 1,
                sampleType: "UINT8"
            },
            {
                id: "dataMask",
                bands: 1,
            }
        ]
    }
}

function evaluatePixel(sample) {
    return {
        lulc: [sample.lulc],
        dataMask: [sample.dataMask]
    }
}
"""

annual_lulc_collection = DataCollection.define_byoc(
    collection_id="0ed26381-7344-4281-b180-66f3da521f75"
)
sh_input_data = SentinelHubRequest.input_data(
    data_collection=annual_lulc_collection,
    time_interval=("2022-01-01", "2022-04-01"),
)
sh_config = SHConfig()

utm_envelop, utm_crs = to_utm_crs(shape(geom))

request = SentinelHubRequest(
    evalscript=eval_script,
    input_data=[sh_input_data],
    responses=[SentinelHubRequest.output_response("lulc", MimeType.TIFF)],
    geometry=Geometry(utm_envelop, crs=CRS(utm_crs)),
    resolution=(10, 10),
    config=sh_config,
)

imgs = request.get_data()
image = imgs[0]

this gives a consistent image with 75% of Crops within the parcel

Get the result with the Statistical API 🔴

from sentinelhub import SHConfig
import datetime
import os

import numpy as np

from sentinelhub.time_utils import parse_time
from sentinelhub import Geometry, SHConfig, CRS
from sentinelhub.data_collections import DataCollection
from sentinelhub.api.statistical import InputDataDict
from sentinelhub.api.statistical import SentinelHubStatistical
from sentinelhub.api.statistical import SentinelHubStatisticalDownloadClient

eval_script = """//VERSION=3

function setup() {
    return {
        input: [
            "lulc",
            "dataMask"
        ],
        output: [
            {
                id: "lulc",
                bands: 1,
                sampleType: "UINT8"
            },
            {
                id: "dataMask",
                bands: 1,
            }
        ]
    }
}

function evaluatePixel(sample) {
    return {
        lulc: [sample.lulc],
        dataMask: [sample.dataMask]
    }
}
"""

annual_lulc_collection = DataCollection.define_byoc(
    collection_id="0ed26381-7344-4281-b180-66f3da521f75"
)
sh_input_data = SentinelHubStatistical.input_data(
    data_collection=annual_lulc_collection,
)
sh_config = SHConfig()

histogram_calculations = {
    "lulc": {
        "histograms": {
            "default": {
                "bins": [1, 2, 4, 5, 7, 8, 9, 10, 11, 12]
            }
        }
    }
}

time_interval = ("2022-01-01", "2023-01-01")

aggregation = SentinelHubStatistical.aggregation(
    evalscript=eval_script,
    time_interval=time_interval,
    aggregation_interval="P1Y",
    resolution=(10, 10)  # in UTM CRS: meters
)
config = SHConfig()
client = SentinelHubStatisticalDownloadClient(config=config)

utm_geom, utm_crs = to_utm_crs(geom)

requests = list()
request = SentinelHubStatistical(
    aggregation=aggregation,
    calculations=histogram_calculations,
    input_data=[sh_input_data],
    geometry=Geometry(utm_geom, crs=CRS(utm_crs)),
    config=config,
)
requests.append(request)

# Pass request objects together to a download client object,
# which will execute them in parallel using multiple threads.
download_requests = [
    request.download_list[0] for request in requests
]
stats =  client.download(download_requests)

histogram = stats[0]['data'][0]['outputs']['lulc']['bands']['B0']['histogram']
histogram

gives
{'bins': [{'lowEdge': 1, 'highEdge': 2, 'count': 0},
  {'lowEdge': 2, 'highEdge': 4, 'count': 0},
  {'lowEdge': 4, 'highEdge': 5, 'count': 0},
  {'lowEdge': 5, 'highEdge': 7, 'count': 0},
  {'lowEdge': 7, 'highEdge': 8, 'count': 0},
  {'lowEdge': 8, 'highEdge': 9, 'count': 0},
  {'lowEdge': 9, 'highEdge': 10, 'count': 0},
  {'lowEdge': 10, 'highEdge': 11, 'count': 0},
  {'lowEdge': 11, 'highEdge': 12, 'count': 313}],
 'overflowCount': 0,
 'underflowCount': 0}

that is 100% Rangeland 🔴
Expected behavior
The results of the Statistical API must be consistent with what we observe with the Processing API or the EOBrowser
Environment
Details of the python environment
sentinelhub = "==3.10.1"

Python 3.9
Desktop (please complete the following information):

OS: macOS 14.5

Additional context

Hi @parbelet!
This one is a tricky trap, but it's not a bug. I think the issue is that you are doing a yearly aggregation over the yearly span, and I think it's taking into account the 2022 land cover map as well as the 2023 land cover map, since the maps are actually pinned to the January first each year.
Or perhaps there really is a bug in how the P1Y is treating the calculations, not sure about this one.
However, if you do e.g. a time interval from 2022-01-01 to 2023-01-02 (so both maps are taken into account) and do the request with a shorter window, say P1M or even P1D, you get two results

The first one is what you expect, and the second one is what you get above, which I assume is the land cover map for 2023
So, what bothers me here is that I have to extend the end date to make the interval inclusive, while for P1Y it seems to exclude the 2022-01-01 date and include the 2023-01-01 date.
My suggestion would be to keep the temporal aggregation windows short in such cases where you have only one ingested image per year

Thank you very much @mlubej for your quick answer!
it wasn't obvious that the annual data would only be available on 1 January indeed: I managed to have more consistent results specifying an aggregation_interval="P1D" instead of aggregation_interval="P1Y"  (which is a bit counterintuitive to get annual results I must say 😄 )


Add virtual environment folder to gitignore

Add virtual environment sub-folder to .gitignore file. I've used the common .venv name for the folder. I'm using this for development and testing.

Oops. This has more changes than I expected. I'll delete and rebase.

@KJonline I think the issue is that I branched from the v4.3 tag, which has 4 commits from dev that haven't been merged into master yet. As v4.3 has been published to PyPI, I assume these commits should be in master?

Re-opened and set to draft status as this should reduce to the single .gitignore change once the v0.4.3 changes are merged into master.


Use humble baseimage

Sorry, I have missed this PR..

Or is this build by yocto already?

Updated the baseimage version to v2.1.0. However, this won't be needed in future as Yocto builds the package.


New build system fails on Windows

The addition of glbindings and changes to the build system introduced by #176 have broken the build on windows
Build-breaking issues

Incorrect linking libraries (release build linked with debug libraries)
Incorrect suffix handling for glbinding (library generated with suffix e.g. glbindings-vc130-mt.lib) while linker attempts to link with glbindings.lib)

Runtime issues

Programs crashes when attempting to read the context strings of glbindings. Might be related to library linking with different std libs.

I'll give a look but I've no way to get access to a window system... When writing this part, I just copy the lines from assimp stuff. I'll modify some stuff, blindly, in my PR fixBuildSystem

I'm on this issue. I've been working on this for several days now.
I'm just waiting the build chain is stabilized to update and PR my changes.
The integration with VS 2017 is much easier now, cmake is processed directly by VS, which solves a lot of problems.

WIP on branch fixMVSC.

See PR #195


Watch.on("change") even not triggered when changed the value of kv store key.

Hi,
Creating a watch instance --> on method get
const watch = this.consulClient.watch({
method: this.consulClient.kv.get,
options: {key: keyToWatch,recurse: true },
backoffFactor: 1000,
});
watch.on('change', function(data, res) {
console.log('data:', data);
    });

watch.on (change) is not triggered after changing either get or put of kV store key from cli.
Please let me know what am I doing wrong here.

This is working after increasing the timeout value


[Question] ctre::search

I'm trying to search and "consume" the match.
Example:
std::string in = "something AND nothing AND keyword OR foo";
std::string out = "";
auto m = ctre::search<"some regex">(in);
// Magic missing;

After this in should be AND nothing AND keyword OR foo and out should be something.
My regex matches something but how do I get the position of the first match in in so I can substring them?

std::cout << std::string_view{m.get<1>()} << "\n";


Added a shared action to build and scan an image

Merging as can't test it on a branch. Only an added file, so no impact on existing workflows or actions


Feature request: act as toggle

Nice plugin! It would be great if it would work as a toggle. Then one could hide the silkscreen designators and show them again if needed.  I mean instead of this:
# Hide reference
reference = selected_footprint.Reference()
if reference:
    reference.SetVisible(False)

something like this (pseudocode):
# Toggle reference visibility
reference = selected_footprint.Reference()
if reference:
    if reference.isVisible():
        reference.SetVisible(False)
    else:
        reference.SetVisible(True)

yes i hope they update the features like this


add keys, values, entries methods for FileSystemDirectoryHandle

These methods were missing, and a directory handle is pretty useless without a way to list the contents of the directory!

Seems I've done this wrong and made the modifications in generated code.


Latest 1.0.13 and 1.0.14 version tags need to have their .podspec files registered in https://github.com/CocoaPods/Specs.git

Hey, I just noticed that using the Podfile syntax ~> 1.0.0 resulted in 1.0.12 being pulled in, instead of 1.0.14 which is the latest version. Using the syntax 1.0.14 or 1.0.13 fails as well. I looked into it and it seems like you just need to add the .podspec files for each version to: https://github.com/CocoaPods/Specs.git
Here's the path to your repository reference in the specs repo:
https://github.com/CocoaPods/Specs/tree/734488a1b560a9e7ba3441fd8e0a614336153578/Specs/2/a/8/FLAnimatedImage
You can also see that cocoapods.org can't see these versions because of this:
https://cocoapods.org/pods/FLAnimatedImage
Let me know if I can help, thanks.

Any update on this?

Any update on this?

Any update on this?

Any update on this ~ ?

Any update on this issues?


raidboss: Add Missing Matches Parameter

Add missing matches parameter for multiple functions within Ruby Weapon
Extreme triggers.
Fixes #1128

The real question is why the test didn't catch this.  :sob:


Take snapshots

Finally I had time to explain how to take a snapshot. Sorry for the delay, but I am kind of out of LittlevGL lately.
Hope this post helps!

I agree with @embeddedt's comments but in general, it looks good to me as well.
I've resolved the conflicts.

@embeddedt Very good notes, I didn't realize it since I already know what they are for 😄
I will try to update it by next week.


Data Parallel bug (return outputs not being moved to same device)

🐛 Bug
Under backend='dp' doesn't handle reduction of the loss across multiple GPUs correctly. This is present in v0.10--v1.0.0rc4
To Reproduce
Code sample

import torch
import pytorch_lightning as ptl
from pytorch_lightning import LightningModule
from torch.utils.data import Dataset

class RandomDictDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        a = self.data[index]
        b = a + 2
        return {"a": a, "b": b}

    def __len__(self):
        return self.len

class RandomDictStringDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return {"id": str(index), "x": self.data[index]}

    def __len__(self):
        return self.len

class RandomDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return self.data[index]

    def __len__(self):
        return self.len

class BoringModel(LightningModule):
    def __init__(self):
        """
        Testing PL Module
        Use as follows:
        - subclass
        - modify the behavior for what you want
        class TestModel(BaseTestModel):
            def training_step(...):
                # do your own thing
        or:
        model = BaseTestModel()
        model.training_epoch_end = None
        """
        super().__init__()
        self.layer = torch.nn.Linear(32, 2)

    def forward(self, x):
        return self.layer(x)

    def loss(self, batch, prediction):
        # An arbitrary loss to have a loss that updates the model weights during `Trainer.fit` calls
        return torch.nn.functional.cross_entropy(
            prediction,
            torch.ones(len(prediction), dtype=torch.long, device=prediction.device),
        )

    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        self.log("loss", loss)
        return loss

    def validation_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        self.log("loss", loss)
        return loss

    def test_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return loss

    def configure_optimizers(self):
        optimizer = torch.optim.SGD(self.layer.parameters(), lr=0.1)
        lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=1)
        return [optimizer], [lr_scheduler]

    def train_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

    def val_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

    def test_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

def main():
    model = BoringModel()
    trainer = ptl.Trainer(
        distributed_backend="dp",
        gpus=4,
    )
    trainer.fit(model)

if __name__ == "__main__":
    main()

Produces the following
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3]

| Name  | Type   | Params
---------------------------------
0 | layer | Linear | 66
/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 104 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
Validation sanity check: 0it [00:00, ?it/s]/home/user/.conda/envs/env/lib/python3.8/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
warnings.warn('Was asked to gather along dimension 0, but all '
/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, train dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 104 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
Epoch 1:  50%|████████████████Traceback (most recent call last):████████████████████████████████████                                                                                | 4/8 [00:00<00:00, 184.41it/s, loss=0.497, v_num=53]
File "dp_bug.py", line 118, in <module>
main()
File "dp_bug.py", line 114, in main
trainer.fit(model)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 440, in fit
results = self.accelerator_backend.train()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/accelerators/dp_accelerator.py", line 97, in train
results = self.train_or_test()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 53, in train_or_test
results = self.trainer.train()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 483, in train
self.train_loop.run_training_epoch()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 557, in run_training_epoch
self.trainer.run_evaluation(test_mode=False)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 599, in run_evaluation
eval_loop_results = self.evaluation_loop.log_epoch_metrics(deprecated_eval_results, epoch_logs, test_mode)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 210, in log_epoch_metrics
eval_loop_results = self.trainer.logger_connector.on_evaluation_epoch_end(
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/logger_connector.py", line 113, in on_evaluation_epoch_end
self._log_on_evaluation_epoch_end_metrics(epoch_logs)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/logger_connector.py", line 178, in _log_on_evaluation_epoch_end_metrics
reduced_epoch_metrics = dl_metrics[0].__class__.reduce_on_epoch_end(dl_metrics)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/core/step_result.py", line 433, in reduce_on_epoch_end
recursive_stack(result)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/core/step_result.py", line 552, in recursive_stack
result[k] = collate_tensors(v)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/core/step_result.py", line 574, in collate_tensors
return torch.stack(items)
RuntimeError: All input tensors must be on the same device. Received cuda:3 and cuda:1
Exception ignored in: <function tqdm.__del__ at 0x7fcf54050a60>
Traceback (most recent call last):
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1087, in __del__
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1294, in close
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1472, in display
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1090, in __repr__
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1434, in format_dict
TypeError: cannot unpack non-iterable NoneType object

Specifically note the line saying
RuntimeError: All input tensors must be on the same device. Received cuda:3 and cuda:1

Expected behavior

Environment

PyTorch Version (e.g., 1.0): 1.6.0
OS (e.g., Linux): Ubuntu 18.04
How you installed PyTorch (conda, pip, source): conda
Build command you used (if compiling from source): N/A
Python version: 3.8.5
CUDA/cuDNN version: 11.0
GPU models and configuration: 8 GPU (RTX 2080Ti)
Any other relevant information:

Additional context
This works on v0.9.0:
import torch
import pytorch_lightning as ptl
from pytorch_lightning import LightningModule
from torch.utils.data import Dataset

class RandomDictDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        a = self.data[index]
        b = a + 2
        return {"a": a, "b": b}

    def __len__(self):
        return self.len

class RandomDictStringDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return {"id": str(index), "x": self.data[index]}

    def __len__(self):
        return self.len

class RandomDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return self.data[index]

    def __len__(self):
        return self.len

class BoringModel(LightningModule):
    def __init__(self):
        """
        Testing PL Module
        Use as follows:
        - subclass
        - modify the behavior for what you want
        class TestModel(BaseTestModel):
            def training_step(...):
                # do your own thing
        or:
        model = BaseTestModel()
        model.training_epoch_end = None
        """
        super().__init__()
        self.layer = torch.nn.Linear(32, 2)

    def forward(self, x):
        return self.layer(x)

    def loss(self, batch, prediction):
        # An arbitrary loss to have a loss that updates the model weights during `Trainer.fit` calls
        return torch.nn.functional.cross_entropy(
            prediction,
            torch.ones(len(prediction), dtype=torch.long, device=prediction.device),
        )

    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return {"loss": loss}

    def validation_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return {"val_loss": loss}

    def test_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return {"test_loss": loss}

    def configure_optimizers(self):
        optimizer = torch.optim.SGD(self.layer.parameters(), lr=0.1)
        lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, step_size=1)
        return [optimizer], [lr_scheduler]

    def train_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

    def val_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

    def test_dataloader(self):
        return torch.utils.data.DataLoader(RandomDataset(32, 64), batch_size=16)

def main():
    model = BoringModel()
    trainer = ptl.Trainer(
        distributed_backend="dp",
        gpus=4,
        # log_every_n_steps=5,
        # flush_logs_every_n_steps=20,
        # benchmark=True,
        # gradient_clip_val=20,
    )
    trainer.fit(model)

if __name__ == "__main__":
    main()

but causes this error under v1.0.0rc4
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1,2,3]

| Name  | Type   | Params
---------------------------------
0 | layer | Linear | 66
/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, val dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 104 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py:45: UserWarning: The dataloader, train dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 104 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
warnings.warn(*args, **kwargs)
Epoch 0:   0%|                                                                                | 0/8 [00:00<?, ?it/s]Traceback (most recent call last):
File "dp_bug.py", line 116, in <module>
main()
File "dp_bug.py", line 112, in main
trainer.fit(model)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 440, in fit
results = self.accelerator_backend.train()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/accelerators/dp_accelerator.py", line 97, in train
results = self.train_or_test()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 53, in train_or_test
results = self.trainer.train()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 483, in train
self.train_loop.run_training_epoch()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 529, in run_training_epoch
batch_output = self.run_training_batch(batch, batch_idx, dataloader_idx)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 661, in run_training_batch
opt_closure_result = self.training_step_and_backward(
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 753, in training_step_and_backward
self.backward(result, optimizer, opt_idx)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/trainer/training_loop.py", line 767, in backward
result.closure_loss = self.trainer.accelerator_backend.backward(
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 83, in backward
model.backward(closure_loss, optimizer, opt_idx)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/pytorch_lightning/core/lightning.py", line 1077, in backward
loss.backward()
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/torch/tensor.py", line 185, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/torch/autograd/__init__.py", line 121, in backward
grad_tensors = _make_grads(tensors, grad_tensors)
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/torch/autograd/__init__.py", line 47, in _make_grads
raise RuntimeError("grad can be implicitly created only for scalar outputs")
RuntimeError: grad can be implicitly created only for scalar outputs
Exception ignored in: <function tqdm.__del__ at 0x7fed7b0c1a60>
Traceback (most recent call last):
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1087, in __del__
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1294, in close
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1472, in display
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1090, in __repr__
File "/home/user/.conda/envs/env/lib/python3.8/site-packages/tqdm/std.py", line 1434, in format_dict
TypeError: cannot unpack non-iterable NoneType object

import torch

prediction = torch.rand(8, 2, requires_grad=True)

x = torch.nn.functional.cross_entropy(
    prediction,
    torch.ones(len(prediction), dtype=torch.long, device=prediction.device),
)

y = torch.nn.functional.cross_entropy(
    prediction,
    torch.ones(len(prediction), dtype=torch.long, device=prediction.device),
)
l = torch.stack((x, y))
l.backward()

Here is the pytorch code that shows the problem. Gives the same error as reported by @willprice
  File "/home/adrian/repositories/imagenet-optical-flow/asdf.py", line 19, in <module>
    l.backward()
  File "/home/adrian/bin/anaconda3/envs/lightning-0.7.1/lib/python3.7/site-packages/torch/tensor.py", line 185, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/adrian/bin/anaconda3/envs/lightning-0.7.1/lib/python3.7/site-packages/torch/autograd/__init__.py", line 121, in backward
    grad_tensors = _make_grads(tensors, grad_tensors)
  File "/home/adrian/bin/anaconda3/envs/lightning-0.7.1/lib/python3.7/site-packages/torch/autograd/__init__.py", line 47, in _make_grads
    raise RuntimeError("grad can be implicitly created only for scalar outputs")
RuntimeError: grad can be implicitly created only for scalar outputs

Conclusion: Somewhere in the dp backend the losses get stacked and backward is called on a non-scalar tensor.
Have limited time rn, so dropping this info here for now to pick it up later

@willprice can you check the fix fro #4138 ? For me this worked on the reproduction script.

@willprice friendly ping :)

Hey @edenlightning, I can confirm that this is fixed for me on the reproduction script and my own codebase. Although I did run into this issue when testing out #4138 on my codebase (I have example_input_array set on my LightningModel).

I think I rediscovered this bug in our examples:
python pl_examples/basic_examples/simple_image_classifier.py --gpus 2 --accelerator dp
I will try to help with the PR @justusschock has still open so we can also finish #4764

Hi. My PL version is     :         pytorch-lightning         1.1.3              pyhd8ed1ab_0    conda-forge
I noticed that I was getting the error RuntimeError: grad can be implicitly created only for scalar outputs,
when I used
    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return {"loss": loss}

And I did not get the error when I used
    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        self.log("loss", loss)
        return loss

The difference being whether I return the dictionary or just the loss value. I found it odd, so I am putting it out here, in case it helps someone.

Hi. My PL version is     :         pytorch-lightning         1.1.3              pyhd8ed1ab_0    conda-forge
I noticed that I was getting the error RuntimeError: grad can be implicitly created only for scalar outputs,
when I used
    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        return {"loss": loss}

And I did not get the error when I used
    def training_step(self, batch, batch_idx):
        output = self.layer(batch)
        loss = self.loss(batch, output)
        self.log("loss", loss)
        return loss

The difference being whether I return the dictionary or just the loss value. I found it odd, so I am putting it out here, in case it helps someone.

I'm getting the issue with pytorch-lightning 1.1.4, using DP. Solved it by adding a training_step_end that explicitly aggregates the loss:
    def training_step_end(self, training_step_outputs):
        return {'loss': training_step_outputs['loss'].sum()}

Perhaps related to the issue - the variable training_step_outputs itself is a dictionary
>>> training_step_outputs
{'loss': tensor([232.8199, 25...Backward>), 'visualization': {'prediction': {...}, 'x': tensor([[[[0.7843, 0...='cuda:0')}}

rather than a tuple, as I would expect from the documentation
            def training_step_end(self, training_step_outputs):
                gpu_0_pred = training_step_outputs[0]['pred']
                gpu_1_pred = training_step_outputs[1]['pred']
                gpu_n_pred = training_step_outputs[n]['pred']

I'm getting the issue with pytorch-lightning 1.1.4, using DP. Solved it by adding a training_step_end that explicitly aggregates the loss:
    def training_step_end(self, training_step_outputs):
        return {'loss': training_step_outputs['loss'].sum()}

Perhaps related to the issue - the variable training_step_outputs itself is a dictionary
>>> training_step_outputs
{'loss': tensor([232.8199, 25...Backward>), 'visualization': {'prediction': {...}, 'x': tensor([[[[0.7843, 0...='cuda:0')}}

rather than a tuple, as I would expect from the documentation
            def training_step_end(self, training_step_outputs):
                gpu_0_pred = training_step_outputs[0]['pred']
                gpu_1_pred = training_step_outputs[1]['pred']
                gpu_n_pred = training_step_outputs[n]['pred']


DownloadJs is not working inside In-App browsers

I have an app inside nextjs, and on a specific page, there is a button. When a user clicks on that button file gets downloaded using downloadjs. It works perfectly fine inside chrome, safari, etc. But when the link of that specific page opens inside an in-app browser that button not works.

facing same issue...inside LinkedIn and messenger

Closed by:

#117
#118


Max structured document size

Currently in the spec under structured documents it stipulates that the maximum document size is limited to 16MB, however this could be a decision reserved for a storage provider for which they could advertise their maximum allowed document size instead.
Suggestion is to remove this maximum document size from the spec and instead add language around how a storage provider server can advertise what their maximum size is, the spec could offer recommendations on how this should be set

If we can't determine that BSON will be smaller than JSON, we should choose 10 MiB as a reasonable hedge. Multiples of 10 are easy to reason about quickly and it's likely not too small for nearly all use cases. As usual, if it's too small for a specific use case, streams can be used. There are also advantages to having the size be smaller; AEAD (authenticated encryption) requires the entire data chunk to be processed before determining whether to report an error or accept it.

It seems that BSON can be smaller or larger than JSON, depending on the data: https://stackoverflow.com/questions/24114932/which-one-is-lighter-json-or-bson

I'm going to create a PR shortly to address this issue. What I'm seeing so far from the group is:

No objections to 16 MiB size, which is a reasonable default based on MongoDB.
Only issue is that the 16 MiB size in MongoDB is based on BSON, and we use JSON here in EDV, and the size is not guaranteed to be smaller... so having a 16 MiB limit for EDV may not play nicely with a MongoDB implementation.
10MiB would be a reasonable hedge

Please feel free to continue discussing, and let me know if there are any objections to a 10 MiB limit!

Please feel free to continue discussing, and let me know if there are any objections to a 10 MiB limit!

Your reasoning sounds solid to me, @DRK3 -- +1 to 10MiB limit.

The spec currently has a size limit on Structured Documents, but not on Encrypted Documents. I think this should be the other way around - the limit should be on the Encrypted Documents themselves, for a few reasons:

The Encrypted Document is the actual data that the EDV server will see, and therefore whatever storage implementation it uses will have to contend with that.
Encrypted Documents can be bigger than their corresponding Structured Document. A Structured Document that fits within a certain limit may be too big once it's packaged in an Encrypted Document. Perhaps this depends on the cipher used? Even with different ciphers, though, Encrypted Documents can have Encrypted Indexes defined in them, which also increases their size compared to the Structured Document.

(On a somewhat related point: since an EDV server never sees the unencrypted data (AKA Structured Document), technically I think nothing really forces you to use Structured Documents in the first place since the server won't know the difference, which begs the question: why do Structured Documents exist? I made an issue about this awhile ago: https://github.com/decentralized-identity/edv-spec/issues/32)

why do Structured Documents exist?

Structured Documents exist because the client needs to know what to expect when decrypting the encrypted document, and needs to be able to encrypt documents in a way that other clients will be able to read. For example, for streams, you need to be able to encode the chunks, media type, and each chunk location in the EDV. You have to encode that information /somewhere/, and the Structured Document is that /somewhere/. The Structured Document is also has a free-form (but hopefully well specified) metadata storage location in addition to the file content.
All this to say, we have Structured Documents because there has to be some place that we put file metadata and content.

@msporny Makes sense! Thanks for explaining it to me.
What do you think about having the 10 MiB limit be on the Encrypted Document size, rather than the Structured Document size? (for the reasons listed in https://github.com/decentralized-identity/edv-spec/issues/22#issuecomment-874344802)

What do you think about having the 10 MiB limit be on the Encrypted Document size, rather than the Structured Document size? (for the reasons listed in #22 (comment))

Yes, +1 for the 10 MiB limit to be on the Encrypted Document size.

Yes, +1 for the 10 MiB limit to be on the Encrypted Document size.

Yes, this was always the intent, so if the spec says otherwise it's just a typo.


Fix Empty examples are shown on several reference pages

resolves #559
Changes
Corrected separator strings in some reference page examples.

Thanks for making these changes! The ones in the en/ folder get automatically generated when we run npm run build:reference, which pulls in the contents from the p5.js repo. If we want the changes to stick around, I think we'll have to do them automatically in the build script. Maybe we can edit that to automatically apply the formatting changes here?
The conversion from the JSON data to the mdx file happens here, I believe: https://github.com/processing/p5.js-website/blob/df3d65019dafc24e54e8cb429cc9e38b1618c230/src/scripts/builders/reference.ts#L237

@davepagurek
Thank you for letting us know that the English version will be converted and about the generator.
I have re-examined it:
The blank line at the end of the example in the function document in the p5.js source code seems to cause this problem.
e.g. line function's example
https://github.com/processing/p5.js/blob/main/src/core/shape/2d_primitives.js
line:702 empty row
 * </div>
 *
 */

This problem can be solved by removing the blank line in the p5.js source code.
However, even if we fix it, there is a possibility that these blank lines will reappear in the future.
So, I thought of a way to remove the last blank line in the website-side generator that you advised.
I will create PR.

If #561 is merged, this pull request is unnecessary and I have withdrawn it.
see: https://github.com/processing/p5.js-website/pull/561#issuecomment-2400174513


Non-monotonic graphs

When there are extremely sharp corners in the graph, it can be non-monotonic (probably due to line smoothing). For example, on Vashon:

We've seen the same behavior on the graphs for the Boston network (though
it's less dramatic).  The pointEstimates displayed with the mouseover are
monotonic, so it does seem to be the line smoothing.
Anson Stewart
On Wed, Apr 15, 2015 at 11:30 AM, Matthew Wigginton Conway <
<EMAIL_ADDRESS>wrote:

When there are extremely sharp corners in the graph, it can be
non-monotonic (probably due to line smoothing). For example, on Vashon:
[image: screenshot from 2015-04-15 11 30 03]
https://cloud.githubusercontent.com/assets/566958/7162472/cb77fe82-e362-11e4-80db-270173591752.png
—
Reply to this email directly or view it on GitHub
https://github.com/conveyal/analyst-server/issues/91.

This should fix this issue: https://github.com/mozilla/metrics-graphics/wiki/Graphic#interpolate_tension


[FireFox] Input with type='number' allows to enter letters v6.0.2

Hello Erik,
I have tried version 6.0.2.
In the code I have:
 <Field name="age" type="number" component={renderField} label="Age" />
where:
`const renderField = ({ input, label, type, meta: { touched, error } }) =>

{label}

      {touched && error && {error}}

;`
The problem is that I can enter letters into such field in FireFox 48, Ubuntu.
In Chrome works fine.

Why did you decide that this is a problem in this library? Restricting character input makes chrome instead redux-form. You can create html with number input and open it in Chrome and Firefox and test.

Yes, that's right. But when I type letters into input type="number" I can't get into validate() method.

You can use normalization for Firefox like here http://redux-form.com/6.0.2/examples/normalizing/.

Normalizing doesn't seem to help here because even though Firefox displays non-numeric characters in number inputs, it doesn't actually change the value of the DOM node, so Redux Form has nothing to work with. Oddly enough, I do see the redux-form/CHANGE action getting dispatched every time I type a letter into a number input, but the value doesn't actually change.
The only way I am able to force a number in Firefox is to use a default input (or type="text") and then use a normalizing function. But by doing that I lose out on the number keyboard coming up on mobile. I don't think this is Redux Form's problem, but it certainly is a conundrum.

Guys here are right.
No business of ours, unfortunately the only way around this issue makes mobile UX worse, as @garrettn initially documented.