if aiocache hits a TimeoutError it doesn't recover

I'm having a strange issue with wait_for(fut, timeout, *, loop=None) + aiocache on memcache.
We're storing values using aiocache.MemcachedCache and most methods of aiocache are decorated with @API.timeout which uses await asyncio.wait_for(fn(self, *args, **kwargs), timeout) (with a default timeout of 5 (seconds)).
When load testing our application, we see that with a big load, the asyncio loop clogs up and some requests to memcache raise asyncio.TimeoutError which is perfectly acceptable. The issue is that when we stop the load and allow for the loop to catch up, if we make any new request, all the memcache connections will fail with a  class 'concurrent.futures._base.TimeoutError'. In other words, if we ever get a TimeoutError the application cache is completely broken and the only way to repair the application is the kill it and restart it, which is unacceptable. It seems as though the whole aiocache connection pool is closed and I don't find where this happens and how to prevent it.
I've tried the following:

Remove uvloop (just in case).
Wrapped the asyncio.wait_for() in a shield() function so it won't cancel the associated Task, no difference
Tried catching the following error types: asyncio.CancelledError, TimeoutError, asyncio.futures.TimeoutError, asyncio.TimeoutError or global Exception with no success, it seems my catching of the error is too late

The only thing that helps is increasing the connection pool size (2 by default to 500 for example) but even with a big connection pool, if we have a TimeoutError, we hit the same issue and the whole pool spins into everlasting errors.
And finally, if I remove the timeout by setting it to 0 or None, the library doesn't use asyncio.wait_for() but a simple await fn() and even though we have some slowness under load, there is no TimeoutError and the application always works. But waiting too long for cache is not a good idea, so I'd really like to use the timeout feature.
If anyone has any idea how to tackle this, I'd love to hear your input !
The versions involved:

python 3.5.3
uvloop 0.8.0
aiohttp 2.0.7
aiocache 0.3.3
aiomcache 0.5.1

I'm currently writing a small testcase to see if I can easily reproduce the issue. I'll post it here when it's done.

Hi @achedeuzot, I'll investigate this during the weekend. The small testcase would definitely help, if not I'll also try to build something myself too

Mmmmm I tried a really simple example to see if it was recovering and seems it does (I hacked the code of aiomcache to add an asyncio.sleep(2) in the get command to simulate high latency so timeout triggers for the first two requests):
import asyncio

from aiomcache import Client
from aiocache import MemcachedCache

client = MemcachedCache(pool_size=1)

timeout = 0

async def get(key):
    try:
        global timeout
        timeout += 1
        return await asyncio.wait_for(client.get(key), timeout=timeout)
    except asyncio.TimeoutError:
        print("Timeout Error")

loop = asyncio.get_event_loop()
print(loop.run_until_complete(client.set("Hello", "World")))
for x in range(5):
    print(loop.run_until_complete(get("Hello")))

Output:
True
Timeout Error
None
Timeout Error
None
World
World
World

I did this simple one to check if aiomcache is releasing the pool connection correctly when there is a asyncio.TimeoutError. It seems it does because the last three queries return an error.

I've done another test simulating slow network with sudo tc qdisc add dev lo root netem delay 2000ms which adds a two second delay to each request (you can remove the rule with sudo tc qdisc del dev lo root).
The updated example:
import asyncio

from aiomcache import Client
from aiocache import MemcachedCache

MAX_TIMEOUT = 100

client = MemcachedCache(pool_size=1)

async def get(key, timeout):
    try:
        print("Calling client get with timeout {}, pool size {}".format(timeout, client.client._pool.size()))
        return await client.get(key, timeout=timeout)
    except asyncio.TimeoutError:
        print("Timeout Error")

loop = asyncio.get_event_loop()
for x in range(1, MAX_TIMEOUT, 2):
    print(loop.run_until_complete(get("Hello", x)))

and the output (I've added some print lines inside aiomcache code to see where it was being cancelled, no sleeps in the middle now though).:
Calling client get with timeout 1, pool size 0
Timeout Error
None
Calling client get with timeout 3, pool size 0
Timeout Error
None
Calling client get with timeout 5, pool size 0
aiomcache: received get b'Hello'
aiomcache: Wrote command
Timeout Error
None
Calling client get with timeout 7, pool size 0
aiomcache: received get b'Hello'
aiomcache: Wrote command
Timeout Error
None
Calling client get with timeout 9, pool size 0
aiomcache: received get b'Hello'
aiomcache: Wrote command
aiomcache: Read command: b'VALUE Hello 0 5 35\r\n'
aiomcache: retrieved get b'World'
World
Calling client get with timeout 11, pool size 1
aiomcache: received get b'Hello'
aiomcache: Wrote command
aiomcache: Read command: b'VALUE Hello 0 5 35\r\n'
aiomcache: retrieved get b'World'
World

Note that although the delay is only 2s, it takes much more than that to receive the value. This is because multiple loopback requests are done (i.e. acquire connection, write, read) and the 2s delay is for each one of them. Nevertheless it ends up resolving it correctly and recovering.

Hi Manuel,
I've tried creating a simple test case as you did but didn't manage to easily reproduce it. But I have more information about the circumstances where I see such behavior.
I'm using aiohttp (v2.0.7) for serving HTTP requests and aiocache for caching some sub-requests to micro-services. When the server starts, I initialize aiocache.MemcachedCache in a custom CacheManager class which I then register in aiohttp's Application global context which is passed to each HTTP handler. So each handler uses the global app['cache'] instance  to make get() and set() operations on the cache.
What I noticed is that if I use a try: ... except asyncio.TimeoutError: ... in my CacheManager class (which adds a small wrapper around aiocache), the TimeoutError is not catched, as if the CacheManager was destroyed in the process of the TimeoutError or/and of the cancellation of the associated asyncio.Task. BUT if I use a the same try: ... except ...:... structure in my HTTP handler, I catch the TimeoutError !
class CacheManager:
    def __init__():
        self.cache = aiocache.MemcachedCache(...)

    def get(key):
        # try: ... except asyncio.TimeoutError here doesn't work !
        return self.cache.get(key)

    def set(key, value):
        return self.cache.set(key, value)

def handler_get(req):
    # try: ... except asyncio.TimeoutError: here works !!
    c = req.app['cache'].get('...')
    if c:
        return c
    return compute_stuff(...)

if __name__ == '__main__':
    app = aiohttp.web.Application()
    app['cache'] = CacheManager()
    app.router.add_route('GET', '/', handler_get)
    aiohttp.web.run_app(app)

Under load, it seems that aiohttp spawns multiple Tasks which have a reference to the global CacheManager containing the aiocache.MemcachedCache instance. When one of the HTTP handlers catches a asyncio.TimeoutError, the sub-Task has already been cancelled and the aiocache.MemcachedCache sockets to memcache seem to also have been closed. So even when I catch the error in the HTTP handler, it's too late and the subsequent calls to any app['cache'] fails.
What I've currently done to 'fix' the issue is to catch the asyncio.TimeoutError in each HTTP handler and then create a new instance of CacheManager and re-register it into req.app['cache'] but I see in my logs that when the asyncio.TimeoutError happens, I have multiple CacheManagers that are re-created. As we've increased the connection pool size to 500, this is a dirty solution as I can't control how many CacheManagers are spawn (500 connections x n...) and I loose the whole purpose of having a common connection pool. So this is not the right approach. Do you have any suggestions and/or ideas of how I could give to each handler the same CacheManager without it being destroyed on asynctio.TimeoutError so I can use the connection pool and have a single CacheManager instance at any given time ? Thank you very much for your help with this issue ! :)

Do you have the script to generate the load in order to reproduce the error in the example you've posted? I would like to play a bit with it to see it for myself.

Hi Manuel,
I managed to reproduce it with the following script:
import random
import string
import logging
import asyncio
import aiohttp
import aiocache

from aiohttp import web

logger = logging.getLogger(__name__)

class CacheManager:
    def __init__(self):
        self.cache = aiocache.MemcachedCache(port=11211, pool_size=2)

    def get(self, key):
        try:
            return self.cache.get(key, timeout=0.1)
        except asyncio.TimeoutError as e:
            logger.error("CacheManager.get exception:")
            logger.error(e)
        return None

    def set(self, key, value):
        return self.cache.set(key, value)

async def handler_get(req):
    try:
        data = await req.app['cache'].get('testkey')
        if data:
            return web.Response(text=data)
    except asyncio.TimeoutError as e:
        logger.error("handler_get exception:")
        logger.error(e)

    data = ''.join(random.choices(string.ascii_uppercase + string.digits, k=1024))
    await req.app['cache'].set('testkey', data)
    return web.Response(text=data)

if __name__ == '__main__':
    app = web.Application()
    app['cache'] = CacheManager()
    app.router.add_route('POST', '/', handler_get)
    web.run_app(app)

The pool size is small (2) and the timeout is low (0.1) so that the asyncio.TimeoutError occurs. Once it has occurred, the log is full of 2017-04-24 11:18:34,843 ERROR __main__(33) | handler_get exception: and even if I wait a few minutes and retry benchmarking, all the requests fail. Also, the asyncio.TimeoutError is never catched inside the CacheManager as seen before. Thanks for your feedback if you manage to have the same results as I did.

So, continuing the investigation, I can now catch the asyncion.Timeout successfully. But the issue of connections freezing still persists. I noticed that when there asyncio.Timeout exception occurs, the method aiomcache.pool.release is not called anymore, so it seems the connections that are interrupted on the timeout are never released.
I also noticed that the Memcached connection pool (from aiomcache.MemcachePool) looks like this '_pool': <Queue at 0x7b5913c1ba90 maxsize=2 tasks=2307>. I didn't find a way to get the connection used when the Timeout occurs so I could force-release it.
If I increase the connection pool, this error occurs a lot less but can still happen. I also noticed that on average, the connections that was used during a Timeout needs approx 10 minutes to be closed / garbage-collected. After waiting 10 minutes, I can make requests again without issues  (until a new Timeout occurs).

Huh, that's interesting and nice progress. Being able to catch the exception makes much sense, previous situation you were describing sounded so weird. Did you have to change anything regarding the catching of the exception?
Regarding the release not being called, I'll check this afternoon too. There must be some bug or something because in the test script I posted in the previous comment pool was recovering fine.
PS: I don't know if its the case, but this starts to mark the path for this being a bug for aiomcache more than for aiocache (although I will solve it anyway ofc :P).

Yep, I had to await the return of self.cache.get(key) for the exception to be catched. Otherwise I returned a co-routine and I had exited the function before the asyncio.Timeout could be catched. So this is a non-issue, just a big gotcha.
I don't know if it's a aiomcache issue in itself because aiomcache doesn't do any asyncio.Timeout management.

Yeah, but still the user can use the asyncio.wait_for when calling aiomcache. Indeed, problem comes from aiocache:
import random
import string
import logging
import asyncio
import aiohttp
import aiocache
import aiomcache

from aiohttp import web

logger = logging.getLogger(__name__)

class CacheManager:
    def __init__(self):
        self.cache = aiomcache.Client("<IP_ADDRESS>", 11211, pool_size=2)

    async def get(self, key):
        return await asyncio.wait_for(self.cache.get(key), 0.1)

    async def set(self, key, value):
        return await asyncio.wait_for(self.cache.set(key, value), 0.1)

async def handler_post(req):
    try:
        data = await req.app['cache'].get(b'testkey')
        if data:
            return web.Response(text=data.decode())
    except asyncio.TimeoutError as e:
        logger.error("handler_post exception:")
        logger.error(e)

    data = ''.join(random.choices(string.ascii_uppercase + string.digits, k=1024))
    await req.app['cache'].set(b'testkey', data.encode())
    return web.Response(text=data)

if __name__ == '__main__':
    app = web.Application()
    app['cache'] = CacheManager()
    app.router.add_route('GET', '/', handler_post)
    web.run_app(app)

I've changed the query to a GET one so to do the load testing: ab -n 1500 -c 60 http://<IP_ADDRESS>:8080/

So you managed to have the same issue ? That's good news ! Now we need to find why this happens and how to fix this :) Thank you so much for your cooperation with this !

Yup, sorry my previous comment was wrong. I've managed to reproduce both using aiocache and just aiomcache (my example is just with aiomcache).
no problem, checking it because aiocache really depends on aiomcache :P

Just for the record, seems the same example with RedisCache (uses aioredis as connector) recovers fine, no extra work needed.

check if aioredis uses streams api.

@fafhrd91 It seems like it's also the case, because it uses asyncio.open_connection.

yup, it uses asyncio.open_connection but the way of managing it is different, https://github.com/aio-libs/aioredis/blob/master/aioredis/pool.py#L50.

@achedeuzot I'm closing this issue because there is nothing in aiocache that can be done to fix this. This week I'll start working on aiomcache to fix it.

@argaen Great ! :D


Fix wake_on_lan ping with None as host

With the new update, wake_on_lan requires a host key in the configuration
Description:
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#2235
Example entry for configuration.yaml (if applicable):

Checklist:
If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] New dependencies have been added to the REQUIREMENTS variable (example).
[x] New dependencies are only imported inside functions that use them (example).
[x] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

