Re-use blocks from the old state when the state version changes

Scheduling
This change is only useful when the Zebra state version changes, which will probably be ZSA asset indexes.
Motivation
When Zebra's state version changes, we delete the old state version, and re-download and re-verify all the blocks from genesis.
But the Zcash blockchain will soon be over 200 GB in size. If multiple Zebra instances try to re-download the whole chain at the same time, this could overload the Zcash network, or make it very slow.
Designs

Open the old database read-only using the current state code, ignoring missing column families
Try to read blocks from the old state into the syncer, rather than downloading them
If reading a block fails due to a state format error or a missing block, close and delete the old state, and start downloading blocks

This will add multiple syncing modes to Zebra, which will be tricky to test. So we should make it as simple as possible, and revert to the standard sync as soon as anything unexpected happens.

We decided to make compatible state version changes rather than re-loading the entire state.


Board Settings won't save

Hello,
gread work! Love to use TaskBoard since 1 week now.
I have noticed that the Board Settings - Show animations and Show Assignee on item card wont work.
My Workaround was to unkomment line 67 - 85 in board.html.
Would be nice to edit this in settings.
Thanks

What version of TaskBoard was this when you reported it?

I am using version 0.3.1

I remember having that problem. I think it was related to the database table not being updated as per https://github.com/kiswa/TaskBoard/issues/200#issuecomment-115648523.
It's tricky/subtle because there exists a table with that name and the columns look plausible, but they're actually entirely different than the ones in that comment.
iirc, once I had re-created that table and option rows for all users, saving worked fine.

Yes, if this was an upgrade, please see #200 to bring your tables up-to-date.
In the future, this will be automatic (if I have to change tables again).

Closing due to inactivity. If you still need help, comment and I'll re-open if needed.

got this error with a fresh v0.3.1 installation. solved it with a drop table option; and recreate like described in #200 but this issue needs definitely a fix. can't confirm the comment of bf-ckiendl above! after recreating the table saving is still not working.

500 error should be solvable by looking at your logs.
Not re-opening, as v0.3.1 is in statis at the moment. v1.0.0 (re-write branch) is nearing release.


deleting all topics

Need a simple way to remove all topics/subscribers/reset pubsub without stopping the interpreter.   Working in Pythonista which does not reset the interpreter when a script finishes.

Recently I added a clearTree() method on TopicManager. You would use it like this:
from pubsub import pub
pub.getDefaultTopicMgr().clearTree()

This will remove every topic and hence, every subscriber. I hope this helps!


Add analysis module

@gwaybio This is ready for review!

Just realized it might be useful to show well or plate for UMAP colors, which could indicate/disprove any plate/image effects on features. I will implement this and let you know when done.

I was just being thorough saving the UMAP coordinates (in case we wanted to analyze/visualize these differently). The publication-ready figures are accessible through the executed jupyter notebook html file. Should I also save the images in results/?
format_training_data.ipynb does not need to be executed in a specific order so I will remove the number prefix.

Should I also save the images in results/?

Probably. It wouldn't hurt.


added note about required roels

#561

@nenonix @JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@MSFTTracyP - PR has been copy edited and is ready for final review. This is based on issue #561
Thank you.
cc: @kenwith


Routes can be fully dynamic and discovered on a per request basis for hyper scale hosting

The current proxy routing design assumes all route data is available up front and can be loaded atomically into the route table. The EndpointDataSource routing model assumes this as well.
For more dynamically-configured services, we probably don't want to fetch the entire route table from the db, but instead have a pull and cache for each hostname model.
How can we lazy-load route, backend, and endpoint data on a per request basis?
Assume we're working with a discrete key like Host, not a complicated best-match scenario like Path, and little or no wildcard support (maybe wildcard subdomains but only for specific depths?).
@davidni is this a scenario you'd evaluated?
@rynowak can such a system work within routing, co-exist side by side routing, or would it completely replace routing?

My mental concept is that routing should be one of the steps in the pipeline. But I don't think we have talked enough about what that pipeline looks like. This kind of matches with the conversation today about:
a) The process being matching the host/path to a set of endpoints -> load balancing then picks the right one from that list, accounting for stickiness -> the connection is chosen from a pool, or a new one is created.
b) Passing of client cert information from the front end to workers as part of headers.
For Antares, I would expect to not use a config based route, and instead have a custom routing component. It would manage the connection to the DB and local cache, and return a set of candidate hosts to subsequent steps including the load balancer.

Here's the current flow:

Routes and their backends are loaded at startup and added to the central route table.
A request arrives, matched against the route table, and the proxy logic begins.
Routes are reloaded if the config changes.

Here's the flow I think we'd need:

No routes are loaded at startup
Per request a custom middleware checks the local route cache.

If there's no match then it checks the central database. Should it also do negative caching?

If there's a match it loads all of the Backend and Endpoint information.

If there's now a match in the cache the proxy logic begins.

There needs to be change notifications from the database to update items in the cache
There needs to be idle timeout eviction of routes and backends.

Components that likely need to be redesigned/replaced:

ReverseProxyConfigManager
IRouteManager
IProxyDynamicEndpointDataSource
DynamicConfigBuilder
IBackendsRepo
IRoutesRepo

Need updates:

IBackendManager - Needs idle timeout cleanup

Routing's implementation requires all of the path matching logic to be available synchronously. For anything that isn't path based you have full control including the ability to run async code.
You can ultimately just do special casing in routing with a catch-all route, and then you have full control.

You can ultimately just do special casing in routing with a catch-all route, and then you have full control.

At that point, why use routing at all?

Say we don’t use routing, what features would we end up re-implementing and is that worth it

Depends on how strong your db lookup key is. Of it's keyed by host and always unique then great. If you need to resolve a set and then find the closest match base on something like path then you'd need to reuse some routing mechanics.
Definitely need customer requirement to constrain this scenario or else it will quickly get out of hand.

can such a system work within routing, co-exist side by side routing, or would it completely replace routing?

The other thing that I'd mention here is that you don't have to use the routing middleware to use routing's concepts. The contract of the routing middleware is that it assigns an endpoint to the request, so it could be a different implementation and no one would care.

For more dynamically-configured services, we probably don't want to fetch the entire route table from the db, but instead have a pull and cache for each hostname model.

I guess what I want to know what's the hierarchy of data. Is hostname the first criteria to match, and then only after that we start processing other request-related properties.
Basically if you want to do lazy-loading you have to opinionated about what the boundaries are that are lazy. So whether or not the existing implementation does what you want depends a lot on those boundaries.

The contract of the routing middleware is that it assigns an endpoint to the request, so it could be a different implementation and no one would care.

Exactly, I expect a lazy load middleware to do it's own routing and assign an endpoint, but the rest of the pipeline remains the same.

Do we really need to redesign routing to lazily load routes on a per-hostname basis?
Or would we consider this an advanced enough scenario to require some custom code at the beginning of the middleware pipeline that checks the host name, and sees if non-expired routes are already cached for the hostname.  If not, it could delay the rest of the pipeline until the routes are configured.

I go with @Tratcher - in this case its a complete replacement of the routing module. It does its own thing and returns the endpoints for loadbalancing etc to work on.
It would be nice (low pri) if it needs to do sub-routes based on path to be able to have sub-instances of route tables - but that wouldn't be something config needs to be able to express.

Or would we consider this an advanced enough scenario to require some custom code at the beginning of the middleware pipeline that checks the host name, and sees if non-expired routes are already cached for the hostname? If there are no valid routes, it could delay the rest of the pipeline until the routes are loaded.

That's pretty much the component I'm talking about. By the time it's done the work to load the route or to check that the route is already loaded, actually running routing is redundant, it can already assign the resulting endpoint.

This customer had an interesting example for dynamic routes: https://github.com/microsoft/reverse-proxy/issues/45#issuecomment-628753157
Summary: They routing is based on tenant, but the tenant id is determined through some combination of values in the request path, headers, query, etc.. They'd need to write code to compute this, but then the rest of the pipeline should be fairly standard to load balance and proxy the request.

This customer had an interesting example for dynamic routes: #45 (comment)
Summary: They routing is based on tenant, but the tenant id is determined through some combination of values in the request path, headers, query, etc.. They'd need to write code to compute this, but then the rest of the pipeline should be fairly standard to load balance and proxy the request.

Our exact use case.

This is a must have feature and really the only reason to use this vs some existing proxy server.  I want to run arbitrary .NET code for at runtime for lookups.

This customer had an interesting example for dynamic routes: #45 (comment)
Summary: They routing is based on tenant, but the tenant id is determined through some combination of values in the request path, headers, query, etc.. They'd need to write code to compute this, but then the rest of the pipeline should be fairly standard to load balance and proxy the request.

The second bit of our scenario is that, once we dynamically determine the route key ( tenant id) we then also have to dynamically determine the destination. Our tenants are eligible to go to 1 of N endpoints at any given time, and we need to write custom code to select one on each request.

Use custom code to select the back-end destination endpoint based on that routing key

What kind of criteria are used for this selection? Load, health, affinity?

Custom state that we store. Tenant's are bound to a specific backend-endpoint at any given point in time. That binding may change in the event of a failover.

Some industrious folks have come up with an alternate design that defines one catch-all route, one cluster, and a custom proxy middleware that dynamically selects the destination(s) based on their own criteria (similar to how session affinity or load balancing work).
Pros:

Works with todays object model
Relatively simple to implement
It can compose with other middleware like load balancing

Cons:

Limited routing composition, it may conflict with other endpoints in your app
You're limited to one route and cluster, and therefor one set of options.
It still assumes all the destinations list is fully loaded. We were able to work around this by creating destinations on the fly with a few tweaks to the object model.

Fully dynamic destinations don't work well with health checks or circuit breakers.

Round robin load balancing doesn't work well here, that state is per cluster and assumes a somewhat stable list of destinations.

It still assumes all the destinations list is fully loaded. We were able to work around this by creating destinations on the fly with a few tweaks to the object model.

Fully dynamic destinations don't work well with health checks or circuit breakers.

Round robin load balancing doesn't work well here, that state is per cluster and assumes a somewhat stable list of destinations.
Where is the round-robin data stored - I wonder if for this case, you could take the list of destinations, sort and then create a hash that would be constant for that list, and key the round robin seed off that?

Note for triage: We've addressed most of the partner asks here via https://microsoft.github.io/reverse-proxy/articles/direct-proxying.html.

Note for triage: We've addressed most of the partner asks here via https://microsoft.github.io/reverse-proxy/articles/direct-proxying.html.

Triage: IHttpProxy solved it. Closing.


Rule definition should indicate rule configurability