If the code does not interact with devices:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[x] Tests have been added to verify that the new code works.

Hi @iamtpage,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

I'm marking this as a breaking change, even though someone else made it break. We need to remember to update the docs, and mention this when released.

Actually, I think we should instead convert self._host to a string on lines 89 and 92.
str(self._host)

Now the question is if we should retain the old behavior where host is optional. I'm thinking we don't need to have it required now since the code will work passing a stringified None to the subprocess call.

Yeah that would make sense, making it required would be considered a breaking change, and casting it to a string wouldn't break anything if it wasn't there.

Thanks! Updated the PR title to reflect latest changes.

Cherry-picked for 0.40.1

I'm confused @balloob. I don't see any updates here or in the referenced PR here.

@brianjking having a host is still optional after this merge, we just changed how it is handled on the backend.  So updating documentation is not necessary, and I closed the documentation PR.

Why is the external ping command executed at all if host is None?

Because WOL only needs a Mac address to work, the host entry is to be able to verify if the host is woken up (by pinging it, and with ping you need a host IP to ping)

Yes, WoL needs only a Mac to wake the host, but as you said, for pinging the host you also need the IP. My point is, if host is None (no IP), there is no need to ping at all, so the code should IMHO be changed to skip the execution of the ping command in this case.


Tab auto completion stopped working

System Details

posh-git version/path: <IP_ADDRESS>  C:\tools\poshgit\dahlbyk-posh-git-9bda399\src
PowerShell version: 7.4.0
git version 2.40.0.windows.1
OS: Microsoft Windows NT 10.0.19045.0

$PROFILE file has
Import-Module 'C:\tools\poshgit\dahlbyk-posh-git-9bda399\src\posh-git.psd1'

Issue Description
Tab auto-completion has stopped working.
e.g. git check feat<hit tab> doesn't complete to git checkout feature/something
It used to work for me, and I'm unsure what has caused this. I have not done any recent upgrade of posh-git.
Is it the Powershell version? I do remember installing a pwsh update.
Tried upgrading, still have the same issue
choco upgrade poshgit

Tried reinstalling poshgit, still have the same issue
choco uninstall poshgit
choco install poshgit

Apologies for lack of details as I am a bit lost as to why it has suddenly stopped working.

Andrei helped me figure this out.
The latest version 1.1.0 of posh-git doesn't get installed via choco.
So added this to $PROFILE and tab completion now works
# install and import poshgit
if (-Not $(Get-Module -ListAvailable -Name posh-git)){
     Install-Module posh-git -RequiredVersion 1.1.0 -Scope CurrentUser -Force
}

Import-Module posh-git


(WIP)fix: use preparestmt in trasaction will use new conn

[] Do only one thing
[] Non breaking API changes
[] Tested

What did this pull request do?

fix: use preparestmt in trasaction will use new conn

User Case Description
func TestGORM(t *testing.T) {
	user := User{Name: "jinzhu"}
	if err := DB.Transaction(func(tx *gorm.DB) error {
		tx.Session(&gorm.Session{PrepareStmt: true}).Create(&user)
		return errors.New("test")
	}); err != nil {
		t.Error(err)
	}
	var result User
	if err := DB.First(&result, user.ID).Error; err != nil {
		t.Errorf("Failed, got error: %v", err)
	}
	t.Log(result.ID)
}

it will create user

LGTM

Maybe this causes memory leak due new connections?
https://github.com/go-gorm/gorm/issues/3553

Maybe this causes memory leak due new connections?
#3553

@pablodz does not lead to memory leaks, but does not guarantee that transactions.


TP-Link HS110 v3 not working