With https://github.com/kubeshop/monokle-core/pull/373 and then https://github.com/kubeshop/monokle-core/pull/387 we have rules configurability and real use case where such rules are used.
The configuration is done through optional configuration element (2nd element of rule definition array):
rules:
  practices/high-available: ["err", 5]

The issue is that rule definition does not provide any flag/data on configurability, meaning any integration with validation plugin with such rules would need to either guess or have rule ids hard-coded to handle those case and to provide resonable UI/integration.
My proposal would be to at least provide a flag in rule definition, stating if rule can be configured. It would be nice to also have field describing what type of data is expected (be it string, number or any kind of list) so that integrating system can provide proper UI for configuration.

Rule definition:
https://github.com/kubeshop/monokle-core/blob/86651f6f046a61a5cd75dc8a11e418a45830dba5/packages/validation/src/common/sarif.ts#L95-L117
https://github.com/kubeshop/monokle-core/blob/86651f6f046a61a5cd75dc8a11e418a45830dba5/packages/validation/src/common/sarif.ts#L140-L169

After some thinking, for any UI to be build from configurable rules, it will be good to have:

indication saying that rule is configurable
expected input type
input name - like Expected name, Expected labels, Number of replicas, etc, sometimes it can be assumed from rule definition but it might be confusing
default input - to always be aligned with expected type and also to not to hardcode it in rule code

So that could look like:
export type RuleMetadata<TProperties = {}> = {
  id: string;
  name: string;
  ...;
  configurability: {
    type: string; // or enum like ('number', 'string', 'string[]', 'number[]')
    name: string;
    defaultValue?: number | string | string[] | number[]; // (should be aligned with allowed `type` values)
  }
}

Not sure about configurability key name, but we already have defaultConfiguration (and configuration after rules are processed).
For type probably we can use string describing type. I think trying to type this with TS types and e.g. generics will be more cumbersome to implement and then use.
Based on the setting above, a configuration UI can be created which has configuration name for user clarity, knows what type of input control to render and can fill it up with default values.


chore(templates): update tsconfig

recommended by typescript https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames

Closes: #

[ ] Docs
[ ] Tests

Testing Strategy:

@mcansh Maybe it's a good idea to do this PR against dev?
That way these changes will be available as soon as the next release is cut (that will include changes from #2961).

@mcansh Maybe it's a good idea to do this PR against dev?
That way these changes will be available as soon as the next release is cut (that will include changes from #2961).

if we merge to main they'll be ready asap whenever someone runs create-remix

what do you mean by "not checked against"?


Typo

closes https://github.com/MicrosoftDocs/Viva/issues/595

@bhaswatic
PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

@bhaswatic
PR has been copyedited and is ready for final review, could you please check and merge? Thanks!

file was moved.


BootStrapper - Attachble property not found in common & no InitializeComponent method

I seem to be having a very similar issue that was raised previously. The issue #5 is very similar to what I'am seeing.
I started with a Blank Universal App and then started building out my solution based on the Hamburger\Minimal template.
Setup:
Windows 10
Visual Studio 2015 Update 1
Template10 nuget package 1.1.2

I have tried re-installing Visual studio and also used a different Windows 10 machine and the same results occurred. I'm sure I could be missing something but maybe not an issue with Template10 but rather Visual Studio??
Any thoughts or anyone else seeing this type of error?

@LanceEa here are options:

Ensure PacMan is enabled
Refresh your project

Package manager was already enabled for restore on builds and I have tried to clean solution, rebuild and build solution but nothing seems to work. Also, closed out of Visual Studio and restarted computer but same error persists.  Other thoughts?

@JerryNixon btw...forgot to say thanks for the initial ideas.

I am now having the EXACT same problem and any help is GREATLY appreciated...
Here is how I encounter the problem: I create a new or open a saved pristine, untouched Template 10 Hamburger project. I get the "stuff missing" alert and have 2 warning messages and no errors. I rebuild the project and the warning messages disappear, and there are no error messages. (Package Manager is enabled).
When I open this project's file App.xaml, two errors appear:
The name "BootStrapper" does not exist in the namespace "using:Template10.Common".
The member "Resources" is not recognized or is not accessible.
My system status: Package Manager is enabled, and I have used it to reinstall Template 10, v1.18. Restarted my computer and VS2015. VS2015 Updates are pending for SQL {something) and ASP.NET {something}. I don't recall seeing this problem prior to installing Windows 10 SDK 10.0.26624 a day ago. Oddly, Control Panel now shows VS2015 with Update 2 installed on the same day. A bit odd, considering VS2016 reports itself as Update 3. Hmmmmm...
Here is what VS2015 reports about itself on my system:
Microsoft Visual Studio Community 2015
Version 14.0.25424.00 Update 3
Microsoft .NET Framework
Version 4.6.01038
Visual C# 2015
Microsoft Visual C# 2015
Visual C++ 2015
Microsoft Visual C++ 2015
Windows Phone SDK 8.0 - ENU
Application Insights Tools for Visual Studio Package   7.1.00719.1
ASP.NET and Web Tools 2015 (RC1 Update 1)   14.1.20203.0
ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
Azure App Service Tools v2.9.1   14.0.20519.0
Azure Data Lake Node   1.0
Azure Data Lake Tools for Visual Studio   2.0.6000.0
Common Azure Tools   1.8
JavaScript Project System   2.0
Microsoft Azure HDInsight HQL Service   2.0.6000.0
Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40518.2
NuGet Package Manager   3.4.4
PreEmptive Analytics Visualizer   1.2
SQL Server Data Tools   14.0.60519.0
ToolWindowHostedEditor   1.0
TypeScript   <IP_ADDRESS>
Visual Studio Tools for Universal Windows Apps   14.0.25420.01
Thanks in advance for any thought or suggestions to resolve this matter...

There are updates for VS only found when you go to Programs and Features and using Modify option after change has been clicked with VS selected...

Per mvermef, I upgraded from 1.4.0 to 1.4.1 of Universal Windows App Dev Tools and (for the moment) things seem to be working. Thank you for pointing me in the right direction...
At this point this still feels like not knowing if your car I going to start in the morning...hope it gets better...

What really sucks is they are suppose to "use" notifications to tell you there is an update, most of the time they are weeks behind and you get it even after you have already updated to the latest SDK


Add gulp test task

Add gulp test task
Description

Most importantly, gulp test now runs those ES6 jasmine specs.
Switches default task from serve to build and test
Removes karma
Removes test.html
Updates test instructions in README
Adds test to package.json scripts

Test

If the build passes, it's good to merge.

@nateabele I noticed that you deleted src/config.js from PR.js. Can jspm work without a config.js? Without it, jspm install fails, but if I use jspm install -y, it not only installs the jspm packages, but it also creates a new config.js. What's going on?
FWIW, this doesn't affect gulp test. The tests run and pass with or without jspm install.
For the time being, I removed jspm install from the Travis script so that it passes. But I can't help but think jspm should be included in Travis.

I noticed that you deleted src/config.js from PR.js.

That was inadvertent. I think I meant to move it to the repo root.

But I can't help but think jspm should be included in Travis.

Yes, it should.

Well, how does this sound?
(1) I'll generate a config.js & commit it.
(2) I'll put jspm install back into Travis.

Well, that would break the app. Currently there are only tests against the parsers and validators, not the UI code, which is why the tests still pass without installing JSPM packages. You can just put back the one I had (save for the jasmine references, which were only for test.html).

OK, this should be good to merge.

The commit history is much longer & messier than I'd like. I'm going to create a new epic branch (gulp-novicepiece) and cherry-pick the important commits onto it.


Understand why react can run just one js and maybe understand the best practice to include js code

Provide a detailed description of this problem encountered making research about it. Why does react behave that only one js can be executed? How to solve this? Maybe say the best practice to include js vanilla code

https://www.notion.so/Task-23-33526329847846ecb38195824a41aa74


[Docs] Add tooltip to docs examples code icon

Realised we can simply use the icon button tooltip, rather than implementing the internal tooltip component for the entire title-bar.

Fixed. Incidentally - what's the preferred way to run eslint on the docs site? Thanks.

@mbrookes If you run npm run lint at the root of material-ui, it should run it for src and docs.
Also, out of curiosity, what editor do you use? ESLint has a lot of support for editors and IDEs. I use Sublime and the ESlint support works awesome.

Ah, okay - I was expecting to have to run it in the docs directory. I'm using webstorm - and just realised it has eslint support, but turned off. It's on now!

Prepare for your life to change :smile:


how to build

cabal install distributed-process-simplelocalnet-<IP_ADDRESS>
cabal install distributed-process-0.5.5
cabal install distributed-static-<IP_ADDRESS>
cabal install network-transport-tcp-0.4.2
cabal install network-transport-<IP_ADDRESS>   -- can not install
cabal install rank1dynamic-<IP_ADDRESS>
cabal install cloud-haskell-<IP_ADDRESS>
i use the Main.hs code in
http://haskell-distributed.github.io/tutorials/1ch.html#creating-a-node
import Control.Concurrent (threadDelay)
import Control.Monad (forever)
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.TCP (createTransport, defaultTCPParameters)
replyBack :: (ProcessId, String) -> Process ()
replyBack (sender, msg) = send sender msg
logMessage :: String -> Process ()
logMessage msg = say $ "handling " ++ msg
main :: IO ()
main = do
Right t <- createTransport "<IP_ADDRESS>" "10501" defaultTCPParameters
node <- newLocalNode t initRemoteTable
runProcess node $ do
-- Spawn another worker on the local node
echoPid <- spawnLocal $ forever $ do
-- Test our matches in order against each message in the queue
receiveWait [match logMessage, match replyBack]
-- The `say` function sends a message to a process registered as "logger".
-- By default, this process simply loops through its mailbox and sends
-- any received log message strings it finds to stderr.

say "send some messages!"

  Nothing  -> die "nothing came back!"
  Just s -> say $ "got " ++ s ++ " back!"

root@ubuntu:~/cluster# ls
app  cluster.cabal  LICENSE  Setup.hs  src  stack.yaml  test
root@ubuntu:~/cluster# stack build
[1 of 1] Compiling Main             ( /tmp/stack21101/Setup.hs, /tmp/stack21101/Setup.o )
Linking /root/.stack/setup-exe-cache/x86_64-linux/tmp-setup-Simple-Cabal-<IP_ADDRESS>-ghc-7.10.3 ...
cluster-<IP_ADDRESS>: configure
Configuring cluster-<IP_ADDRESS>...
cluster-<IP_ADDRESS>: build
Preprocessing library cluster-<IP_ADDRESS>...
[1 of 1] Compiling Lib              ( src/Lib.hs, .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/Lib.o )
In-place registering cluster-<IP_ADDRESS>...
Preprocessing executable 'cluster-exe' for cluster-<IP_ADDRESS>...
/root/cluster/app/Main.hs:3:8:
Could not find module ‘Control.Distributed.Process’
Use -v to see a list of the files searched for.
/root/cluster/app/Main.hs:4:8:
Could not find module ‘Control.Distributed.Process.Node’
Use -v to see a list of the files searched for.
/root/cluster/app/Main.hs:5:8:
Could not find module ‘Network.Transport.TCP’
Use -v to see a list of the files searched for.
--  While building package cluster-<IP_ADDRESS> using:
/root/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-<IP_ADDRESS>-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS> build lib:cluster exe:cluster-exe --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1

@hoyeunglee, note that stack cannot see the packages that you have installed with cabal. I don't have the contents of the file cluster.cabal. Adding distributed-process and network-transport-tcp to the dependencies may fix it.

Please, reopen if there are still build problems.


Implement System Environment Extension

This commit implements the System Environment Extensions. With some extension functions and a listener, this commit enables System Environment Override by users, something only possible via reflection.
An special attention is needed to the system environments, as they're susceptible to race conditions. This was specified in the documentations.
This commit also fixes a small issue with SystemProperties extension, in which they wouldn't accept a suspended function. A test for that behavior was added.
This commit also renames the tests package, to stop stacktrace filtering, so that the error is clear whenever one of these tests fail.
Implements #623

@sksamuel
Initial implementation. Tell me what you think about it so far

If we don't let them suspend, we won't be able to use them in tests. I caught this scenario when trying to write ShouldSpec. Could you give me an example of what what would be a bad case to use it this way?
In ShouldSpec I tried something like:
"Foo" {
    withEnvironment("Boo", "Bar") {
        should("FAR") {

        }
    }
}

I use them inside the tests, not outside.

Try doing, collections.forEach { withSysProp { ... } }

What if we make them inline?
Similar to how  it is for shouldThrowAny and similars?

If you have a suspend function, and you pass it into a non suspend lambda, the compiler can't reason about when it will be executed. Even if the lambda is currently inside a coroutine scope, there's no saying when that lambda will be invoked.

I don't understand ?

Look at the implementation of shouldThrow. It uses inline and enables
suspended functions, because they are inlined inside another suspend
function.
Maybe we can do the same with extensions? I'll test it
Em sex, 1 de fev de 2019 22:19, Stephen Samuel<EMAIL_ADDRESS>escreveu:

I don't understand ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kotlintest/kotlintest/pull/633#issuecomment-459912225,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABgRIx--byIC-DxM7clg7FDZdCk5vS0Aks5vJNmrgaJpZM4afGOb
.

Oh I see. Clever.
On Sat, 2 Feb 2019 at 00:30, Leonardo Colman Lopes<EMAIL_ADDRESS>wrote:

Look at the implementation of shouldThrow. It uses inline and enables
suspended functions, because they are inlined inside another suspend
function.
Maybe we can do the same with extensions? I'll test it
Em sex, 1 de fev de 2019 22:19, Stephen Samuel<EMAIL_ADDRESS>escreveu:

I don't understand ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/kotlintest/kotlintest/pull/633#issuecomment-459912225>,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/ABgRIx--byIC-DxM7clg7FDZdCk5vS0Aks5vJNmrgaJpZM4afGOb
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kotlintest/kotlintest/pull/633#issuecomment-459914167,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAtZGpJHxEK8nczE9sLOpeVNcumYtr5Rks5vJNw6gaJpZM4afGOb
.

@sksamuel I think this is the version I'm comfortable with.

I'm trying to verify why app veyor is failing. I think it's resetting my environment

@sksamuel
One thing I"m in doubt:
Do we need a version for each scope? I was thinking that maybe TestLevel would suffice, as it can also be used in ProjectLevel.
Ok, the function will be called more times than it should, but this will avoid confusion, no?

(This is the reason I didn't add the others)

@sksamuel SystemEnvironmentProjectListener added. However, I have no idea how to test it.

In the past I've done this by making a new sub module. Like I did for parallelisation.

I don't know if there's a problem to dirty context with a very specific variable tho... For instance, just a foo  in the system environment.
Do you think it's too much of an issue?

I added the test while dirtying the context.
Tell me if you're too much against it, and I'll create a module if necessary.

Oh, I just saw that you said this test is not completely necessary. I'll remove it, as I believe that this kind of behavior was already tested in the other functions, and project listener execution is also already tested.

@sksamuel
Are you ok with these changes now?

Yes looks good.
On Tue, 12 Feb 2019 at 13:04, Leonardo Colman Lopes <
<EMAIL_ADDRESS>wrote:

@sksamuel https://github.com/sksamuel
Are you ok with these changes now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kotlintest/kotlintest/pull/633#issuecomment-462751157,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAtZGjngbYPfg2nzIoRbA1KLYnXuJ76iks5vMrvjgaJpZM4afGOb
.

Great. Merging this and doing the same to SecurityManager extension


Keep spaces around quoted values

This should resolve issue #19

This is some fine work ;-)
I think this patch would benefit if you add a unittest to underline the expected changes and prevent regression. Can you do this ?

The current tests don't seem to facilitate this, From what i can tell most of the tests use generated data, this change is in the parser. The tests that actually do load files are just checking if they return null. Since this change doesn't affect what files loads, but how they load, the current methodology wouldn't catch it.
I'd like to know where a test like this (where i have to check specific loaded data from a file) should be placed.

I've made the unittest that show the bug, can you integrate it to your PR ? (feel free to improve it of course ^^)
diff --git a/test/test_iniparser.c b/test/test_iniparser.c
index e207554..5ae34e1 100644
--- a/test/test_iniparser.c
+++ b/test/test_iniparser.c
@@ -498,6 +498,10 @@ void Test_iniparser_line(CuTest *tc)
     CuAssertIntEquals(tc, LINE_COMMENT, iniparser_line(";comment", section, key, val));
     CuAssertIntEquals(tc, LINE_COMMENT, iniparser_line(" # comment", section, key, val));

+    CuAssertIntEquals(tc, LINE_VALUE, iniparser_line("key = \"  do_not_strip  \"", section, key, val));
+    CuAssertStrEquals(tc, "key", key);
+    CuAssertStrEquals(tc, "  do_not_strip  ", val);
+
     /* Test syntax error */
     CuAssertIntEquals(tc, LINE_ERROR, iniparser_line("empty_value", section, key, val));
     CuAssertIntEquals(tc, LINE_ERROR, iniparser_line("not finished\\", section, key, val));

That should be apply the patch!

aaaand merged ! good work :+1:


Bugs in accountant

[x] chart of accounts
[x] remove account code column from listing page

[x] ledger created under account group must display under that group itself while selecting paid through account and deposit to account under sales and purchase

[x] texts are getting overlapped under the listing page in charts of accounts

issue fixed !


How can I perform an upsert without breaking foreign key relationship with CASCADE onDelete action?

When insert mode is InsertOrReplace, it increments ID of the database row and thus breaking foreign key relation. Can an entry be saved in database without deleting old one and inserting new one? Only columns with different values must be updated.

Yes! It sounds like you want an UPSERT, which is supported in recent sqlite3 version and drift. You can use insertOnConflictUpdate to replace existing rows without changing the rowid.


Fix failures lint failures

Travis fails checks in https://github.com/babel/babylon/pull/54 due to linter expecting double quotes.

And thanks for fixing this.

Thanks for the PR! I just saw the Travis result and updated. It's my fault for being lazy and running ava test directly instead of npm test. Force pushed to this branch (not sure how babylon feels about stacked commits) so hopefully the tests will pass now :)


Allow @API annotation for packages

Sometimes a whole package could profit of an API annotation.  Please add ElementType.PACKAGE as allowed target.

This was done in #20 and released in 1.1.1

This was done in #20 and released in 1.1.1

Duplicate of #19

Duplicate of #19


Propose new event, "Artifact.flagged"

Currently, an "artifact" has the following predicates: packaged, published, and signed.
In #143 - there is a discussion on adding

artifact.pulled
deleted
scanned

And in #144 - there is a discussion for adding

artifact.pushed

In this Issue, I'd like to propose adding another event, artifact.flagged.
Our use case
We run tests that create messages like testSuiteRun.finished and testSuiteRun.finished. These tests ultimately are intended to validate whether some other system-under-test is in a healthy state. When a test completes, we would like to post a message, saying that a given "artifact" has been "flagged" with a passing or failing test.
Alternatives
While, internally, we have been using the rather generic name of "flagged", for our purposes, it would be fine with us to go to a more granular level and have the message instead be "Artifact.tested".
Message details
Roughly, we envision something that has identifers for the artifact, and identifiers for the test with its associated status (failed/passed/etc...)

@dan-han-101 , this artifact.flagged event, do you think it is the same use case as the confidence label or maturity level terms I mentioned in my comment on this issue: https://github.com/cdevents/spec/issues/143#issuecomment-1840733305 ?

@e-backmark-ericsson - Yes, I think this issue is similar to a confidence label or maturity level .
I also saw someone mention artifact.quarantined - I think is close to what I was looking for.
I'm Ok to close this issue if existing issues already overlap. And I can just follow and add comments to the other ones.


[grpc][upb][re2] grpc v1.31.1

Describe the pull request

What does your PR fix? Updates to latest grpc library with updated dependencies.
Does your PR follow the maintainer guide? Yes.

Main library
grpc https://github.com/grpc/grpc/releases/tag/v1.31.1
Dependencies
Dependencies were updated based on bazel config for grpc:

upb: https://github.com/protocolbuffers/upb/commit/7338facddb8ce405fe7a0a52a6061a1e7c823279
re2: https://github.com/google/re2/releases/tag/2020-06-01

I have cloned vcpkg today
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
and tried
.\vcpkg\vcpkg install grpc:arm64-uwp
but I have
Error: Building package abseil:arm64-uwp failed with: BUILD_FAILED
Does it work for you?

Our CI currently does not test arm64_uwp; it does not work for me. See also https://github.com/microsoft/vcpkg/pull/12878


How can I add new dataset?

Thank you for your question!
To add a new dataset, please follow these steps:

Assign unique IDs to all users in the dataset, starting from 1 up to the total number of users.

The timestamp represents the elapsed time in seconds since the Unix epoch (January 1, 1970, 00:00:00 UTC). You can convert datetime information in the yy/mm/dd/tt format to timestamp values AS as described link: https://stackoverflow.com/questions/3694487/in-python-how-do-you-convert-seconds-since-epoch-to-a-datetime-object

If the dataset includes weight information, ensure that positive edges have positive weights, and negative edges have negative weights. If weight information is missing, assign a weight of 1 to positive edges and -1 to negative edges.

If you have any further questions, feel free to reach out!


Sprite GetTexture/SetTexture introduce Heap Corruption

This kills the game. Only present after the Textureman/RageTextureID changes.
To reproduce, repeatedly change a Sprite using GetTexture and then SetTexture with that texture obtained with the getter.
A few solutions have been given for this already, this issue is just to remind me to fix it before a release.
Solution 1: https://github.com/poco0317/etterna/commit/6c84be797d662a1ad0d1f31ead433713b5c4e9a4
Solution 2: https://github.com/poco0317/etterna/commit/b0b28bd8098cb5329696c13eab03c0c8bf4839d5
Relevant area:
https://github.com/etternagame/etterna/blob/66a8d52a1084c3c179223fc27e275952407bbfd5/src/Etterna/Actor/Base/Sprite.cpp#L1367-L1383

hacked 461695c1d217697992e00208982c0f0ea250d3a4


Atternativeto

Hello 👋
I have created a page for your app : https://alternativeto.net/software/ludusavi/
You can change anything wrong or complete if something is missing

Thanks, that looks great!


Scroll to specefic child position

Hello. How can I scroll to specific child position?

As I see, there is no special method for that logic
I think we can resolve it by adding a special method in the adapter
fun getGroupItemRealPosition(indexGroup: Int) : Int {
        var group = 0
        for (i in 0..itemCount) {
            if (getItemViewType(i) == ExpandableListPosition.GROUP) {
                group++
            }
            if (group > indexGroup) {
                return i
            }
        }
        return -1
    }

Use the result of that method to scroll to position by RecyclerView.scrollToPosition

Closing this as this library is deprecated: https://github.com/thoughtbot/expandable-recycler-view/pull/235


Some ideas from a ratatui issue

In https://github.com/ratatui-org/ratatui/issues/118#issuecomment-2282372712, I listed out the functionality of the list in https://github.com/sophacles/extra-widgets/tree/main and saw that there might be some ideas that could be worth implementing in this widget too. Perhaps some food for inspiration.

Hey @joshka,
thx a lot for the reference! separators and scroll padding sound interesting, I will give it a shot once I find some time (contributions are welcome ofc)
Long term it would be nice to bring the ideas from this crate and others together into ratatui, or ratatui community maintained crate :)

Scroll Padding is now supported in 0.12.2 🥳


Scoring two string inputs -- feature request and attempted implementation

I am trying to use an existing sockeye model (the monolingual ParaBank model from JHU and https://github.com/decompositional-semantics-initiative/ParaBank-rewriter) to score example input/output pairs that I have from a separate model and python/library. Due to constraints with this other program, it's a little too expensive to write each input/output pair to file, which is what is required when using the standard machinery in score.py (https://github.com/awslabs/sockeye/blob/master/sockeye/score.py).
Below is my attempt to rewrite score.py (let's call it score_string.py) that works from string input. When I run the following:
python score_string.py --model ~/third_party/ParaBank-rewriter/ --use-cpu --target tgt.txt --source src.txt --batch-size 1 (--target and --source are empty here for now).
 Introduced padding: source=95.0% target=94.0%)

Segmentation fault: 11

Stack trace returned 10 entries:
[bt] (0) 0   libmxnet.so                         0x0000000113e2d740 libmxnet.so + 26432
[bt] (1) 1   libmxnet.so                         0x0000000115963136 MXTVMBridge + 4585942
[bt] (2) 2   libsystem_platform.dylib            0x00007fff5f237f5a _sigtramp + 26
[bt] (3) 3   libmxnet.so                         0x00000001154a8eae MXNDListFree + 1442638
[bt] (4) 4   libmxnet.so                         0x0000000113e624ab libmxnet.so + 242859
[bt] (5) 5   libmxnet.so                         0x0000000113e61f49 libmxnet.so + 241481
[bt] (6) 6   libmxnet.so                         0x000000011538d605 MXNDListFree + 281253
[bt] (7) 7   libmxnet.so                         0x000000011535b218 MXNDListFree + 75448
[bt] (8) 8   libmxnet.so                         0x000000011535e321 MXNDListFree + 88001
[bt] (9) 9   libmxnet.so                         0x000000011535e23f MXNDListFree + 87775

Below is the full script:
import math
import argparse
import logging
import os
import time
from contextlib import ExitStack
from typing import Optional, List, Tuple, Iterable
from sockeye import arguments
from sockeye import constants as C
from sockeye import data_io
from sockeye import inference
from sockeye import model
from sockeye import scoring
from sockeye import utils
from sockeye import vocab
from sockeye.log import setup_main_logger
from sockeye.output_handler import get_output_handler
from sockeye.utils import check_condition
from sockeye.scoring import ScoringModel,Scorer
from sockeye.data_io import (
    RawParallelDatasetLoader,
    BatchedRawParallelSampleIter,
    BaseParallelSampleIter,
    SequenceReader,
    BucketBatchSize,
    tokens2ids
)
from sockeye.output_handler import OutputHandler
from sockeye.inference import TranslatorInput,TranslatorOutput

logger = logging.getLogger(__name__)

class SimpleSequenceReader(Iterable):
    def __init__(self,sinput,vocabulary,add_eos=False,add_bos=False):
        self.sinput = sinput
        self.vocabulary = vocabulary
        self.add_eos = add_eos
        self.add_bos = add_bos

        assert C.UNK_SYMBOL in vocabulary
        assert vocabulary[C.PAD_SYMBOL] == C.PAD_ID
        assert C.BOS_SYMBOL in vocabulary
        assert C.EOS_SYMBOL in vocabulary
        self.bos_id = vocabulary[C.BOS_SYMBOL]
        self.eos_id = vocabulary[C.EOS_SYMBOL]

    def __iter__(self):
        sequence = tokens2ids(self.sinput,self.vocabulary)
        if self.add_bos:
            sequence.insert(0, self.bos_id)
        if self.add_eos:
            sequence.append(self.eos_id)
        yield sequence

def create_sequence_readers(sources: List[str], target: List[str],
                            vocab_sources: List[vocab.Vocab],
                            vocab_target: vocab.Vocab) -> Tuple[List[SequenceReader], SequenceReader]:
    """
    Create source readers with EOS and target readers with BOS.

    :param sources: The file names of source data and factors.
    :param target: The file name of the target data.
    :param vocab_sources: The source vocabularies.
    :param vocab_target: The target vocabularies.
    :return: The source sequence readers and the target reader.
    """
    source_sequence_readers = [SimpleSequenceReader(sources,vocab_sources[0],add_eos=True)] ## SEE ABOVE
    target_sequence_reader = SimpleSequenceReader(target,vocab_target,add_bos=True) ## SEE ABOVE
    return source_sequence_readers, target_sequence_reader

##################################################
# ## CUSTOM TYPE OF BATCHEDRAWPARALLELSAMPLEITER #
##################################################

class StringDataInput(BatchedRawParallelSampleIter):
    """A simplified version of the raw parallel sampler that simply takes two string inputs"""
    def __init__(self,data_loader,
                     sources,
                     target,
                     source_vocabs,
                     target_vocab,
                     bucket,
                     batch_size,
                     max_lens,
                     num_factors=1,
                     source_data_name=C.SOURCE_NAME,
                     target_data_name=C.TARGET_NAME,
                     label_name=C.TARGET_LABEL_NAME,
                     dtype='float32'
     ):
        BaseParallelSampleIter.__init__(self,buckets=[bucket], batch_size=batch_size, bucket_batch_sizes=[BucketBatchSize(bucket, batch_size, None)],
                         source_data_name=source_data_name, target_data_name=target_data_name,
                            label_name=label_name, num_factors=num_factors, permute=False, dtype=dtype)
        self.data_loader = data_loader
        self.sources_sentences,self.target_sentences =  create_sequence_readers(sources,target,source_vocabs,target_vocab) #SEE ABOVE
        self.sources_iters = [iter(s) for s in self.sources_sentences]
        self.target_iter = iter(self.target_sentences)
        self.max_len_source, self.max_len_target = max_lens
        self.next_batch = None
        self.sentno = 1

class SockeyeScorer(Scorer):
    """A seq2seq model based on sockeye"""
    def __init__(self,model: ScoringModel,
                 source_vocabs: List[vocab.Vocab],
                 target_vocab: vocab.Vocab) -> None:
        Scorer.__init__(self,model,source_vocabs,target_vocab)

        ## keeps the original vocabulary around to build data in string scorer
        self.orig_source_vocab = source_vocabs
        self.orig_target_vocab = target_vocab

    def string_scorer(self,src,target):
        """Redefined the scoring function

        :param src: the source text
        :param target: the target text
        """
        left_side = src.split()
        right_side = target.split()

        ## custom bucket size
        bucket = (100,100)

        #######################################
        # ON-THE-FLY DATA CREATE FROM STRINGS #
        #######################################

        data_loader = RawParallelDatasetLoader(buckets=[bucket],
                                           eos_id=self.orig_target_vocab[C.EOS_SYMBOL],
                                           pad_id=C.PAD_ID,
                                           skip_blanks=False)

        # special score iterator that builds from strings as opposed to from file

        score_iter = StringDataInput(data_loader=data_loader,
                                           sources=left_side,
                                           target=right_side,
                                           source_vocabs=self.orig_source_vocab,
                                           target_vocab=self.orig_target_vocab,
                                           bucket=bucket,
                                           batch_size=1,
                                           max_lens=(100,100),
                                           #num_factors=0
                                           )

        ## standard run through batch=1
        for batch_no,batch in enumerate(score_iter):

            ## attempt at scoring
            scores = self.model.run(batch)[0] ## raises seg fault and occasionally other errors

def get_data_iters_and_vocabs(args: argparse.Namespace,
                              model_folder: Optional[str]) -> Tuple['data_io.BaseParallelSampleIter',
                                                                    List[vocab.Vocab], vocab.Vocab, model.ModelConfig]:
    """
    Loads the data iterators and vocabularies.

    :param args: Arguments as returned by argparse.
    :param model_folder: Output folder.
    :return: The scoring data iterator as well as the source and target vocabularies.
    """

    ####################################################################
    # SAME AS IN ORIGINAL, IN THIS CONTEXT USED TO CREATE VOCABULARIES #
    ####################################################################

    model_config = model.SockeyeModel.load_config(os.path.join(args.model, C.CONFIG_NAME))

    if args.max_seq_len is None:
        max_seq_len_source = model_config.config_data.max_seq_len_source
        max_seq_len_target = model_config.config_data.max_seq_len_target
    else:
        max_seq_len_source, max_seq_len_target = args.max_seq_len

    batch_num_devices = 1 if args.use_cpu else sum(-di if di < 0 else 1 for di in args.device_ids)

    # Load the existing vocabs created when starting the training run.
    source_vocabs = vocab.load_source_vocabs(model_folder)
    target_vocab = vocab.load_target_vocab(model_folder)

    sources = [args.source] + args.source_factors
    sources = [str(os.path.abspath(source)) for source in sources]

    score_iter = data_io.get_scoring_data_iters(
        sources=sources,
        target=os.path.abspath(args.target),
        source_vocabs=source_vocabs,
        target_vocab=target_vocab,
        batch_size=args.batch_size,
        batch_num_devices=batch_num_devices,
        max_seq_len_source=max_seq_len_source,
        max_seq_len_target=max_seq_len_target)

    return score_iter, source_vocabs, target_vocab, model_config

def score(args: argparse.Namespace):

    setup_main_logger(file_logging=False, console=not args.quiet)

    utils.log_basic_info(args)

    with ExitStack() as exit_stack:

        ####################################
        # SAME AS IN ORIGINAL SCORE SCRIPT #
        ####################################

        context = utils.determine_context(device_ids=args.device_ids,
                                          use_cpu=args.use_cpu,
                                          disable_device_locking=args.disable_device_locking,
                                          lock_dir=args.lock_dir,
                                          exit_stack=exit_stack)
        if args.batch_type == C.BATCH_TYPE_SENTENCE:
            check_condition(args.batch_size % len(context) == 0, "When using multiple devices the batch size must be "
                                                                 "divisible by the number of devices. Choose a batch "
                                                                 "size that is a multiple of %d." % len(context))
        logger.info("Scoring Device(s): %s", ", ".join(str(c) for c in context))

        args.no_bucketing = True
        args.bucket_width = 10

        score_iter, source_vocabs, target_vocab, model_config = get_data_iters_and_vocabs(
            args=args,
            model_folder=args.model)

        scoring_model = ScoringModel(config=model_config,
                                             model_dir=args.model,
                                             context=context,
                                             provide_data=score_iter.provide_data,
                                             provide_label=score_iter.provide_label,
                                             default_bucket_key=score_iter.default_bucket_key,
                                             score_type=args.score_type,
                                             length_penalty=inference.LengthPenalty(alpha=args.length_penalty_alpha,
                                                                                beta=args.length_penalty_beta),
                                             softmax_temperature=args.softmax_temperature)

        ######################
        # NEW SCORING MODEL  #
        ######################

        ## call to new sockeye scorer model defined above
        scorer = SockeyeScorer(scoring_model,source_vocabs,target_vocab)
        ## call to new string function
        scorer.string_scorer("this is my sentence","this is the second sentence")

def main():
    params = arguments.ConfigArgumentParser(description='Score data with an existing model.')
    arguments.add_score_cli_args(params)
    args = params.parse_args()
    setup_main_logger(file_logging=False, console=True, level=args.loglevel)  # pylint: disable=no-member
    score(args)

if __name__ == "__main__":
    main()

The important part is the new class SockeyeScorer defined at the top with the method string_scorer, which relies on variations of the standard data readers that operate from file input.
I realize this is a bit of a mess, and I am happy to elaborate on details as needed. Those familiar with the score.py script should be able to see what's going on, and I'm wondering if there is something obvious that I should be doing/not doing (when I compare the score_iter instance that my version creates, it looks identical to that in the original scoring script).
In general, it would be great to add functionality to score that allows for scoring from string input/output rather than having to build these rather elaborate data readers from file.
For background, I'm running this in conda on a Mac using Sockey 1.18.85 as per the requirements for ParaBank here: https://github.com/decompositional-semantics-initiative/ParaBank-rewriter/blob/master/requirement.txt .

The easiest way as I see it is to create a special class STDINSequenceReader that extends SequenceReader, which will then split lines from sys.stdin on [TAB], returning (source, target) pairs. You can then instantiate this subclass with a special command-line switch, or say if --source is set to - (a UNIX standard for STDIN).

But wouldn't that still require passing input from STDIN and the CLI?
The class class SimpleSequenceReader(Iterable) that I wrote above seems to be in the same spirit, in that it extends SequenceReader, but instead can take arbitrary strings created on the fly by other python functions (not necessarily from stdin).
I guess what I'm after is being able to use the scorer model more dynamically inside of other python programs that pass around strings from other python functions.

Yes, looking over your code (I hadn't looked closely when I first responded), what you have is in the right spirit.
I'm not sure why it's segfaulting, but I'd try inserting some prints so you can get a lower-level look at what's going on.
Why do you need StringDataInput? Won't the raw batched sampler work?

The StringDataInput is my modified version of the BatchedRawParallelSampleIter (Is this the same sampler that you had in mind above?) from data_io.py. The issue with the latter in my case seems to be here:
https://github.com/awslabs/sockeye/blob/2d458b2a2a4b05b3437a1895209675969bf6befd/sockeye/data_io.py#L1615
where it encodes the src/tgt input using the function create_sequence_readers, which relies on a file rendering of the input and output (in my script I have a new function with the same name just below SimpleSequenceReader that instead does the same thing working with a string).
When I print out the batch data created by all of my new machinery and new sampler, it appears to be identical to that produced by BatchedRawParallelSamplerIter, which is the really puzzling part.
After more investigating, I found that if I override the original scoring function score with the same input in my new SockeyeScorer class, I also get scary errors (which might be correlated with the original problem). For example, keeping everything else constant:
class SockeyeScorer(Scorer):
    """A seq2seq model based on sockeye"""
    def __init__(self,model: ScoringModel,
                 source_vocabs: List[vocab.Vocab],
                 target_vocab: vocab.Vocab) -> None:
        Scorer.__init__(self,model,source_vocabs,target_vocab)

        ## keeps the original vocabulary around to build data in string scorer
        self.orig_source_vocab = source_vocabs
        self.orig_target_vocab = target_vocab

    def string_scorer(self,src,target):
        """Redefined the scoring function

        :param src: the source text
        :param target: the target text
        """
        left_side = src.split()
        right_side = target.split()

        ## custom bucket size
        bucket = (100,100)

        #######################################
        # ON-THE-FLY DATA CREATE FROM STRINGS #
        #######################################

        data_loader = RawParallelDatasetLoader(buckets=[bucket],
                                           eos_id=self.orig_target_vocab[C.EOS_SYMBOL],
                                           pad_id=C.PAD_ID,
                                           skip_blanks=False)

        # special score iterator that builds from strings as opposed to from file

        score_iter = StringDataInput(data_loader=data_loader,
                                           sources=left_side,
                                           target=right_side,
                                           source_vocabs=self.orig_source_vocab,
                                           target_vocab=self.orig_target_vocab,
                                           bucket=bucket,
                                           batch_size=1,
                                           max_lens=(100,100),
                                           #num_factors=0
                                           )

        ## standard run through batch=1
        for batch_no,batch in enumerate(score_iter):

            ## attempt at scoring
            scores = self.model.run(batch)[0] ## raises seg fault and occasionally other errors

    def score(self,
              score_iter,
              output_handler: OutputHandler):

        total_time = 0.
        sentence_no = 0
        batch_no = 0
        for batch_no, batch in enumerate(score_iter, 1):
            batch_tic = time.time()

            # Run the model and get the outputs
            scores = self.model.run(batch)[0]
            return

Called in the following way:
def score(args: argparse.Namespace):

    setup_main_logger(file_logging=False, console=not args.quiet)

    utils.log_basic_info(args)

    with ExitStack() as exit_stack:

        ####################################
        # SAME AS IN ORIGINAL SCORE SCRIPT #
        ####################################

        context = utils.determine_context(device_ids=args.device_ids,
                                          use_cpu=args.use_cpu,
                                          disable_device_locking=args.disable_device_locking,
                                          lock_dir=args.lock_dir,
                                          exit_stack=exit_stack)
        if args.batch_type == C.BATCH_TYPE_SENTENCE:
            check_condition(args.batch_size % len(context) == 0, "When using multiple devices the batch size must be "
                                                                 "divisible by the number of devices. Choose a batch "
                                                                 "size that is a multiple of %d." % len(context))
        logger.info("Scoring Device(s): %s", ", ".join(str(c) for c in context))

        args.no_bucketing = True
        args.bucket_width = 10

        score_iter, source_vocabs, target_vocab, model_config = get_data_iters_and_vocabs(
            args=args,
            model_folder=args.model)

        scoring_model = ScoringModel(config=model_config,
                                             model_dir=args.model,
                                             context=context,
                                             provide_data=score_iter.provide_data,
                                             provide_label=score_iter.provide_label,
                                             default_bucket_key=score_iter.default_bucket_key,
                                             score_type=args.score_type,
                                             length_penalty=inference.LengthPenalty(alpha=args.length_penalty_alpha,
                                                                                beta=args.length_penalty_beta),
                                             softmax_temperature=args.softmax_temperature)

        ######################
        # NEW SCORING MODEL  #
        ######################

        ## call to new sockeye scorer model defined above
        scorer = SockeyeScorer(scoring_model,source_vocabs,target_vocab)
        ## call to new string function
        ### NEW FUNCTION TURNED OFF
        #scorer.string_scorer("this is my sentence","this is the second sentence")

        ## NORMAL SCORING FUNCTION FROM ORIGINAL score.py
        scorer.score(score_iter=score_iter,
                     output_handler=get_output_handler(output_type=args.output_type,
                                                       output_fname=args.output))

I get:
[INFO:sockeye.utils] MXNet version 1.3.1, path /Users/kyler/miniconda2/envs/rewrite_logic/lib/python3.6/site-packages/mxnet/__init__.py
[INFO:sockeye.utils] Command: /Users/kyler/projects/rewrite_logic/rewrite_logic/sockeyeSeq2Seq.py --model /Users/kyler/third_party/ParaBank-rewriter/ --use-cpu --target tgt.txt --source src.txt --batch-size 1
[INFO:sockeye.utils] Arguments: Namespace(batch_size=1, batch_type='word', config=None, device_ids=[-1], disable_device_locking=False, length_penalty_alpha=1.0, length_penalty_beta=0.0, lock_dir='/tmp', loglevel='INFO', max_seq_len=None, model='/Users/kyler/third_party/ParaBank-rewriter/', num_words=(0, 0), output=None, output_type='score', pad_vocab_to_multiple_of=None, quiet=False, score_type='neglogprob', shared_vocab=False, softmax_temperature=None, source='src.txt', source_factor_vocabs=[], source_factors=[], source_vocab=None, target='tgt.txt', target_vocab=None, use_cpu=True, word_min_count=(1, 1))
[INFO:__main__] Scoring Device(s): cpu(0)
[INFO:sockeye.model] ModelConfig loaded from "/Users/kyler/third_party/ParaBank-rewriter/config"
[INFO:sockeye.vocab] Vocabulary (15989 words) loaded from "/Users/kyler/third_party/ParaBank-rewriter/vocab.src.0.json"
[INFO:sockeye.vocab] Vocabulary (13585 words) loaded from "/Users/kyler/third_party/ParaBank-rewriter/vocab.trg.0.json"
[INFO:sockeye.data_io] ==============================
[INFO:sockeye.data_io] Creating scoring data iterator
[INFO:sockeye.data_io] ==============================
[INFO:sockeye.model] Config[_frozen=True, config_data=Config[_frozen=True, data_statistics=Config[_frozen=True, average_len_target_per_bucket=[6.536779555828388, 12.695111308360453, 21.113829676281792, 29.702584587020255, 37.97110374449988, 46.07846054633612, 53.85288055852154, 61.082317040412825, 68.07096396771524, 74.83928896899513, 78.72540254824904, 81.3454750934538], buckets=[(9, 10), (18, 20), (27, 30), (36, 40), (45, 50), (54, 60), (63, 70), (72, 80), (81, 90), (90, 100), (99, 100), (100, 100)], length_ratio_mean=1.0645400645552539, length_ratio_std=0.29834278125977903, max_observed_len_source=100, max_observed_len_target=100, num_discarded=408226, num_sents=56657132, num_sents_per_bucket=[23211115, 18449333, 6644559, 3384680, 1940286, 1186265, 741384, 465335, 302562, 197516, 122594, 11503], num_tokens_source=881889667, num_tokens_target=869418202, num_unks_source=0, num_unks_target=0, size_vocab_source=15989, size_vocab_target=13585], max_seq_len_source=100, max_seq_len_target=100, num_source_factors=1, source_with_eos=True], config_decoder=Config[_frozen=True, attention_config=Config[_frozen=True, config_coverage=None, dtype=float32, input_previous_word=False, is_scaled=False, layer_normalization=False, num_heads=None, num_hidden=1024, query_num_hidden=1024, source_num_hidden=1024, type=dot], attention_in_upper_layers=False, context_gating=False, dtype=float32, enc_last_hidden_concat_to_embedding=False, hidden_dropout=0.2, layer_normalization=False, max_seq_len_source=100, rnn_config=Config[_frozen=True, cell_type=lstm, dropout_inputs=0.0, dropout_recurrent=0.0, dropout_states=0.0, dtype=float32, first_residual_layer=2, forget_bias=0.0, lhuc=False, num_hidden=1024, num_layers=6, residual=False], state_init=last, state_init_lhuc=False], config_embed_source=Config[_frozen=True, dropout=0.0, dtype=float32, factor_configs=None, num_embed=512, num_factors=1, source_factors_combine=concat, vocab_size=15989], config_embed_target=Config[_frozen=True, dropout=0.0, dtype=float32, factor_configs=None, num_embed=512, num_factors=1, source_factors_combine=concat, vocab_size=13585], config_encoder=Config[_frozen=True, conv_config=None, dtype=float32, reverse_input=False, rnn_config=Config[_frozen=True, cell_type=lstm, dropout_inputs=0.0, dropout_recurrent=0.0, dropout_states=0.0, dtype=float32, first_residual_layer=2, forget_bias=0.0, lhuc=False, num_hidden=1024, num_layers=6, residual=False]], config_loss=Config[_frozen=True, label_smoothing=0.1, name=cross-entropy, normalization_type=valid, vocab_size=13585], lhuc=False, vocab_source_size=15989, vocab_target_size=13585, weight_normalization=False, weight_tying=False, weight_tying_type=None]
[INFO:sockeye.encoder] sockeye.encoder.EncoderSequence dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.ConvertLayout dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.BiDirectionalRNNEncoder dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.RecurrentEncoder dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.RecurrentEncoder dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.RecurrentEncoder dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.ConvertLayout dtype: float32
[INFO:sockeye.decoder] sockeye.decoder.RecurrentDecoder dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.Embedding dtype: float32
[INFO:sockeye.encoder] sockeye.encoder.Embedding dtype: float32
[INFO:sockeye.model] Loaded params from "/Users/kyler/third_party/ParaBank-rewriter/params.best"
[INFO:sockeye.data_io] Created bucketed parallel data set. Introduced padding: source=95.0% target=94.0%)
python(21585,0x700007b32000) malloc: *** error for object 0x7fe243fe9e80: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Shouldn't
scorer.string_scorer("this is my sentence", "this is the second sentence")

be
scorer.string_scorer(["this is my sentence"], "this is the second sentence")

Sockeye expects a list of source strings, which is how it handles source factors. When factors are not used, it is a list of length one. The target side is always just a plain string since there are not target side factors.
I'm not sure what else to suggest besides this, but it seems some ground-up debugging should be able to resolve what's going on.

Yeh, I think I handled this using the following in the code above (where the source is in a list; I'm generally aware of this point about source factors):
source_sequence_readers = [SimpleSequenceReader(sources,vocab_sources[0],add_eos=True)] ## SEE ABOVE
target_sequence_reader = SimpleSequenceReader(target,vocab_target,add_bos=True)

I'll have another look. But yes, whatever it is, it is a fairly annoying bug indeed! Thanks for having a look.

An easier approach would be to avoid the iterator functionality altogether, since you don't need it. Just construct the batch manually yourself. See the score() function in scoring.py, which is where the iterator is used. You would just extend string_scorer() function to build it manually.

Closing as scoring has been rewritten in Sockeye 2 and issue has not been updated for > 1 year.


"Generate serialization assembly" has a  option that does nothing

@davkean I don't see  option any more in 26216.1.d15rel build. Please reopen these issues if you are seeing otherwise.


Collection.ensureIndexes() doesn't work for MongoDB 3

This is due to the method having been deprecated, see http://docs.mongodb.org/master/reference/method/db.collection.ensureIndex/.
We need monk to support this new call (createIndex()) in order to use it.

Just released v2 with updated dependencies. Hopefully this works now.


May remove explicit metric mapping of comment nodes

Currently, every node type that represents a comment has to be manually marked with:
"metrics": ["comment_lines", "real_lines_of_code"],
"category": "comment",

the first line is unessesary, as checking for "category": "comment" in the calculate-function of both metrics would be sufficient.

Thinking of it, I came up with the rather radical idea of removing explicit mappings between metric and node type altogether.
If we introduce categories like "class_declaration", "function_declaration", "branch_statement" or something like "switch_label" I have already introduced, we could avoid such an explicit mapping and make it easier to define new metrics like cyclomatic complexity.
That would be more close to the original idea of working on a kind of "unified" syntax tree (at least for the node types we consider for our metrics). It should be quite straight forward to implement this change, but it should reduce the effort for maintenance as well as the reliability, as we would no longer have to look up all metrics which might be interested in e.g. a new syntax for an if-statement and ensure that we do not forget to mention a metric.
Perhaps we could also make the coupling analysis more generic with such an approach, by marking node types that could nest an usage of an imported element. But we would have to further investigate this.

Thinking of overhauls of the nodeTypesConfig.json, we should also consider reworking "activated_for". Currently, that field does only allow to exclude some node types from being used to calculate any metric for a language. However, if one node type should be used for one metric/category, but not for another one, we are in trouble.


Correctly type check annotation constructors.

Currently, our type checking around annotation constructors isn't strict enough and allows invalid construction of annotations.
What do you expect to happen?
Instantiating a new annotation should be a type error when the annotation requires attributes and the attributes are omitted from the output.

This post on the Artsy blog has a solution specifically for this:
constructor(
    attrs: {} extends Attributes
      ? { id?: string; start: number; end: number; attributes?: Attributes }
      : { id?: string; start: number; end: number; attributes: Attributes }
  )

nb. I tried doing this and it requires us to use schemas 😭


preventDefault seems to have no effect

Describe the bug
I'd like to prevent the browser from presenting a "Save Page" dialog when pressingh Ctrl/Cmd + S. With mousetrap, this is possible via simple e.preventDefault(), but this library does not expose such a function and trying to to it on the various originalEvent seems to not work at all.
To Reproduce

Open https://codesandbox.io/s/admiring-lamport-jh8k7h?file=/src/index.js
Focus the preview frame, hit "Ctrl + S" or "Cmd + S"

Expected behavior
No "Save Page" dialog to be shown.
Additional context
A more ergonomic e.preventDefault without having to use originalEvent would be nice.

For reference, here is a working demo with mousetrap.
What may also be a bug here is that the Ctrl+S combo is to not being captured on at least Chrome and Safari on MacOS, while in mousetrap, it is.

I see, thanks. Maybe you could also for convenience expose a preventDefault function directly on the returned event because I'm confused whether I'm supposed to use finalKeyEvent.originalEvent or iterate e.keyEvents in this case.

I'm thinking I'll introduce a third argument which will take options for the binding. These options will be passed to the binder logic and will be generic based on the binder used. In the case of the browser binder, preventDefault will be an option, and since this library is about keyboard bindings and you likely want to always call preventDefault, this option will default to true, but can be set to false explicitly.
Prevent default called:
bindCombo('shift > s', handler)

Prevent default not called:
bindCombo('shift > s', handler, { preventDefault: false })

So after some experimentation, I've decided to remove the combo update batching. It will resolve this issue and any other event interaction related issues in the browser and otherwise. I've also added preventDefault to the browser event so you don't need to reach into the original event to call it. Checkout #20 if you're curious.

@silverwind ok, just released 1.2.0. You will need to reach into the finalKeyEvent property and call prevent default.
bindKeyCombo('ctrl > s', (event) => {
  event.finalKeyEvent.preventDefault()
  // ...
})

Let me know if you have any further issues. Thanks for raising this issue.

Thanks, preventDefault works and save dialog is prevented. Updated demo:
https://codesandbox.io/s/quizzical-nightingale-c6t37s
There is another issue related to Control key on Mac, I will open a separate issue for it.

Actually I may have spoken to soon, if I input Command+s in the demo above two times in a row, it seems to only prevent the first default action, the second time it fails to prevent the save dialog.

Hmm, this might be due to a different issue. Likely related to how the meta/command key is handled by Keystrokes on mac; on macOS the command key does not properly fire a keyup event. There is some special logic to handle this issue in src/browser-bindings.ts. I have a mac at home, but I'm away this week. I should be able to take a look when I get back around friday.
Edit: just saw your edit. I'll follow up with you in that issue.

Thanks. Yes, this is most definitely a Mac-only issue. It seems like something inside the module breaks after the first entry of a sequence with the command key.
No hurries, I'll continue using mousetrap in my project until this is sorted out.

Hi @RobertWHurst
I'm trying to test the behavior of preventDefault in a simple unit test with keystrokes.press(). The binding works as expected in the browser, but the unit test fails with the following error:
TypeError: e.finalKeyEvent.preventDefault is not a function.
I was experimenting with @silverwind 's code, and it can be found here: https://codesandbox.io/s/blazing-silence-6pn9np?file=/src/test.spec.ts
Thanks!

Ah yes, I see the issue.
By default Keystrokes uses the browser bindings, but the test wrapper for creating a test instance of Keystrokes does not implement the browser bindings. Keystrokes allows setting up any bindings you like, that way it can be used in electron, or games or really anything else for that matter, in a way that is agnostic about how the events are generated. I built the test instance for building keystrokes own unit tests (minus the browser binding tests), but I didn't consider the fact that most people will need a test instance that matches the browser bindings. I'll likely introduce defaults to the test instance that match the browser bindings, and at the same time allow passing overrides.
Let's open another issue for this.


Headers all lowercased

Been trying to debug an issue I've been having where the API I'm calling is returning a 500 error. Traced this down to this package. The server is expecting Content-Type in Title-Case.
Node-fetch seems to lowercase all headers and that's what it sends to the server on the way out.
Looking into #260 it shouldn't be this way, as the fetch spec seemed to have been changed to insist on the headers remaining untouched (Which would be expected), however that issue was closed citing it's a nodeJS issue... but the code in node-fetch is doing the toLowerCase() call.
In my opinion and experience, if I set Content-Type in my options, it should remain untouched and go through to the server like that.
Is there a work-around for now, or still waiting for a fix?

According to RFC 2616, HTTP header names are case-insensitive. RFC 7540 states that HTTP2 header names must be lowercase and non-lowercase headers should be treated as malformed requests. You should raise this with the API developers since lowercase headers and case-insensitive header searches should be implemented.

I didn't realise HTTP/2 required headers to be lowercase, I assume this is the reason this package enforces this?
If it were only enforcing RFC 2616, then my case would be valid as being insensitive, just sending whatever the developer originally chose would support those servers that haven't implemented it properly one way or another.
Sadly in this case we're dealing with a third party, so getting the server to play nicely is going to be a challenge, will have to find a workaround not using node-fetch for this then :(

@qwright10 is right - if some server requires header names in a specific case, they misinterpreted the spec.
However, I understand that it might sometimes be hard or even not doable to contact service developers and ask them for changes.
The issue you mentioned was closed, because https://github.com/whatwg/fetch/pull/476#issuecomment-276357244 states:

The change shouldn't affect any JavaScript API behavior. They will still expose header names as lowercase even though the case given by the developer is used on the network.

However, the even though the case given by the developer is used on the network part is not actually true in our case - Node.js HTTP library lower-cases all incoming headers.
cc @bitinn, is my understatement of this correct?

Are there any updates to this?  I am trying to make HTTP requests to an embedded device for monitoring solar panels, and due to slack programming practices the device treats HTTP headers as case sensitive.  This means I can't use node-fetch to retrieve data from the device, as it does not accept an authorization header, requiring it to be Authorization instead.
I understand HTTP/2 requires lowercase headers, however I am dealing with a device that only (mis)understands HTTP/1.1.
I completely agree the problem is with the device, however the firmware hasn't been updated in almost 10 years and the product is no longer available for purchase, so there is zero chance of it getting updated.  It would be great if I could continue to use it as it still works fine, and it seems a shame to send it off to landfill and spend a bunch of money to replace it, just because of a lowercase A.

For anyone else struggling with this issue, I have come up with a workaround:
// Save the original .toLowerCase() function.
const originalLowerCase = String.prototype.toLowerCase;
// Replace it with a no-op.
String.prototype.toLowerCase = function() { return this; };
// Call fetch() as normal but return immediately.
const pFetch = fetch(...);
// Restore the original function, so it's available for other code to use while we are waiting.
String.prototype.toLowerCase = originalLowerCase;
// Wait for the fetch() to complete.
const response = await pFetch;

There are probably a ton of situations where this will break code in weird ways, but for simple requests, it does the job.  Hopefully node-fetch will be fixed so dodgy hacks like this are no longer necessary when trying to communicate with legacy devices!

Even if the RFC says the headers should be incase sensitive, I have a single case where it matters (the web interface of a heating controller unit). It only accepts requests with an uppercased first character. I used Wireshark and other tools to find the difference between Chrome, Curl, Firefox and node-fetch, an all Tools keep the headers in the state I wrote them. Only node-fetch converts everything to lowercase.
Is it maybe an idea to lowercase the character only for HTTP2+ requests?

https://github.com/whatwg/fetch/issues/304
WHATWG’s fetch also preserves the case.

Case insensitive means the case shouldn't matter.  Not that fetch should be a snooty librarian and forcing lower case.


Support for<EMAIL_ADDRESS>

I get the following error when I try to npm install react-ranger:

Could not resolve dependency:
npm ERR! peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>
Can you update the peerDependencies section & release a new version?
https://github.com/tannerlinsley/react-ranger/blob/d912f893d2efb125d271162e36ee8531b5fd4f39/package.json#L35-L37

Yeah, I also have this issue (( installed id with force and it's not working as it should, on point drag it refreshes the page ((( please update for the new react version

yarn (the package manager) just warns you and will still let you use it. I have no problems with the library using 17.0.2. But obviously this issue should be fixed.

I’m planning a Typescript rewrite for the entire library.
Tanner Linsley
On Nov 11, 2021, 11:27 AM -0700, VulcanTech-io @.***>, wrote:

yarn (the package manager) just warns you and will still let you use it. I have no problems with the library using 17.0.2. But obviously this issue should be fixed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

@tannerlinsley Need any help?

I mean, I can always use help! The roadmap is this:

Clone the next branch from github.com/tannerlinsley/react-location as a starting point
Replace all react-location stuff with react-ranger including home page, documentation, examples
Migrate all of the existing react-ranger code from JS to TS
🚢

Any updates on this issue?

Yep
Tanner Linsley
Sent with Spark
On Nov 9, 2022 at 8:10 AM -0800, sjbuysse @.***>, wrote:

@tannerlinsley are you still planning on doing this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

You can use overrides in package.json to force spec for a specific dependency.

It has been over 2 years, are there any updates? Trying to use this with react 18.2.0

It has been over 2 years, are there any updates? Trying to use this with react 18.2.0

I use it with react@latest with no problems

Also https://www.npmjs.com/package/@tanstack/react-ranger works.


Question on top-1 error

I saw the original paper top1 error rate for resnet-50 on imagenet is  20.74%
[Deep residual learning for image recognition]
the paper site the original resnet-50 on imagenet is 24.7%(Table 2 row 1)
Why there is a difference ?
Thanks in advance

The original paper doesn't use RandomResizedCrop data augmentation which can substantially improve accuracy.

20.74% is the single-model error with multi-scale augmentation (you can find more information in the ``Implementation" section of the ResNet paper. 24.7% single-crop error is obtained from the official implementation: https://github.com/KaimingHe/deep-residual-networks.


PersistenceManager static constructor and credentials retrieval itself could be more robust

When user profile is not loaded for the process (common case for IIS with processModel.loadUserProfile set to false, which is the default), it defaults to a specific subdirectory in the %WINDIR%\System32 directory. Currently, PersistenceManager static ctor is assuming that this directory is valid and can be written into, which is, unfortunately, not the case. This not only leads to failure to retrieve default AWS credentials on service startup, but also to a cached (permanently) TypeInitialization exception when accessing PersistenceManager.
I believe that static constructor should defer any file access logic to GetSettingsStoreFolder with some kind of lazy setup (this is good for app startup times also).
Also, the UnauthorizedAccessException probably should be ignored when progressing on staged AWS credential discovery and attempting to load credential data from user profile.

Agreed we do need to make this more robust.

👋 @normj. I'd be happy to tackle this bug.
I'm in a situation where I need to use the SDK running as Network Service and the current PersistenceManager is throwing an error. I've stubbed myself a decent substitute for now, but I would like to fix this bug and get the code merged in proper.
I could use some guidance on how you would like to have the default PeristenceManager provided to the application.

The InMemoryPersistenceManager is absolutely great ! We are eager to see that PR merged.
If you need some help for the tests, let me know.

Thanks @PascalUmaknow  It's just a rough patch for now.
If you are setup to run the tests, please give it a shot, I never got that far.
I definitely want to get this merged, otherwise I have to setup a build of this library on my company's CI server. Which is work I rather not do.

@StanleyGoldman PR that addresses this issue has been released as part of version <IP_ADDRESS> of AWSSDK.Core

Hi @onyxmaster @StanleyGoldman,
I was going through the backlog and came across this issue. From @normj's comments, looks like the issue has been addressed in the version <IP_ADDRESS> of AWSSDK.Core. Please confirm if we could close this issue.
Thanks,
Ashish

Hi. While I cannot currently verify the issue since I don't work on the specific project, I reviewed changes in #1561, and they look good to me.


build.prod make alternative path in css broken

Hi, I met a problem when run build.prod. Cause it joins all the css files into one file main.css so the relative path in some css file like font-awesome.css links to its font files become incorrect, that makes the client can not get the correct files.

That is correct. You can disable bundling and for sure decrease the global, unscoped styles as much as possible.


feat: initial environment variable provider

This PR

adds a basic environment variable provider

Notes
This provider is intended to be used in the playground and in some updated getting started documentation.

Hey @toddbaert, I'm running into a build issue due to the flagd web schema git submodule not being found. Any idea how to resolve that? I don't see a reference to that in my branch. 🤷♂

FYI, here's an even more minimalist provider that I created just for pedagogical reasons: https://github.com/moredip/openfeature-playground/tree/main/libs/openfeature-minimalist-provider
I probably needs a bit of cleanup before being used in documentation though.

Hey @toddbaert, I'm running into a build issue due to the flagd web schema git submodule not being found. Any idea how to resolve that? I don't see a reference to that in my branch. man_shrugging

I would just revert your changes to the submodule. It seems you adding a duplicate one.

@beeme1mr I removed the submodule you inadvertently (I think) added, and rebased on main.


Pin to Dart 1.24.x.

Fixes #1103

Coverage remained the same at 72.962% when pulling 5aa6bac81519b39e9838ac9d8a35c34fe0bfd36b on mikegrima:dartver into 0bbc58bae11a390cc4ba17e69864c71e46170d37 on Netflix:develop.

👍


Search query performance currently lousy

Not sure what happened and maybe we need more hardware, but simple text searches (including suggested searches) are currently insanely slow (>15  to 30 seconds).

Joe Luk just upped the memory on voteviewdev to 8G, not obvious improvement, but maybe we need to change some mongo settings, @adamboche?

Adam switched our text index over to a wildcard index a few days ago -- I think it would be valuable to try with and without that. I also think it would be valuable to ensure we run the vacuum command after any major DB change and look into any other optimization things we should be running.

I'm getting 2-second searches or so. Which queries are 15+ seconds?
On Fri, Jan 13, 2017 at 11:32 AM, Aaron Rudkin<EMAIL_ADDRESS>wrote:

Adam switched our text index over to a wildcard index a few days ago -- I
think it would be valuable to try with and without that. I also think it
would be valuable to ensure we run the vacuum command after any major DB
change and look into any other optimization things we should be running.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JeffreyBLewis/WebVoteView/issues/114#issuecomment-272526677,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS6Qi9oSlrJZ6yZLDlWIYageaZJKxBbGks5rR9FYgaJpZM4LjKrR
.

Foreign policy
For one or
Taxes
Jeff
Sent from my iPhone

On Jan 13, 2017, at 11:37 AM, adamboche<EMAIL_ADDRESS>wrote:
I'm getting 2-second searches or so. Which queries are 15+ seconds?
On Fri, Jan 13, 2017 at 11:32 AM, Aaron Rudkin<EMAIL_ADDRESS>wrote:

Adam switched our text index over to a wildcard index a few days ago -- I
think it would be valuable to try with and without that. I also think it
would be valuable to ensure we run the vacuum command after any major DB
change and look into any other optimization things we should be running.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JeffreyBLewis/WebVoteView/issues/114#issuecomment-272526677,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS6Qi9oSlrJZ6yZLDlWIYageaZJKxBbGks5rR9FYgaJpZM4LjKrR
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

If I search university of california in the search box, it loads
apparently forever, but:

almost immediately it says 104,715 votes found.
the following query in the mongo shell completes in 0.4 seconds with
10,147 results

db.voteview_rollcalls.find(
{$text: {$search: "university of california"}},
{score: { $meta: "textScore" } }
).sort({score: {$meta: 'textScore'}}
).explain('executionStats')
Quoting the searches gives divergent results as well. Could someone who
knows the web api take a look at what's going on?
On Fri, Jan 13, 2017 at 12:02 PM, JeffreyBLewis<EMAIL_ADDRESS>wrote:

Foreign policy
For one or
Taxes
Jeff
Sent from my iPhone

On Jan 13, 2017, at 11:37 AM, adamboche<EMAIL_ADDRESS>wrote:
I'm getting 2-second searches or so. Which queries are 15+ seconds?
On Fri, Jan 13, 2017 at 11:32 AM, Aaron Rudkin<EMAIL_ADDRESS>wrote:

Adam switched our text index over to a wildcard index a few days ago
-- I
think it would be valuable to try with and without that. I also think
it
would be valuable to ensure we run the vacuum command after any major
DB
change and look into any other optimization things we should be
running.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/JeffreyBLewis/WebVoteView/issues/114#issuecomment-
272526677>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
AS6Qi9oSlrJZ6yZLDlWIYageaZJKxBbGks5rR9FYgaJpZM4LjKrR>
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JeffreyBLewis/WebVoteView/issues/114#issuecomment-272533965,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS6QizPx4LgcdI0uUjT4VW5c01gwtTqWks5rR9htgaJpZM4LjKrR
.

I built a custom-weighted text index instead, but I'm experiencing similar behavior. Fast in the db, nonterminating on the site.
db.voteview_rollcalls.find({$text: {$search: ""election of the speaker""}}, {votes:0, score: {$meta: 'textScore'}}).pretty().sort( { score: { $meta: "textScore" } } ).limit(20)

I believe we are running out of RAM when we try to return results. If we add .limit(20) for the first page of results and .skip(20).limit(20) for the subsequent page it seems to work in the shell for queries that otherwise hit memory limits. This seems to work for textScore-sorted queries as well.

These problems all seem to be due to an error in searchMembers that was trying to sort tons of members and we were running out of RAM. I limited it to 20 members after the sort and the problem seems to be solved.

Please comment here if it is not.

Looks good to me:
db.voteview_rollcalls.find({$text: {$search: "\"university of california\""}}, { score: {$meta: 'textScore'}}).pretty().sort( { score: { $meta: "textScore" } } ).limit(1)

Congratulating the women’s water polo team of the University of California, Los Angeles, for winning the 2007 NCAA Division I Women’s Water Polo National Championship, and congratulating UCLA on its 100th NCAA sports national title, making it the most accomplished athletic program in NCAA history


Drop support for 32bit py310 wheel builds

Summary
In #7102 we added support for Python 3.10 to Qiskit. However, numpy and
scipy stopped publishing wheels for 32bit platforms in Python 3.10. This
means that to test Python 3.10 32bit wheels we will have to compile
numpy and scipy from source (which for scipy is prohibitively slow).
In response this commit updates our cibuildwheel configuration to skip
tests on 32bit Python 3.10 wheels since we can't reliably test the built
wheels in CI and it would require users to build them from source.
This is the same approach taken in PR #7549 for ppc64le and s390x. For
32 bit platform users on python 3.10 this means they'll need to locally
build numpy, scipy, and potentially other depencies from source to use
Qiskit Terra with Python 3.10, but for the Qiskit components at least
precompiled binaries will be available.
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.005%) to 83.145%

Files with Coverage Reduction
New Missed Lines
%

qiskit/pulse/library/waveform.py
3
89.36%

Totals

Change from base Build<PHONE_NUMBER>:
-0.005%

Covered Lines:
51998

Relevant Lines:
62539

💛  - Coveralls


CutMix implementation

Hello,
Thank you for realizing this great work!
As a suggestion, it would be nice to have support for CutMix in FFCV. In my experience CutMix usually works better than Mixup.
Best regards.

Thanks for the suggestion! It's not in our immediate plans at the moment but happy to review a pull request if you have implemented it!


About loading of saved_model format in tf2

There are too many versions of tf. Before, I used a function to load the saved_model format model.
new_model = tf.contrib.saved_model.load_keras_model(saved_model_path) new_model.summary()
But if folder “assets” does not exist, an error will occur,and this file is not available for every model.
So which function should I use to load？
Thank you !!

@wangwenchao-job
Could you please let us know which version of tf are you using and please share a simple stand alone code so we could replicate the issue faced by you..Thanks!

@wangwenchao-job
Could you please let us know which version of tf are you using and please share a simple stand alone code so we could replicate the issue faced by you..Thanks!

Thank you very much for your reply！！
My code execution environment is:
Windows = 10
tf = 1.14
from tensorflow.keras.applications import *
from tensorflow.keras.models import Model
import tensorflow as tf
keras = tf.keras
model_dir = './saved_model/'
reload_model = tf.keras.experimental.load_from_saved_model(model_dir)
reload_model.summary()
reload_model.save('./det_model.h5')
As above is my code, I also tried other functions:
tf.compat.v1.keras.experimental.load_from_saved_model
tf.compat.v2.keras.experimental.load_from_saved_model
tf.contrib.saved_model.load_keras_model

@wangwenchao-job
Could you please let us know which version of tf are you using and please share a simple stand alone code so we could replicate the issue faced by you..Thanks!

More information：
My saved_model only has .pb and adjustables, no assets.
When there is an assets file before, it can be imported using function ：
tf.contrib.saved_model.load_keras_model
But now I get an error:
Python unhandled win32 exception...
And automatically open vs for me to debug.

@wangwenchao-job
Yes, please email the model.

@wangwenchao-job
Yes, please email the model.

The model has been sent to you at the address:
<EMAIL_ADDRESS>Or this download link：
https://www.jianguoyun.com/p/DRuhIW8QtKK2CBjB95cD
I don't know if you can access

@wangwenchao-job
you can email it as<EMAIL_ADDRESS>

@wangwenchao-job
you can email it as<EMAIL_ADDRESS>
@Saduf2019
The model has been sent to you to the above email address.

@wangwenchao-job
you can email it as<EMAIL_ADDRESS>
@Saduf2019
The model has been sent to you to the above email address.

update
In addition, I use the following method to load the savedmodel and export pb, and my ultimate goal is to convert the savedmodel format model into a pb format file (frozen_graph)
`import tensorflow as tf
print(tf.version)
from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2
loaded = tf.saved_model.load('saved_model')
infer = loaded.signatures['serving_default']
f = tf.function(infer).get_concrete_function(inputs=tf.TensorSpec(shape=[None, 28, 28, 3], dtype=tf.float32))
f2 = convert_variables_to_constants_v2(f)
graph_def = f2.graph.as_graph_def()
for node in graph_def.node:
print(node.op, node.name)
with tf.io.gfile.GFile('frozen_graph.pb', 'wb') as f:
f.write(graph_def.SerializeToString())`
But the obtained pb model is only 1k in size, so this conversion method should be problematic.

@ Saduf2019
Do you have any emails? Do you have any suggestions?

@wangwenchao-job
no i have not received, can you please share a colab gist with the issue for us to analyse the issue faced.


Adjust cachegroup parentage and deliveryservice-server assignment endpoints for Topologies

I'm submitting a ...

[x] new feature / enhancement request

Description

API endpoints that are affected by cachegroup parentage or deliveryservice-server assignment need to be updated to take Topology-based Delivery Service assignment and parentage into account.
Traffic Control components affected ...

[x] Documentation
[x] Traffic Ops

Acceptance Criteria

Assign a Delivery Service to a server (or vice versa). It should be prohibited to assign an EDGE server to a Delivery Service (or vice versa) that has a Topology assigned already.
perform an operation on "child" cachegroups -- like queueing updates on "child" caches when changing the status of a "parent" cache. Child caches via both Topologies and legacy Cachegroup parentage would all need to be updated in that case.The line

See the Flexible Topologies PR for specifics: apache/trafficcontrol#4537

@zrhoffman this is pretty much done, right? Can this be closed?

Yep looks done!