Hi!
I'm running several different HS110s without a problem. Now I just got a new one which doesn't work.
I always get:
Warning: stream_socket_client(): unable to connect to tcp://<IP_ADDRESS>:9999 ...
and
Fatal error: Uncaught UnexpectedValueException: Failed to connect to HS110...
After some research I realized that hardware version 2 uses some different encryption. I found a solution from your referenced softScheck-repository.
Here's a link:
[(https://github.com/softScheck/tplink-smartplug/issues/41)]
I've downloaded the softScheck-python-client and replaced:
def encrypt(string):
    key = 171
    result = pack('>I', len(string))
    for i in string:
        a = key ^ ord(i)
        key = a
        result += chr(a)
    return result

with
def encrypt(string):
    key = 171
    result = "\0\0\0"+chr(len(string))
    for i in string:
            a = key ^ ord(i)
            key = a
            result += chr(a)
    return result

This makes the new HS110 as well as the old ones work.
Here's the output of a new HS110:
python tplink_smartplug.py -t <IP_ADDRESS> -c info
Sent:      {"system":{"get_sysinfo":{}}}
Received:  {"system":{"get_sysinfo":{"sw_ver":"1.5.4 Build 180815 Rel.121440","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(EU)","mac":"68:FF:7B:4C:A7:41","dev_name":"Smart Wi-Fi Plug With Energy Monitoring","alias":"TP-Link V3","relay_state":1,"on_time":982,"active_mode":"none","feature":"TIM:ENE","updating":0,"icon_hash":"","rssi":-29,"led_off":0,"longitude_i":0,"latitude_i":0,"hwId":"044A516EE63C875F9458DA25C2CCC5A0","fwId":"00000000000000000000000000000000","deviceId":"80060C4F3D0EF98629D8DA6A675FD82D1B56529B","oemId":"1998A14DAA86E4E001FD7CAF42868B5E","next_action":{"type":-1},"err_code":0}}}
I tried updating your function encrypt($string) in TPLinkDevice.php, but it seams there's something wrong. At least both don't work after my update. Basically the difference in python is the line result = "\0\0\0"+chr(len(string)) instead of result = pack('>I', len(string))
Any help would be great!

I found that changing the inital value of reduce does the trick, works on both but seams to take pretty long on HW v2.
protected function encrypt($string)
{
    $key = 171;
    return collect(str_split($string))
        ->reduce(function ($result, $character) use (&$key) {
            $key = $key ^ ord($character);
            return $result .= chr($key);
        },
            "\0\0\0".chr(strlen($string)));
}

Here's a little update, I tried using pack instead and convert strlen
protected function encrypt($string)
{
    $key = 171;
    return collect(str_split($string))
        ->reduce(function ($result, $character) use (&$key) {
            $key = $key ^ ord($character);
            return $result .= chr($key);
        },
			  pack('N', strlen($string)));
}

Main problem is that it takes pretty long and most of the time I get a failed connection.

I did some more testing, here's some runtime difference:

"sw_ver":"1.2.5 Build 180410 Rel.182657","hw_ver":"1.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(EU)"
Total Execution Time: 0.00071203311284383 Mins

"sw_ver":"1.5.4 Build 180815 Rel.121440","hw_ver":"2.0","type":"IOT.SMARTPLUGSWITCH","model":"HS110(EU)"
Total Execution Time: 1.9997138023376 Mins

Really strange, using the modified Python-Code from SoftScheck there's no notable execution-time-difference.

Ah ok, thanks for this feedback.
Let me have a look at this and get back to you. I don't have a v2 handy here at the moment.

For reference. Will deal with this soon.
https://github.com/softScheck/tplink-smartplug/issues/22#issuecomment-331464459

Here's a little update, I tried using pack instead and convert strlen
protected function encrypt($string)
{
    $key = 171;
    return collect(str_split($string))
        ->reduce(function ($result, $character) use (&$key) {
            $key = $key ^ ord($character);
            return $result .= chr($key);
        },
			  pack('N', strlen($string)));
}

Main problem is that it takes pretty long and most of the time I get a failed connection.

Ok I've tested this with a V1 hardware and it's working fine.
I found this answer on SO that might help a little https://stackoverflow.com/a/23532422

The differences occurs because of different integer sizes. While L in the php version of pack() uses >hardcoded 32bit integers, Python by default uses the machine integer size. If you are working on a >64bit system you'll notice the difference. (As shown in the question)

So I was wondering if you are using the wrong pack() format.
Would you change the letter N here

  	  pack('N', strlen($string)));

To a "J" and then to an "L" and then to an "I" . (thats a capital 'eye') and see if it makes any difference to the new hardware.
I do not have a v2 or v3 to test unfortunately.
Thanks.

I only have v1 hardware, but I did manage to get my LB110 (light bulb) to respond by changing the pack to the following
strrev(pack('I', strlen($string)))

I only have v1 hardware, but I did manage to get my LB110 (light bulb) to respond by changing the pack to the following
strrev(pack('I', strlen($string)))

Further testing, I found the LB110 has a very high delay while waiting for the response stream. Adding
stream_set_timeout
You are able to control the stream timeout, without this each command was waiting around 30 seconds for a response, I think the TCP connection is left open on the newer units and PHP just sits waiting for further stream content until it ends. Where as the older ones appear to end communication more quickly.
See my branch how I implemented it.
https://github.com/shanerutter/tplinksmartplug/commit/8485ca97533bcbe125cda66df34bea3b03c87c3b

I just exchanged N with I which did make any difference in my case (tested on Xamp and Apache on a 32bit Debian). Delay in my case was around a minute. I'll try the stream-timeout!

Great, stream-timeout solved the delay!
Here are some stats:
V1 Hardware -> Total Execution Time: 0.00020548502604167 Mins
V2 HW with string-lenght-update -> Total Execution Time: 0.98465118408203 Mins
V2 HW with stream-Timeout -> Total Execution Time: 0.084228316942851 Mins
Great solution Shane!


cmd shims not being created

I'm having trouble with installing scoop applications on a pretty fresh Windows 10 PC. After installing scoop, I ran scoop install wget and here was the output:
Installing 'wget' (1.19.4) [64bit]
Loading wget-1.19.4-win64.zip from cache
Checking hash of wget-1.19.4-win64.zip... ok.
Extracting... done.
Linking ~\scoop\apps\wget\current => ~\scoop\apps\wget\1.19.4
Creating shim for 'wget'.
Running post-install script...

From the looks of it, one would think the installation went fine but then just running wget in the Windows Command Prompt gave the error:
Access is denied.

When I looked in the sims directory, I noticed that there was not wget.cmd:
03/19/2018  11:11 AM    <DIR>          .
03/19/2018  11:11 AM    <DIR>          ..
03/19/2018  11:09 AM               102 scoop
03/19/2018  11:09 AM               348 scoop.cmd
03/19/2018  11:09 AM               160 scoop.ps1
03/19/2018  11:11 AM               154 wget.ps1
03/19/2018  11:11 AM                60 wget.shim
               5 File(s)            824 bytes

I tried also installing 7zip but got the same results. Installation goes fine…
Installing '7zip' (18.01) [64bit]
Loading 7z1801-x64.msi from cache
Checking hash of 7z1801-x64.msi... ok.
Extracting... done.
Linking ~\scoop\apps\7zip\current => ~\scoop\apps\7zip\18.01
Creating shim for '7z'.
Creating shortcut for 7-Zip (7zFM.exe)
'7zip' (18.01) was installed successfully!```

…but then running 7z results in an access denial message like for wget and when I check the shims directory, there's no 7z.cmd to be found:
03/19/2018  11:18 AM    <DIR>          .
03/19/2018  11:18 AM    <DIR>          ..
03/19/2018  11:18 AM               152 7z.ps1
03/19/2018  11:18 AM                58 7z.shim
03/19/2018  11:09 AM               102 scoop
03/19/2018  11:09 AM               348 scoop.cmd
03/19/2018  11:09 AM               160 scoop.ps1
03/19/2018  11:11 AM               154 wget.ps1
03/19/2018  11:11 AM                60 wget.shim

If I start a PowerShell session and type out wget.ps1 or 7z.sp1 then I can see it finds and runs the apps.
And “yes” to…

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.248
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.248
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

The IT Crowd 😁👍
*.cmd files only get created if the program provides a cmd file.
Instead, there should be a copy of ~\scoop\apps\scoop\current\supporting\shimexe\bin\shim.exe named 7z.exe.
Can you check if the source file exists?
Or maybe you antivirus killed it?

To expand on @r15ch13's point. Your %USERPROFILE%\scoop\shims folder should look like this:
C:\Users\you\scoop\shims>dir 7z.* wget.*
 Volume in drive C is drive_c
 Volume Serial Number is DEAD-BEEF

 Directory of C:\Users\you\scoop\shims

02/20/2018  12:32 PM             7,168 7z.exe
02/20/2018  01:04 PM               152 7z.ps1
02/20/2018  01:04 PM                56 7z.shim

 Directory of C:\Users\you\scoop\shims

02/20/2018  12:32 PM             7,168 wget.exe
02/20/2018  03:53 PM               154 wget.ps1
02/20/2018  03:53 PM                58 wget.shim
               6 File(s)         14,756 bytes
               0 Dir(s)  846,820,319,232 bytes free

@r15ch13 @rasa So it turns out it was the anti-virus after all. In some trials, I noticed that the shim executable was being created but then would disappear soon after, giving an access denial during the times it would appear to exist. I should have read the “Antivirus and Anti Malware Problems” wiki but I didn't suspect the anit-virus because scoop was installing and running perfectly on another box. The new PC had a different anti-virus program that was a tad bit ruder. After white-listing scoop, it was all tickety-boo again. :rainbow: Thanks for dropping in to point me in the right direction and sorry for wasting any of your time.


Context menu of Developer tools renders behind dev tools window

ADS Version: Dev, Insiders

Open Dev tools (undocked) and select any element
Right click to open context menu.

Context menu not reachable in dev tools:

Issue also reproduced in VS Code in undocked mode (https://github.com/microsoft/vscode/issues/196529).
But in docked mode, context menu works fine.
Mitigation:
Run DevTools in docked mode while this issue gets fixed upstream.

Will close the issue and will follow up on issue in vscode repo, since it's upstream.


[QUERY] How do you set Adaptive Sampling Off in Azure Monitor Trace Exporter

Library name and version
Azure.Monitor.OpenTelemetry.Exporter 1.0.0-beta.13
Query/Question
I'm trying to figure out how to turn off adaptive sampling in a .net core console application when using Azure.Monitor.OpenTelemetry.Exporter 1.0.0-beta.13.
I just don't see any kind of configuration option in the Diagnostics, or anywhere else in the trace exporter.				.WithTracing(builder => builder
.AddConsoleExporter()
.AddAzureMonitorTraceExporter(o =>
{
o.ConnectionString = appInsightsConnection;
o.Diagnostics.IsDistributedTracingEnabled = true;
}))
I tried setting it directly in the ApplicationInsights section of my config file, but that didn't work either
"Logging": {
"LogLevel": {
"Default": "Information"
},
"ApplicationInsights": {
"LogLevel": {
"Default": "Information"
},
"EnableAdaptiveSampling": false,
}
},
Any ideas?
Environment
Visual Studio 2<IP_ADDRESS> running on Windows 11

@joebeernink Adaptive sampling is not supported in Azure Monitor exporter. Only fixed-rate sampling is supported. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=aspnetcore#enable-sampling

So I've set my fixed-rate sample to 1.0F, but somewhere my traces are still being throttled:
			.WithTracing(builder => builder
				.AddConsoleExporter()
				.AddAzureMonitorTraceExporter(o =>
				{
					o.ConnectionString = appInsightsConnection;
					o.Diagnostics.IsDistributedTracingEnabled = true;
                    o.SamplingRatio = 1.0F;
				}))

My process is a batch process with a large burst over a few minutes every couple of hours. Need a way to get all the traces during each run.

I found the issue...
I was still using the ApplicationInsights SDK for metrics (TelemetryClient). Loading both the AzureMonitorOpenTelemetryExporter and the App Insights SDK forces Adaptive Sampling to kick in, even if you aren't using the SDK's tracing... Once I removed all references to the App Insights SDK by converting from TelemetryClient to System.Diagnostics.Meters, the throttling went away, and I could see all of my logs.


Add sha256 for File info

For example:
File file = artifactory.repository(repo).file(path).info()
file.getChecksums().getSha256()

Thanks @liorhson!
Added a small inline comment.
Also, can you please add the new API to the README.md?

Done!
@eyalbe4


Pure Angular 'angular-confirm'

It would be great to have the jQuery dependency taken off. Most would prefer the smallest footprint for their apps.

@thinkdj but the core of this library is jquery.

@jofftiquez I got that after commenting, and exploring craftpip's other works.
The request still stands as a good-to-have feature request 😄  as most people wouldn't want to add jQuery overhead and might be looking for an angular-only solution for their angular projects

@thinkdj well... actually I'd want that too :-D

After searching a lot, this is by far the best looking, UX-focused, robust modal available for Angular1.x. I'm using it :)

@thinkdj Hey, Im thinking, have you tried angular material design?


fix: Enforce rooms to be located at (0,0)

@BHSDuncan has already closed this issue as the bug was a small room misconfiguration, however on reflection, I thought it would be good to fix as it is easy to detect and flag to the developer. If we can do it in the demo levels, they can do it in the real world.
If the character is at the edge of a terrain, and you try to make them walk further, the walk_stop command will reset their location by the room offset amount (ignoring any terrains and repositioning them by an addition room's pixel offset amount each time you click).

Hmm, is it possible that a developer could have a good reason for not having the room located at (0, 0)? Yes, it looks like it would affect how walking works, but playing devil's advocate, do we want to impose a constraint that might prevent something in the future?
Personally I'm ok with doing so, although maybe we should make it a warning and not so much an error.

Hmm, is it possible that a developer could have a good reason for not having the room located at (0, 0)? Yes, it looks like it would affect how walking works, but playing devil's advocate, do we want to impose a constraint that might prevent something in the future?
Personally I'm ok with doing so, although maybe we should make it a warning and not so much an error.

The ESCRoom node itself should be in (0,0). Its content can be wherever gamedev wants, even if some content is suppose to be on the left of the room.

@BHSDuncan Can you please approve?


added loader to all possible pages

issue number #518
added loader to all possible forms
screen short:

ss2:

ss3:

please review this pr @dhairyagothi

there are issues with deployment 😭😭

there are issues with deployment 😭😭

you didn't replied me only you can see the issue in the deployment i cannot see i was waiting for you to tell me the issue

there are issues with deployment 😭😭

you didn't replied me only you can see the issue in the deployment i cannot see i was waiting for you to tell me the issue can you tell me the issue i will try to resolve it @dhairyagothi

no problem bro i will resolve just few lines change , its issue with vercel deployment

there are issues with deployment 😭😭

you didn't replied me only you can see the issue in the deployment i cannot see i was waiting for you to tell me the issue can you tell me the issue i will try to resolve it @dhairyagothi

no problem bro i will resolve just few lines change , its issue with vercel deployment

ok thanks @dhairyagothi


[fix][client] Fix duplicate messages caused by seek

Signed-off-by: Zixuan Liu<EMAIL_ADDRESS>Motivation
When subscribing to a message on a partitioned topic, do the seek operation and then consume the messages, which sometimes will receive duplicate messages.
The root cause is that when a seek operation is performed if have the task in the pendingReceives queue, we will get old messages from before doing the seek operation.
Modifications

Add a seek check to the logic of the received message, when the seek operation is in progress, skip put the message to incomingMessages queue

Verifying this change
org.apache.pulsar.broker.service.SubscriptionSeekTest#testSeekByFunctionAndMultiTopic cover this changes.
Documentation

[x] doc-not-needed

/pulsarbot rerun-failure-checks

org.apache.pulsar.broker.service.SubscriptionSeekTest#testSeekByFunctionAndMultiTopic cover this changes.

Why didn't it fail before?

org.apache.pulsar.broker.service.SubscriptionSeekTest#testSeekByFunctionAndMultiTopic cover this changes.

Why didn't it fail before?

@BewareMyPower I don't know how to explain, the master branch cannot reproduce this issue, but the #15568 can reproduce this issue.

Did you mean after applying the changes of #15568 will this test fail?

Did you mean after applying the changes of #15568 will this test fail?

Yes, could you take a look this issue?

Sure.

Yes this PR fixes the race condition when seek is called after subscribe, but I think there is another bug that subscribe doesn't looks like a synchronous operation. Without this PR, the test could still pass after sleeping for a while before seek.
        org.apache.pulsar.client.api.Consumer<String> consumer = pulsarClient
                .newConsumer(Schema.STRING).startMessageIdInclusive()
                .topics(Arrays.asList(topicName, topicName2)).subscriptionName("my-sub").subscribe();

        Thread.sleep(2000);

        consumer.seek((partitionedTopic) -> {

I think the root cause is that MultiTopicsConsumerImpl#subscribeFuture() completed too early.

subscribe is an async task, when you sleep 2s, it means we have received all messages from the broker. If you remove this sleep, there are some messages coming to the client from the broker.

/pulsarbot rerun-failure-checks

No reviewer, so close this PR.

Hey @nodece, why this PR was closed? Does it it mean that this PR and https://github.com/apache/pulsar/pull/15568 will not be  delivered to the maistream ?

Hey @nodece, why this PR was closed?

Currently, there is no reviewer pushing this PR, so I decided to close this PR. If anyone is willing to push, I will reopen.

Does it it mean that this PR and #15568 will not be delivered to the maistream ?

Right!


Delete Edge from empty subquery with bad performance

According to the documentation, edges from a subquery should be done as:
DELETE EDGE E WHERE @rid IN (SELECT FROM #11:0)

Now, if record 11:0 has been deleted or if the subquery returns empty results, orientdb will scan the entire edge class and you'll get a warning that the query returned a lot of records, which of course is bad for performance. Obviously, if the subquery is empty the command should just terminate. I'm using orientdb 2.1.13.

For DELETE Vertex this is not the case.
DELETE VERTEX FROM (Select from DELETED_RECORD)

works like a charm.

FYI, what we're trying to do here is to lock the record during delete which is actually a part of #3595 .
DELETE VERTEX FROM (Select from SOME_VERTEX LOCK RECORD)

DELETE EDGE E WHERE @rid IN (SELECT FROM SOME_EDGE LOCK RECORD)

Hi @oliverfleetwood
I think it's worth implementing the following syntax:
DELETE EDGE #rid

I marked it as an enhancement, I'll work on it asap
Thanks
Luigi

@luigidellaquila is this already supported by 3.0?

Hi @lvca
I have to check it, but in case we can implement it
Thanks
Luigi


Constant identifiers in two-part placeholders.

Sometimes we need a constant denotation to agree with an argument:
My [body_part] hurts.

One could pass "head" here, but not "legs", because "My legs hurts" is not a grammatically correct sentence.
This is the correct way:
My [body_part] ["hurt"][;body_part]

so the verb "hurt" can see if body_part is plural.

This particular example is quite interesting. Say, in our game we have different body parts: head, torso and legs, and these are separate "regions" where a character can be hit. In this case a word "leg" would not make sense, since "legs" is an atomic region, there are not two legs, but just a "legs" object.
So instead of this:
"leg" {
  leg [Sing]
  legs [Plur]
}

we have this"
"body_regions.legs" [Plur] {
  legs
  // If this is not English, but say Russian, then there would be more word forms (ноги, ног, ногам etc), all of them having Plural persistent grammeme.
}


Missing Limitation for Storage Size on Integration Testing for set_contract_storage()

Summary
Closes #1960

[n] y/n | Does it introduce breaking changes?
[n] y/n | Is it dependant on the specific version of cargo-contract or pallet-contracts?

Description

Issue Description
The storage in the integration environment does not have the same limitation as in the e2e environment. In the e2e environment, the storage size is limited by 16380 bytes.
Issue Documentation & Test Case
https://github.com/CoinFabrik/on-ink-integration-tests/tree/main/test-cases/set-contract-storage
Current Status
Missing Limitation Implemented. Test Cases Passed. Pull Request Performed to Corresponding Repository.
Implementation Notes
The function set_contract_storage() sets the storage in a contract. There was a missing validation in integration tests that was present in e2e. This validation checked that the size of the storage set did not exceed 16380 bytes.We added a validation to the function set_contract_storage() in integration tests that checks the size of the input value against the same limit set in e2e test: 16380 bytes. In case this limit is exceeded, a panic is raised with the message: "Value too large to be stored in contract storage, maximum size is {} bytes".
Updated Documentation
We updated the original documentation of this issue in our repository, adding the section Update on Correcting this Issue and informing of the correction.There is no necessary update to the associated documentation: ink_env set_contract_storage.
Testing Guide
In the directory integration-tests/set_contract_storage of the target directory, we include in our pull request a test case showing that the observed implementation difference has been corrected. Note that this test is different from the original test case in our repository, which showed the difference.In order to run the integration tests run:cargo testIn order to run the e2e tests run:cargo test -–features e2e-testsThese tests are run separately because we do not need to compare their results.
Checklist before requesting a review

[x] My code follows the style guidelines of this project
[x] I have added an entry to CHANGELOG.md
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added tests that prove my fix is effective or that my feature works
[x] Any dependent changes have been merged and published in downstream modules

@ramirez7358 Could you merge master into your PR and resolve the conflicts?


Re-factor the PDF version parsing in the worker-thread

Part of this is very old code, and back when support for parsing the catalog-version was added things became less clear (in my opinion). Hence this patch tries to improve things, by e.g. validating the header- and catalog-version separately.

/botio unittest

/botio test

Looks cleaner; thanks!


Limit is not working on multiple selection

Seems to be working fine in latest version http://plnkr.co/edit/IdhcFthg0K1WC8JM4Zqz?p=preview
Please include more details when raising an issue preferably with examples.

Hi!
I had the same issue, so I ended up here, but actually it was my mistake, maybe this info can help others.
What was happening in my case was that I was passing to the limit attribute the reference to the variable ( limit="variable")  instead of the value (limit="{{variable}}").


Machines not displayed

The following shows the turtlesim node, but not the machine. setting default=true on the machine populates the machine field in node properties, but still does not display the machine in the tree.
<launch>
  <machine name="turtlesim_machine" address="testaddr"/>
  <node pkg="turtlesim" type="turtlesim_node" name="turtle"/>
</launch>

The setHidden() function on the QTreeWidgetItem  is never called with True for machines in filter_launch_entry, which is why they are hidden.

Apparently forgot about those as there is no separate "machine" checkbox (and I don't think it makes sense to have one).


Cloudp 197014 sigterm mongot

Proposed changes

Jira ticket: CLOUDP-#

Closes #[issue number]
Checklist

[ ] I have signed the MongoDB CLA
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
[ ] I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
[ ] I have updated test/README.md (if an e2e test has been added)
[ ] I have run make fmt and formatted my code

Further comments

Merging this changes in https://github.com/mongodb/mongodb-atlas-cli/pull/2309


Add integration tests

It seems that it fails on watchOS because there is no SIGNAL API on this OS.

Wow, exporting test.xcresult as an artefact is an excellent idea. I wish we could have a dump of the Application Support folder in this report as well, if it allows arbitrary attachments to be added.


restructure docs

This substantial PR addresses the following documentation changes:

[x] Deletion of unnecessary files on the tree. 🟥
[x] Update the structure of the documentation to one more modular. 🔬
[x] Edit content for the introduction - kept the same, just slightly trimmed. ✂
[x] Create a Get Started section containing:

[x] installation 📨
[x] setup ✍🏽

[x] Submit PR for review. 🧑💻

Awesome work @laisbsc this is looking like great progress to me.

@laisbsc I changed the branch the commit goes into dev

This did cause some merge conflicts. You'll need to make sure in the future to always branch off of dev and not main otherwise there will be these merge conflicts. We will probably need to add contribution docs around specifically how to create a PR since we will not be following the typical github flow.

@laisbsc I changed the branch the commit goes into dev

Cool. I thought I had changed the branch to merge. Sorry for the distraction and thank you for fixing it.

This did cause some merge conflicts.

I will address them now.

You'll need to make sure in the future to always branch off of dev and not main otherwise there will be these merge conflicts.

Noted.

We will probably need to add contribution docs around specifically how to create a PR since we will not be following the typical GitHub flow.

This is the next step. Adding contribution guidelines for QHub on code (specifying tests and best practices) and docs (where to deploy and formatting conventions).
Thanks for the help!

@laisbsc this should have been merged until we had time to check that CI passed. The flake8 errors are due to indentation of the strings in setup.py.

Resolved issue with https://github.com/Quansight/qhub-cloud/pull/330


Missing UI/API fixes

network & service config save & retrieve
Handling default network in services UI/API
service attach command must honor container-name
service and network should support labels
A few more usability bugs

Handled the following via https://github.com/docker/libnetwork/pull/294

Handling default network in services UI/API
service attach command must honor container-name
A few more usability bugs

@mavenugo is this issue still being used for tracking or can we close it?

No longer needed


Trying to edit a simple script crashes Sublime Text 3 beta

When I tried to add a PRISM command to an existing GDL script, ST3 (and ST2 as well) crashed.
Here's the crash log:
Process:         Sublime Text [19020]
Path:            /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
Identifier:      com.sublimetext.3
Version:         Build 3075 (3075)
Code Type:       X86-64 (Native)
Parent Process:  launchd [158]
User ID:         501
Date/Time:       2015-03-10 13:24:59.073 +0100
OS Version:      Mac OS X 10.8.5 (12F45)
Report Version:  10
Crashed Thread:  0  Dispatch queue: com.apple.main-thread
Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
terminate called throwing an exception
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff8c3f9212 __pthread_kill + 10
1   libsystem_c.dylib             	0x00007fff88dcab24 pthread_kill + 90
2   libsystem_c.dylib             	0x00007fff88e0ef61 abort + 143
3   libc++abi.dylib               	0x00007fff8bf349eb abort_message + 257
4   libc++abi.dylib               	0x00007fff8bf3239a default_terminate() + 28
5   libobjc.A.dylib               	0x00007fff917f0887 _objc_terminate() + 111
6   libc++abi.dylib               	0x00007fff8bf323c9 safe_handler_caller(void (*)()) + 8
7   libc++abi.dylib               	0x00007fff8bf32424 std::terminate() + 16
8   libc++abi.dylib               	0x00007fff8bf3361b __cxa_rethrow + 85
9   libobjc.A.dylib               	0x00007fff917f0575 objc_exception_rethrow + 40
10  com.apple.CoreFoundation      	0x00007fff91bf1146 CFRunLoopRunSpecific + 390
11  com.apple.HIToolbox           	0x00007fff86d2feb4 RunCurrentEventLoopInMode + 209
12  com.apple.HIToolbox           	0x00007fff86d2fc52 ReceiveNextEventCommon + 356
13  com.apple.HIToolbox           	0x00007fff86d2fae3 BlockUntilNextEventMatchingListInMode + 62
14  com.apple.AppKit              	0x00007fff8f622533 _DPSNextEvent + 685
15  com.apple.AppKit              	0x00007fff8f621df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
16  com.apple.AppKit              	0x00007fff8f6191a3 -[NSApplication run] + 517
17  com.sublimetext.3             	0x000000010cc0132d px_run_event_loop() + 182
18  com.sublimetext.3             	0x000000010c9cec4d main + 3105
19  com.sublimetext.3             	0x000000010c9ce024 start + 52

Hi asomorjaj!
I already know this problem. It seems, it's a Mac related problem, under Windows 7 and ST 3 it is doing fine. [Sublime Text 2 has issues on both systems though.]
I think the syntax definition became to heavy (in terms of complexity).
Please try version 0.2.2, this version has not a complete syntax but should work til I know how to fix it.

Thanks!
Running this on 10.10 gives more context:
terminating with uncaught exception of type oniguruma::regex_error: end pattern with unmatched parenthesis in regex (?i)(\s*(RETURN|ENDWHILE|NEXT|GOSUB)

Thank you very much, asomorjai!
There we got our problem (at least I hope so).

Thanks, it works on Mac OS X as well!

Wonderful! Nice to hear that.


[Transfer to CPU version] Refence BackgroundMattingV2 Colab you posted

Hi, thanks for your awesome work!
description
I have tried code you posed in colab. However, those code are running in GPU not CPU, I, unfortunatly, have not GPU. Then I wirite a CPU version according to your code.
Could you please help me to address this issue?
virtual-machine:~/BackgroundMattingV2$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 25, in <module>
    pha, fgr = model(src, bgr)[:2]
TypeError: 'collections.OrderedDict' object is not callable

attachment code: python3
import torch
from torchvision.transforms.functional import to_tensor, to_pil_image
from PIL import Image

# model = torch.jit.load('model/pytorch_resnet50.pth').cuda().eval()
"""
RuntimeError: Attempting to deserialize object on a CUDA device but
torch.cuda.is_available() is False. If you are running on a CPU-only machine,
please use torch.load with map_location=torch.device('cpu') to map your
storages to the CPU.
"""

model = torch.load('model/pytorch_resnet50.pth',map_location ='cpu')

src = Image.open('images/img/12.png')
bgr = Image.open('images/bgr/12.png')

src = to_tensor(src)
bgr = to_tensor(bgr)

if src.size(1) <= 2048 and src.size(2) <= 2048:
  model.backbone_scale = 1/4
  model.refine_sample_pixels = 80_000
else:
  model.backbone_scale = 1/8
  model.refine_sample_pixels = 320_000

pha, fgr = model(src, bgr)[:2]

com = pha * fgr + (1 - pha) * torch.tensor([120/255, 255/255, 155/255], device='cuda').view(1, 3, 1, 1)

to_pil_image(com[0].cpu())

to_pil_image(pha[0].cpu()).save('pha.png')
to_pil_image(fgr[0].cpu()).save('fgr.png')
to_pil_image(com[0].cpu()).save('com.png')

Looking forward  to your reply!
Best wishes,
@Charmve

You are loading the model wrong.
Use the original line that you currently comment out. Just remove .cuda().
Also, to use that line, you need to download the TorchScript weights, not the PyTorch weights.

You are loading the model wrong.
Use the original line that you currently comment out. Just remove .cuda().
Also, to use that line, you need to download the TorchScript weights, not the PyTorch weights.

Thanks for your reply！
The model is loaded successful.
But, when I use if src.size(2) <= 2048 and src.size(3) <= 2048: line, it goes wrong.
virtual-machine:~/BackgroundMattingV2$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 18, in <module>
    if src.size(2) <= 2048 and src.size(3) <= 2048:
IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)

After I modified it to if src.size(1) <= 2048 and src.size(2) <= 2048:, it report that
virtual-machine:~/BackgroundMattingV2$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 25, in <module>
    pha, fgr = model(src, bgr)[:2]
  File "/home/charmve/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/model/model.py", line 28, in forward
    _5 = torch.eq(torch.mul(_4, 4), torch.size(src, 2))
    if _5:
      _7 = torch.floordiv(torch.size(src, 3), 4)
                          ~~~~~~~~~~ <--- HERE
      _8 = torch.eq(torch.mul(_7, 4), torch.size(src, 3))
      _6 = _8

Traceback of TorchScript, original code (most recent call last):
  File "/projects/grail/linsh/matting/model/model.py", line 160, in forward
    def forward(self, src, bgr):
        assert src.size() == bgr.size(), 'src and bgr must have the same shape'
        assert src.size(2) // 4 * 4 == src.size(2) and src.size(3) // 4 * 4 == src.size(3), \
                                                       ~~~~~~~~ <--- HERE
            'src and bgr must have width and height that are divisible by 4'

RuntimeError: Dimension out of range (expected to be in range of [-3, 2], but got 3)

attachment: original code python3
import torch
from torchvision.transforms.functional import to_tensor, to_pil_image
from PIL import Image

model = torch.jit.load('model/TorchScript/torchscript_resnet50_fp32.pth').eval()

src = Image.open('images/img/12.png')
bgr = Image.open('images/bgr/12.png')

src = to_tensor(src)
bgr = to_tensor(bgr)

if src.size(2) <= 2048 and src.size(3) <= 2048:
  model.backbone_scale = 1/4
  model.refine_sample_pixels = 80_000
else:
  model.backbone_scale = 1/8
  model.refine_sample_pixels = 320_000

pha, fgr = model(src, bgr)[:2]

com = pha * fgr + (1 - pha) * torch.tensor([120/255, 255/255, 155/255], device='cpu').view(1, 3, 1, 1)

to_pil_image(com[0].cpu())

to_pil_image(pha[0].cpu()).save('pha.png')
to_pil_image(fgr[0].cpu()).save('fgr.png')
to_pil_image(com[0].cpu()).save('com.png')

note: com = pha * fgr + (1 - pha) * torch.tensor([120/255, 255/255, 155/255], device='cpu').view(1, 3, 1, 1) instead of device='cuda'.

Thanks for your reply！
The model is loaded successful.
But, when I use if src.size(2) <= 2048 and src.size(3) <= 2048: line, it goes wrong.
virtual-machine:~/BackgroundMattingV2$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 18, in <module>
    if src.size(2) <= 2048 and src.size(3) <= 2048:
IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)

After I modified it to if src.size(1) <= 2048 and src.size(2) <= 2048:, it report that
virtual-machine:~/BackgroundMattingV2$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 25, in <module>
    pha, fgr = model(src, bgr)[:2]
  File "/home/charmve/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
  File "code/__torch__/model/model.py", line 28, in forward
    _5 = torch.eq(torch.mul(_4, 4), torch.size(src, 2))
    if _5:
      _7 = torch.floordiv(torch.size(src, 3), 4)
                          ~~~~~~~~~~ <--- HERE
      _8 = torch.eq(torch.mul(_7, 4), torch.size(src, 3))
      _6 = _8

Traceback of TorchScript, original code (most recent call last):
  File "/projects/grail/linsh/matting/model/model.py", line 160, in forward
    def forward(self, src, bgr):
        assert src.size() == bgr.size(), 'src and bgr must have the same shape'
        assert src.size(2) // 4 * 4 == src.size(2) and src.size(3) // 4 * 4 == src.size(3), \
                                                       ~~~~~~~~ <--- HERE
            'src and bgr must have width and height that are divisible by 4'

RuntimeError: Dimension out of range (expected to be in range of [-3, 2], but got 3)

attachment: original code python3
import torch
from torchvision.transforms.functional import to_tensor, to_pil_image
from PIL import Image

model = torch.jit.load('model/TorchScript/torchscript_resnet50_fp32.pth').eval()

src = Image.open('images/img/12.png')
bgr = Image.open('images/bgr/12.png')

src = to_tensor(src)
bgr = to_tensor(bgr)

if src.size(2) <= 2048 and src.size(3) <= 2048:
  model.backbone_scale = 1/4
  model.refine_sample_pixels = 80_000
else:
  model.backbone_scale = 1/8
  model.refine_sample_pixels = 320_000

pha, fgr = model(src, bgr)[:2]

com = pha * fgr + (1 - pha) * torch.tensor([120/255, 255/255, 155/255], device='cpu').view(1, 3, 1, 1)

to_pil_image(com[0].cpu())

to_pil_image(pha[0].cpu()).save('pha.png')
to_pil_image(fgr[0].cpu()).save('fgr.png')
to_pil_image(com[0].cpu()).save('com.png')

note: com = pha * fgr + (1 - pha) * torch.tensor([120/255, 255/255, 155/255], device='cpu').view(1, 3, 1, 1) instead of device='cuda'.

Change to
src = to_tensor(src).unsqueeze(0)
bgr = to_tensor(bgr).unsqueeze(0)

Change to
src = to_tensor(src).unsqueeze(0)
bgr = to_tensor(bgr).unsqueeze(0)

Thank you very much！

Thank you very much！


Add CSS themes

@srikanth716 do we need this still? if not pls close.

Is this a valid PR? I dont see any file changes?


922 update video_seg tutorial with new features

Signed-off-by: binliu<EMAIL_ADDRESS>Fixes #922 .
Description
Update the video_seg tutorial with FlexibleUnet and video dataset.
Checks

[ ] Notebook runs automatically ./runner [-p <regex_pattern>]

@Nic-Ma  @rijobro I have added the FlexibleUNet and IoU metric to this video segmentation tutorial. Could you please help me to review this pull request.
Thanks,
Bin

Hi @binliunls ,
I have 2 comments:

Could you please help change to use ThreadDataLoader in the evaluation and inference parts? Same as our internal pipeline?
Please add more doc descriptions in every title of the notebook.

Thanks.

Inferred images look much better with FlexibleUnet, thanks!

Hi @binliunls ,
2 comments:

Please use git mv to change the file to another folder, your current change diff is not correct.
Please add this new notebook to the README:
https://github.com/Project-MONAI/tutorials/blob/main/README.md

Thanks.

Hi @binliunls ,
Could you please help add a title and description for the last cell? (Camera dataset part).
Thanks in advance.


Data error when using CHINESE CHARACTAR in path

Reappearance:

The operating system is Windows. I tried Mac and it was good.

Don't forget to cherry-pick the PR #2338 to master branch...


htlcswitch: clean up forwarding state from closed channels

Background
In the process of forwarding HTLCs, LND maintains two persistent data structures in order to offer high throughput and crash tolerance.
The first is the CircuitMap, which maintains a record of incoming (ChannelID, HtlcID) to outgoing (ChannelID, HtlcID). This allows it to determine where a Settle/Fail message should return, and also ensure at most one HTLC is ever sent out for a particular incoming HTLC. The circuit map provides insight at the core of the forwarding process, when LND internally moves an HTLC from the incoming to outgoing channel.
The second is a series of forwarding packages (FwdPkg), which records all HTLCs that are added or removed by a particular commitment transaction. One such record is maintained by each channel for every commitment height. These records are updated atomically when updating channel states, and provide persistent insight into the ingress and egress of HTLCs at the perimeter of the daemon wrt the view of the channel's commitments.
Issue
Under normal operation, records from both the CircuitMap and FwdPkgs are removed when they
become unnecessary. However, this can only be done if the channel is active in the htlcswitch. When a channel is closed, LND prevents those channels from ever being loaded back into the switch, to prevent any accidental state updates from occurring and risking any sort of channel breach.
Therefore, the current design leaves some of the forwarding state behind when channels are closed. The total amount of data is small relative to the other data maintained by LND, but it is ideal that we clean up after ourselves and free up the disk space.
Steps to Completion (FwdPkg Cleanup)

[ ] Create a Wipe method on the ChannelPackager which deletes the top level bucket for the given channel's forwarding logs
[ ] When a channel is closed via CloseChannel, the channel's forwarding packages should be cleaned up by invoking the Wipe method on its ChannelPackager
[ ] Add a migration to clean up any forwarding packages for channels that have been closed prior, yet still have a top-level forwarding package bucket

Steps to Completion (CircuitMap Cleanup)
On startup, when restoring the circuit map state from disk in NewCircuitMap:

[ ] Determine the set of channels that have been closed
[ ] Remove all circuits from the circuit bucket whose key prefix matches a short channel id in the set of the closed channels
[ ] Remove any keystones from the keystone bucket whose key prefix matches a short channel id in the set of closed channels
[ ] Ensure never to remove keys whose prefix is the zero-value short channel id, this deletes state for locally initiated payments. We should be defensive by including this check in the CircuitMap. It is too risky to assume that the short channel id field is always correct, e.g. some channels may have never confirmed (and never assigned a proper short chan id) but are now closed.

Note: In theory, we can do better than only cleaning the circuit map on restarts, however channel closures aren't very frequent and the amount code required to do so live probably doesn't warrant the complexity unless it becomes an issue in the future.
WARNING
Please DO NOT test this on a mainnet node until it has undergone sufficient review. This cleanup requires modifying extremely critical code, and minor bugs can lead to completely irrecoverable loss of forwarding state.
Notes
This issue could technically be broken up into two, though given the amount of interplay between the the circuit map and forwarding packages I think it'd be best to review the changes as a whole to make sure nothing is missed.

I thought that bbolt didn't actually free up disk space when deleting? Just made all of the nodes in the B+ tree "free" but no compaction of any sort was done.

i'm working on this one


Does it can be used in Android Linux ?

Does hello_imgui can be used in Android Linux ?

In theory yes, but the android support is not actively maintained, as I do not own an android device


[EPIC] Material 3 drawer

The navigation drawer should look and feel consistent with the rest of the K-9 Mail and Thunderbird for Android Material 3 theme.
As the existing drawer is based on MaterialDrawer it has limited Material 3 support and doesn't allow us to easily adapt to the new design. Therefore we will rewrite the navigation drawer from scratch using Jetpack Compose.
Tasks:

https://github.com/thunderbird/thunderbird-android/issues/8032
https://github.com/thunderbird/thunderbird-android/issues/8103
https://github.com/thunderbird/thunderbird-android/issues/8104
https://github.com/thunderbird/thunderbird-android/issues/8118
https://github.com/thunderbird/thunderbird-android/issues/8120
https://github.com/thunderbird/thunderbird-android/issues/8121
https://github.com/thunderbird/thunderbird-android/issues/8122
https://github.com/thunderbird/thunderbird-android/issues/8123
https://github.com/thunderbird/thunderbird-android/issues/8142
https://github.com/thunderbird/thunderbird-android/issues/8164 once new drawer works as expected

To improve on:

https://github.com/thunderbird/thunderbird-android/issues/8146
Save scroll position
Starred and unread count need to be updated instantly
Folder names should limited to 2 lines and shortened otherwise
Image loading needs to be implemented (no contact picture) -> needs design first
Feature could be split into api and implementation module
Account name should be single line if email and display name are identical
https://github.com/thunderbird/thunderbird-android/issues/7556
Ellipsize folder name in the middle: support expected for compose foundation 1.8
#8300

Related bugs:

https://github.com/thunderbird/thunderbird-android/issues/8137
Unread and star count are not properly updated for unified folders (old and new implementation)
#8204
#8301
#8381
https://github.com/thunderbird/thunderbird-android/issues/8487
https://github.com/thunderbird/thunderbird-android/issues/8548

The exsiting drawer has a complex setup to communicate account and folder changes between itself, the MessageList, MessageFragment and different entry points (widget, notifications). To simplify the communication flow we decided to introduce a separate view model to keep track of the currently active account and when needed selected folder.  It should be bound to the lifecycle of the MessageList activity and exposed to navigation drawer as source of truth.

@marcRDZ You were asking if you could support on any other issues related to the drawer. @wmontwe is working on some of the foundations for future support of account pictures, once he is done with that there would be an opportunity to help on the image picker.
There are a few remaining issues left on this epic, are there any that are interesting to you? We might not have linked all the issues after the fact, so good to check functionality as well.

@kewisch count on it, I'll review the list to check possible candidates to tackle asap


Check health endpoint before registering with Eureka

PLEASEREVIEW @cgaspardSplunk
AMI-1032 Add support for checking local microservice health
and removing a microservice from Eureka immediately if the health endpoint fails.
AMI-1032_check_endpoint Add code to check the local health endpoint

sidecar will now try 5 times at 5-second intervals to check the health endpoint before registering the instance with eureka
sidecar will de-register the instance with eureka if the health endpoint fails
sidecar will suicide if the health endpoint fails

AMI-1032 fix minor issues for PR
AMI-1032 parameterize hardcoded version

:zap:

:zap: for the second commit on the fix for auto-parsing of the content by rest library.


List sorted by namespace

Can I list releases (i.e. helm ls) by namespace order?
Maybe -n ?

Output of helm version:
Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-26T00:04:52Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.13-eks-g484b8", GitCommit:"484b857e3134d55ac6373fea2f51798fefa0533f", GitTreeState:"clean", BuildDate:"2019-03-08T05:32:36Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):
AWS

@QwertyJack You can list all releases per namespace with the --namespace flag. You could call this for different namespace sorted.
Do you have a specific use case for sorting by namespace?

Thanks for your reply. Maybe Im not clear.
Suppose I have some helm releases in different namespace, like this
$ helm ls
NAME    REVISION     UPDATED     STATUS     CHART      APP VERSION     NAMESPACE
A1                                                                     ns-a
B1                                                                     ns-b
A2                                                                     ns-a
A3                                                                     ns-a
C1                                                                     ns-c
B2                                                                     ns-b

# what I want is sorted by namespace
NAME    REVISION     UPDATED     STATUS     CHART      APP VERSION     NAMESPACE
A1                                                                     ns-a
A2                                                                     ns-a
A3                                                                     ns-a
B1                                                                     ns-b
B2                                                                     ns-b
C1                                                                     ns-c

Now helm ls support sorted by chart name and release date, so why not by namespace as well ?

@hickeyma would you know if someone is working on this already? If not i can pick this

@jan25 go for it

Nice to see the PR.
Thanks guys !

Let's leave it open till conclusion of PR.

I'm going to close this ticket due to inactivity, but please re-open if this still needs to be addressed. Thanks!


Simplify installation variants

We already patch client CSS anyway, there's no point in keeping base and full variants separate.
And there's no VGUI part anymore, so web distinction doesn't make a lot of sense either.

base has kind of fallen to the wayside, and I've thought of removing it as well.
full has largely stabilized, so base really is just an incomplete, worse version at this point.
Fine with renaming web  as well.


WebContent: Add timeouts to some WebDriver client methods

This PR adds timeouts to some WebDriver client methods that the specification says should time out if they are not completed within a certain time.
This prevents some hangs that I had seen when running WPT, although it doesn't address the root cause of the issue that is causing the timeouts.

This makes me wonder if we should invent a spin_until_with_timeout API. :)


Client crashes sporadically on windows

When running CoX on Windows 10, the client will crash randomly. I can't attribute the crash to any specific event(s)
Let me know what kind of log/information you may need.

Well, the boring procedure would be:

login, create a char, enter map, don't press anything, wait for a while -> Crash Y/N
login, create a char, enter map, only move using WASD -> Crash Y/N
login, create a char, enter map, move using WASD + Mouse -> Crash Y/N

Will test on Windows over the weekend.
On Linux, I left the client idling overnight and all day today (18+ hrs) with no crashes. Then, for about 20min, I proceeded to jump around using the mouse, WASD and a combo of both; no crashes. So I'm confident it's an issue with my Windows build.
More info to follow... Thanks nemerle.

Good work broxen, this was a great way of testing server link stability as well :smile:

As for windows stability issues, just to verify, the client crashes after entering game with:

preexisting character
new character ( entering map through character creation )
both

Both.
Upon first logging in with a new character immediately, and then again after logging in, but with a delay the second time as I was able to run around for a bit.
Will try this again after recompiling from Master.
Also, this is all natively on Windows 10, but I'll try to load up a VirtualBox and test on Windows XP or Win7.

Today, I can't even get into Atlas Park, as the client keeps crashing during loading.
Also I'm having trouble capturing the export logs. Is there a way to enable client logging? Shouldn't the server output a log of this console information as well? output.log only has the loading info.

well, this looks like an regression ( i.e I broke something )  will look into it.

I think the latest few commits solved the problem with entering the game with pre-created char, please check and let me know ?

Latest build. Clean SQLite database. Win 10

Logged into new account. Created char. Entered world. Ran around. Logged out.
Logged back in, selected pre-existing char. Entered world. Char is invisible. Can't exit client. Can't Alt+F4. Have to CTRL+ALT+DEL.

Console has output:
sending message to client 03679cd8
Received cookie confirm a00e3a1 - 0
not all bits were consumed

Restarting authserver and relaunching client resolved the issue with visibility, but I still couldn't exit the client normally and I continued to get a lot of not all bits were consumed messages.
Created new account, created new character, logged in but character was invisible, able to log out normally.
Logged in again on new account, character still invisible, able to log out normally.
Logged in again on old account, character still invisible, able to log out normally.

Some Notes:

Running around didn't seem to crash the client.
Logging in didn't seem to crash the client.
Logging into a old char didn't crash the client.
Clicking on things (plaques, doors) didn't crash the client.
Logging out didn't crash the server as in #30 so maybe that bug's been squashed.

Screenshots:

Hmm, that visibility hiccups are worrying.
As for Win10, have you tired running the client with various compatibility modes ?

Yes, still experiencing the visibility issues. Though they are intermittent. Restarting the server seems to help resolve all issues temporarily (for first login, sometimes 2nd).
Client console has nothing of value (only missing City_01_03.geo).
Still getting sporadic behavior on trying to logout. Sometimes it works, sometimes it doesn't. Last time I received an error in the console prior to authserver crashing:
...
handle_input: connection reset
handle_input: connection reset
handle_input: connection reset
handle_input: connection reset
Unresponsive link
ACE_ASSERT: file C:/Users/Paul/DOCUME~1/MYPROJ~1/Segs/Projects/CoX/Common/Servers/ClientManager.h, line 96 assertion failed for 'getById(id)!=0'.Aborting...

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Please try to verify with the c37c141 as there was a networking layer bug fixed there that could cause client crashes.

As of #127 I'm no longer having visibility issues. That said, I'm crashing the server when logging out with one of two characters from the same account. This is as mentioned in the comments on #127
This doesn't appear to happen with two different accounts, so closing #95 should resolve the issue.
General stability may still need testing, but the specific bug this issue was opened to address appears fixed, so I'm going to close this.


P is not upper triangular matrix

https://github.com/ApolloAuto/apollo/blob/482e68bbe1dcb9ef7a42ab8d6684b9681866d535/modules/planning/math/piecewise_jerk/piecewise_jerk_speed_problem.cc#L101

When I  chang this  line to:
        columns[2 * n + i + 1].emplace_back(2 * n + i, -2.0 * jerk_weight / delta_s_square /                                                 (scale_factor_[2] * scale_factor_[2]));
The OSQP  solver will be non-convex。
I  use  default  config：
message PiecewiseJerkSpeedConfig {   optional double acc_weight = 1 [default = 1.0];   optional double jerk_weight = 2 [default = 10.0];   optional double kappa_penalty_weight = 3 [default = 1000.0];   optional double ref_s_weight = 4 [default = 10.0];   optional double ref_v_weight = 5 [default = 10.0]; }

What is your exact concern and issue? Current implementation seems fine

When  I run Apollo  piece_wise_jerk_speed_smooth code, I got a error "P is not upper triangular matrix"。And after  I changed  the row and  column of Kernel matrix，I  got  another error "The OSQP solver will be non-convex "。
It may be caused by version difference of OSQP，I use  0.6.0

I Change  OSQP to 0.4.1，the  "P is not upper triangular matrix"  error  disappear，but i  got  another  error “failed optimization status:   primal infeasible”

When I run Apollo piece_wise_jerk_speed_smooth code, I got a error "P is not upper triangular matrix"。And after I changed the row and column of Kernel matrix，I got another error "The OSQP solver will be non-convex "。
It may be caused by version difference of OSQP，I use 0.6.0

As described in osqp 0.6.0 changelog,
- ... Changed syntax of osqp_setup function. It now returns an exitflag.
- osqp_setup function requires P to be upper triangular. It returns a nonzero exitflag otherwise.

RTFM: https://github.com/oxfordcontrol/osqp/releases/tag/v0.6.0

Hi @HubFire , hope our answer resolved your question. We will close the issue for now. If you have any additional question, please feel free to open a new issue. Our engineer team are more than happy to help that.
Thank you for supporting Apollo!


Support/extract tested modules

Motivation
In an effort to more effectively test the business logic in the commands that we're adding or modifying in the CLI, and to better set us up for integrating with TravisCI, I have extracted the two existing test files (and their implementations) into the _modules folder. (dotnet-test and nuget-upgrade, specifically)
While these two modules are not being shared between commands yet, it is possible that they could be. Either way, extracting them out into modules that can be imported by the wrapper "cli-command" wrappers allows us to more easily test the logic that's happening without trying to work against the commander package.
Let me know if you need any additional context or want to know why I changed something I did. I have another branch I've been working on to get TravisCI up and running, which will follow.

@brandongregoryscott gave it a run and it all checked out. Didn't test every possible combo of flags, but the high priority paths are good. Thanks!
I'm good to approve when you are done reviewing the feedback. Just let me know and I'll move it on its way.

Thanks for checking it out! I'll ping you when I've taken care of the feedback here.

@wintondeshong This is ready for review again. Your initial comments as well as the 'command-runner' pattern we worked out should be implemented for every CLI method. There was some refactoring I had to do to call spawnSync instead of just spawn for the commands using it. Since spawn is async-ish, it returns immediately and cannot be awaited. The behavior would be that the commands with async (dotnet, dotnet-test, webpack, webpack-test) would exit immediately.
I tried to thoroughly test the rest of them that I could once I discovered this behavior, but there are certain CLI commands I am not sure how to setup/test for (mainly the deployment ones).
If you could take a look at the PR again, and pull it down to test out the critical paths yourself, I'd appreciate that. This turned into a pretty hefty refactor once it was all said and done.
Let me know if you have any questions or see something funky.

@brandongregoryscott nice work! Sorry it took me so long to get around to reviewing. I gave this a whirl locally and primary use cases checked out. Not sure what you think, but I'm thinking we rev to v1 soon. The amount of features and work to this point have been significant enough imho.
Once you do the minor cleanup below, I'll approve and merge.

No worries! Oddly enough, I was thinking about pinging you the same day you took a look at it!
I'm fine with bumping it to a v1 soon. I agree, the commands have been built out quite a bit and battle tested with the team using it.
I've been meaning to take another pass on the documentation side of it, I believe there might be a few commands or flags that haven't been updated as the code has changed.
I'd also love to get my TravisCI branch in before we do, I think that'd be a good marker for a v1 release.
I'll work on these comments and request a review again after I've taken care of them, thanks!


Fix/GitHub image front admin

Description
It resolves issues with connection to the ui admin on test server
Linked Issues
#447
Changes
What does it change ?
Is is a breaking change ?
Is is a new feature ?
Is is a patch, fix, hotfix ? Yes
Screenshots
Put screenshots (if any)
Tests
How has it been tested ?

[X] Manually
[ ] Automated tests
[ ] QA
[ ] Other

Additional information
Precise any other information

deprecated with the https://github.com/XPEHO/YAKI/pull/477


Added rowIndex to colParser function

Adds another parameter to the custom colParser function callback
that exposes the row index being processed. Zero-based. Adds an
assert to an existing test to provide coverage.
The unit test for this was not executing correctly, so no assertions
would fail under any conditions. I refactored the test to use
async/await instead of done() and the test started working as
expected.
Issue #373

Pull Request Test Coverage Report for Build 242

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.5%) to 95.92%

Totals

Change from base Build 238:
0.5%

Covered Lines:
784

Relevant Lines:
804

💛  - Coveralls


Release v1.20.0

Release a new version of cri-tools, aka v1.20.0.
Requires https://github.com/kubernetes-sigs/cri-tools/pull/701

Generate release notes by using the k/release release-notes tool:
# Changelog since v1.19.0

## Changes by Kind

### API Change

- Update the `timeout` option in create, run, runp requests to be `cancel-timeout` ([#668](https://github.com/kubernetes-sigs/cri-tools/pull/668), [@haircommander](https://github.com/haircommander))

### Feature

- Add `timeout` option to create, run, runp requests, allowing users to cancel CRI requests after a timeout ([#666](https://github.com/kubernetes-sigs/cri-tools/pull/666), [@haircommander](https://github.com/haircommander))

### Documentation

- Add getting started w/development guide ([#667](https://github.com/kubernetes-sigs/cri-tools/pull/667), [@adams0619](https://github.com/adams0619))

## Dependencies

### Added
_Nothing has changed._

### Changed
- github.com/docker/docker: [7ae5222 → c710949](https://github.com/docker/docker/compare/7ae5222...c710949)
- github.com/golang/protobuf: [v1.4.2 → v1.4.3](https://github.com/golang/protobuf/compare/v1.4.2...v1.4.3)
- github.com/google/go-cmp: [v0.4.0 → v0.5.0](https://github.com/google/go-cmp/compare/v0.4.0...v0.5.0)
- github.com/google/uuid: [v1.1.1 → v1.1.2](https://github.com/google/uuid/compare/v1.1.1...v1.1.2)
- github.com/onsi/ginkgo: [v1.14.0 → v1.14.2](https://github.com/onsi/ginkgo/compare/v1.14.0...v1.14.2)
- github.com/onsi/gomega: [v1.10.1 → v1.10.3](https://github.com/onsi/gomega/compare/v1.10.1...v1.10.3)
- github.com/sirupsen/logrus: [v1.6.0 → v1.7.0](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)
- github.com/urfave/cli/v2: [v2.2.0 → v2.3.0](https://github.com/urfave/cli/v2/compare/v2.2.0...v2.3.0)
- golang.org/x/net: c890458 → ff519b6
- golang.org/x/sys: f9321e4 → 4d91cf3
- google.golang.org/grpc: v1.31.1 → v1.33.2
- google.golang.org/protobuf: v1.24.0 → v1.25.0

### Removed
_Nothing has changed._

@feiskyer @mikebrow @hickeyma do you see anything else to be added?

/lgtm

LGTM

@saschagrunert would you work this version release?

@saschagrunert would you work this version release?

Unfortunately I’m right now not able to do the release because I’m moving over Christmas. I can do it early next year, would this still fit or do you want to take it over?

Released at https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.20.0.

Released at https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.20.0.


add a makefile alias to aegis-web/hack/sync to aegis/Makefile

That will help managing everything from a single project folder instead of changing directories etc.

Done.


Revise usage example

This PR should address the issue and close #14
The usage example appeared to have some minor errors including:

an unused stdlib import (errors)
old implementation of session store which is no longer valid -> cookies sub package
the gin engine is now run on port 8080 and blocks to serve requests instead of terminating

Hope this fix is helpful for anyone making use of the package 😎
Code is tested here: https://github.com/mikeee/demo_gin-csrf

Thank you!


Would you advise using ActiveRecord query trace in production?

Our app is pretty big, and whenever we see N+1 issues on production it's really isn't obvious where the problem could be fixed. Would you recommend using ActiveRecord query trace in production?

Should be ok. worst case is just higher log content.

Thanks! The guys at bullet recommended NOT to include their gem into production but maybe I'll go for this one.

@fatuhoku I'm wondering the same thing. How was your experience with using it in Production? Did you experience any performance hits?

Hi @fatuhoku and @joshuapinter. Did you get to use the gem in production? If so, how did it go?

No we didn’t but I’d still be interested in doing so and what other’s experiences are.

Please let me know if you ever try it in production. I'm implementing specs for the gem, that should make it even more reliable.

I haven't tried this, but it strikes me as a terrible idea. Calculating a backtrace is relatively expensive. Calculating a backtrace for every single SQL query in your production app is going to make it very, very slow.


Error when saying something other than "Who are you"?

I am at Chapter 3 of your book and I am doing the brain/general conversation module. While the "Who are you?" command works the undefined function doesn't. I am getting an unexpected error when I say other than "Who are you?" Can you help?

Looks like there's something wrong with your code. Mind sharing your code file? Also, this is the right place to post.

Yup, I did fix it. Something was wrong with the string that was returned from the undefined function. Thanks, anyway.


[bug]: Label for disabled RadioGroupItem not showing as disabled

Describe the bug

The "peer" class is missing for RadioGroupPrimitive.Item in RadioGroupItem for this to work like the checkbox.
Last radio group item is modified with the "peer" class. The others are as is.
Affected component/components
RadioGroupItem
How to reproduce

go to https://ui.shadcn.com/docs/components/radio-group
look at code for manual installation
notice that "peer" class is missing :shrug

Codesandbox/StackBlitz link
No response
Logs
No response
System Info
-

Before submitting

[X] I've made research efforts and searched the documentation
[X] I've searched for existing issues

+1 this update! Please merge


Implemented multithreading into image processing step and fixed README info

Implemented multithreading into image processing step and fixed README linter info

Closed. I need to think about this some more.


Fix ray conflict changes

This PR add below changes:
1: move torch_xla2.default_env() to function. jax_mode = torch_xla2.default_env() block jax multiple controller in init state
2: ray engine create is different than default run server one, it will have prefill and decode engines later
3: removed duplciated JetEngineEnvironment
4: Not support shard_on_batch and ragged attention in ray multiple for now

Can you help me understand how jax_mode = torch_xla2.default_env() block jax multiple controller in init state?

Can you help me understand why is it?

Can you help me understand how jax_mode = torch_xla2.default_env() block jax multiple controller in init state?

Can you help me understand why is it?

The is jax call under this function ( or deeper). For any jax function call, it will try to init the multiple controller env (though MPI barrier), which mean need to wait all the chips finished. So in ray multiple host, if there is a jax function call in head node, it will wait all the chips be ready, but only the head node chip is ready at this time, the the whole application will stuck there.
For current use case, it happens when Ray head load the class even, it call the jax and stuck there even before start execute main function.


Not able to install jupyter using pipenv

So i am trying to install jupyter using pipenv and the following are the issues:
Adding jupyter to Pipfile's [packages]…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
e 415, in get_legacy_dependencies
    results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 297, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 263, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 213, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 294, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 127, in prep_for_dist
    self.req.run_egg_info()
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 636, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/Cellar/pipenv/2018.10.13/libexec/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 701, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/67/20h7ghtx747d2k7r2r7gyhfw0000gn/T/tmpdbqbna5qbuild/jupyter-echarts-pypkg/

The same happens for quite a few packages (Eg: walrus).
from what I could infer, jupyter-echarts is causing the issue (came to this conclusion as walrus too has this as a dependency)
Any idea how to deal with this issue?

closing due to lack of movement


BYOB Python input bindings return empty strings

Python input bindings return empty strings. Missing write to stream for binding input case.
https://github.com/Azure/azure-webjobs-sdk-script/blob/9cc600461bb176ba768dfa2787f835693f8d6bac/src/WebJobs.Script/Description/ScriptFunctionInvokerBase.cs#L81

@mathewc - can you review this with @glennamanns when you're back?

@mathewc will take a look at this before next week


@conda-forge-admin, please add user @maresb

Additional comment:
No response

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added user @maresb in conda-forge/aeppl-feedstock#42.


Just a green screen

I'm not even really sure where to start providing info or debugging. Everything seems to be "working" but when the window pops up it's just a green screen. Any idea where to start?

Hi Ben, if you could start by letting us know how you got to a runnable binary, ie: did you download a pre-built version, or build from source, if so which branch and commit/tag did you build from?
A green screen is the default background, it's possible that Tensorflow isn't working as expected, or your camera is not providing images with enough brightness/contrast for Tensorflow to find a face.. you can check the raw camera input with a viewer such as vlc or cheese and adjust settings with v4l2-ctl, you can also try a different Tensorflow model, in particular models/deeplabv3_257_mv_gpu.tflite often works better in low light conditions.

With #52 recently™ merged you can also run deepseg -d -d (verbose debug mode) and toggle the detection at runtime by pressing s. Providing the initial details given in that mode (on console) is also of great help.

I just ran into the same problem /:
My steps :

clone the repo
ran make
ran sudo modprobe v4l2loopback devices=2 max_buffers=2 exclusive_caps=1 card_label="obs,fake" (my webcam "input" involves OBS + DroidCan on an Android device)
Started OBS virtual camera (outputting in /dev/video10)
Ran ./deepseg -d -d -c /dev/video10 -v /dev/video11

If you need anymore information about my hardware or something else just tell me !

Does the unfiltered output (pressing s) look sensible?

Also note, you probably want the output (vcam, given by -v) of deepseg as input to OBS (with green as the color key) and thus the capture cam (ccam given by -c) to be your webcam.

When I press s it actually show me the same as the OBS output.
Also I tried with all present models at e47486baee :

body-pix-float-050-8.tflite
deeplabv3_257_mv_gpu.tflite
segm_full_v679.tflite
segm_lite_v681.tflite

Without any more luck, it do the same green screen.

Can you provide a example of the capture cam stream?

@MattMattV, @Fmstrat - did you folks get to a resolution on this?

sorry to not have answered before, is there any place I can send a picture other than here publicly ?
And I re-tested again @ 53cfb30a9ee8edaf54dd3aacd3b4172a9f35a0fd with all models availble resulting of the same green screen.

@MattMattV - you can pop an email over to me<EMAIL_ADDRESS>or a DM on https://twitter.com/Phlash909. From the description of your setup, probably the most useful grabs would be the output of OBS / debug window from deepseg with the effect disabled. What output encoding are you using in OBS virtual camera?
FWIW I sometimes use DroidCam from my mobile too, although via ffmpeg -hide_banner -r 30000/1001 -i rtsp://$IP:8080/video/h264 -f v4l2 -pix_fmt bgr24 /dev/video11 rather than OBS.

Closing due to inactivity


User Testing: (17-03-2019)

Template
username:
main pain points using application:

user profile:
age:
gender:
job:
Additional observations section:

username: Razan Tayyem
user profile:
age: 23
gender: female
job: developer
observations section:

Website title font should be changed, also why the "e" letter in "eComit" is small?

username:shama
main pain points using application:
1.Back button to start page
2.upload photo be in center
3.Back button and Export as csv need background
user profile:
age:22
gender:female
job:student
Additional observations section:
New technologies to use :
material UL

User's Name: Matt Davis
user's profile:
Occupation: Course Faciliator of the FACK1 Code Academy.
Age: 28.
Gender: male.
Main observations:
1- Maybe the upload a photo option can have the option to upload more than once photo.
2- Brand dropdown: Can I add my own brands or should I only stick to what's on the list?
3- Thought the logout button was a "go back" button or "go home".
4- Maybe get user feedback on each individual item instead of a general feedback on all items.
5- Change the last page to an info page only where it tells the user about the new upcoming features: sell on ebay or give to charity.
Extra points:
1- Maybe for future features like exporting to eBay we can say: sell to eBay where eComit lists it on its own.
2- ebay style: it should be eBay instead.
3- Add a back button from the last page to the one before it.
4- Consider making the back button as a top-left icon.
5- Is the app asking me how to take a good photo or telling me? (make this more clear)

User's Name: Anam Raheem
User's profile:
Occupation: Tech education manager.
Age: 29.
Gender: Female.
Main observations:
1- Link to Camera so you'd take a photo and upload it at the same time OR make it obvious that a photo already needs to b taken.
2- Only certain brands are accepted? Can't I add my own? what if the dropdown doesn't have my item?
3- Purchase price shouldn't be a dropdown.
4- When you go back from the photo's info, is it to change the photo chosen?
5- Logout is thought to be a home button? (Maybe make it more clear what it is?)

User's Name: Amin Talahmeh
User's profile:
Occupation: Web Developer.
Gender: male.
Main observations:
1- In the home page use less technical and formal language. Example: instead of "generate your data" maybe replace it with "get your clothes details/info".
Extra points:
1- Add a button on the "upload your photo" page to go back to home/description page.
2- Add a button to go back from the last page to the one before it.

User's Name: Sama Amro
User's Profile:
Occupation: Web developer.
Gender: Female.
Main Observations:
1- Link to Camera so you'd take a photo and upload it at the same time.