Pure PyTorch vs Lightning is faster with CPU small toy example

🐛 Bug
Recently I found that Lightning runs much slower than simple PyTorch code.
Code using Lightning:
import os
import math

import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader, random_split
from torchvision.datasets import MNIST
from torchvision import transforms
import pytorch_lightning as pl
from pytorch_lightning.metrics.functional import accuracy
from pytorch_lightning.callbacks import LearningRateMonitor
from pytorch_lightning.loggers import TensorBoardLogger, CSVLogger
from pl_bolts.datasets import DummyDataset
from torch.optim.lr_scheduler import CosineAnnealingLR, ExponentialLR, LambdaLR

train = DummyDataset((1, 28, 28), (1,), num_samples=100000)
train = DataLoader(train, batch_size=32)

val = DummyDataset((1, 28, 28), (1,))
val = DataLoader(val, batch_size=32)

test = DummyDataset((1, 28, 28), (1,))
test = DataLoader(test, batch_size=32)

class LitAutoEncoder(pl.LightningModule):

    def __init__(self):
        super().__init__()
        self.encoder = nn.Sequential(nn.Linear(28 * 28, 128), nn.ReLU(), nn.Linear(128, 3))
        self.decoder = nn.Sequential(nn.Linear(3, 128), nn.ReLU(), nn.Linear(128, 28 * 28))

    def training_step(self, batch, batch_idx):
        # --------------------------
        # REPLACE WITH YOUR OWN
        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)
        loss = F.mse_loss(x_hat, x)
        return loss
        # --------------------------

    def validation_step(self, batch, batch_idx):
        # --------------------------
        # REPLACE WITH YOUR OWN
        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)
        loss = F.mse_loss(x_hat, x)
        self.log('val_loss', loss)
        # --------------------------

    def test_step(self, batch, batch_idx):
        # --------------------------
        # REPLACE WITH YOUR OWN
        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)
        loss = F.mse_loss(x_hat, x)
        self.log('test_loss', loss)
        # --------------------------

    def configure_optimizers(self):
        learning_rate = 1e-3
        optimizer = torch.optim.SGD(self.parameters(), lr=learning_rate)
        return optimizer

if __name__ == '__main__':
    ae = LitAutoEncoder()

    # Initialize a trainer
    trainer = pl.Trainer(gpus=None, max_epochs=5,
                         progress_bar_refresh_rate=1000, log_every_n_steps=1000,
                         # profiler='simple'
                         )

    # Train the model ⚡
    # trainer.fit(ae, train, val)
    trainer.fit(ae, train)

Code using just PyTorch:
import os
import math
import time

import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader, random_split
from torchvision.datasets import MNIST
from torchvision import transforms
import pytorch_lightning as pl
from pytorch_lightning.metrics.functional import accuracy
from pytorch_lightning.callbacks import LearningRateMonitor
from pytorch_lightning.loggers import TensorBoardLogger, CSVLogger
from pl_bolts.datasets import DummyDataset
from torch.optim.lr_scheduler import CosineAnnealingLR, ExponentialLR, LambdaLR

train = DummyDataset((1, 28, 28), (1,), num_samples=100000)
train = DataLoader(train, batch_size=32)

val = DummyDataset((1, 28, 28), (1,))
val = DataLoader(val, batch_size=32)

test = DummyDataset((1, 28, 28), (1,))
test = DataLoader(test, batch_size=32)

class PlainModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.encoder = nn.Sequential(nn.Linear(28 * 28, 128), nn.ReLU(), nn.Linear(128, 3))
        self.decoder = nn.Sequential(nn.Linear(3, 128), nn.ReLU(), nn.Linear(128, 28 * 28))

    def forward(self, batch):
        # --------------------------
        # REPLACE WITH YOUR OWN
        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)
        loss = F.mse_loss(x_hat, x)
        return loss

if __name__ == '__main__':
    model = PlainModel()
    optimizer = torch.optim.SGD(model.parameters(), lr=0.001)

    for epoch_num in range(30):
        batch_count = 0
        start_time = time.time()
        for batch in train:
            optimizer.zero_grad()
            loss = model(batch)
            loss.backward()
            optimizer.step()
            batch_count += 1
        end_time = time.time()
        print('Epoch {0} speed: {1} in {2} time'.format(epoch_num, batch_count / (end_time - start_time),
                                                        end_time - start_time))

The Lightning code runs about 450 it/s on my Mac using CPU vs  vanilla PyTorch's 650 it/s. Vanilla PyTorch code runs about 1.44 times faster than Lightning.
To Reproduce
Use the above code.
Expected behavior
Lightning runs at  almost same speed for vanilla PyTorch code.
Environment

PyTorch Version (e.g., 1.0): 1.5.0
OS (e.g., Linux): Mac
How you installed PyTorch (conda, pip, source): conda
Build command you used (if compiling from source): n/a
Python version: 3.8.3
CUDA/cuDNN version: n/a
GPU models and configuration: n/a
Any other relevant information: n/a
-PL version: tried both 1.1.8 and 1.2.1

Additional context
n/a

Hey @magic282!
We run CI tests for toy models to make sure we stay in reasonable bounds, these have robust performance checks on the loops to make timing accurate and we currently have set this to a maximum of a 0.25 difference to PyTorch using the time. perf_counter based on the CPU clock cycle: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/benchmarks/test_basic_parity.py#L53
I ran your scripts and looked at overall wall to wall clock times using time. This is what I recorded with just one run of each:
time python lightning.py
1m37.505s

time python pytorch.py
1m49.533s

This is a roughly 10% difference with pure PyTorch. Given that the model is exceptionally tiny and a toy model, this might allow other factors to become bottlenecks (such as logging). We can try a larger model which may confirm this.

Hi @SeanNaren , thanks for your quick response.
I also ran it on my Mac and Linux server again using time, here are the results for 20 epochs on the Linux server:
time python pl.py
real    2m32.460s
user    98m13.487s
sys     0m1.801s

time python pure.py
real    1m43.985s
user    58m13.670s
sys     0m1.250s

It seems that pure PyTorch code still runs much faster.
And about your results, such as
1m37.505s

time python pytorch.py
1m49.533s

It looks that pytorch runs slower than lightning which sounds impossible to me as PL has much more things to do in the background.

Hey @magic282,
Which Mac are you running it on ?
@SeanNaren Did you inverse the script name, I think Lightning should be the slowest :)
Best,
T.C

@tchaton Macbook Pro 2019. And I think the hardware seems not important since on Linux server I got the same trend.

Lightning includes "quite a bit of magic" that adds fixed overhead over PyTorch. As @SeanNaren points out, this overhead is fixed and the scaling behaviour should be very similar, so for non-trivial networks, this should not matter as much.
Incidentally, PyTorch has it's own performance thing going on with nn.Module, see https://github.com/pytorch/pytorch/pull/50431 . The symptoms are somewhat similar (but the scaling behaviour arguably worse as larger networks have more modules) and we might learn from their analysis.

Totally agree with @t-vi and @SeanNaren . The model tested here is too small compared to the work of PL in the background.

Hey @magic282,
Which Mac are you running it on ?
@SeanNaren Did you inverse the script name, I think Lightning should be the slowest :)
Best,
T.C

Haven't had the time to re-run but definitely looks off, if I get time I'll re-run with multiple runs!
@magic282 I'll try figure out where in the docs we could mention this, as I think this is important!


Integrity

Just wanted to let you know that Panda reports your latest release infected by Virtumonde (see VirusTotal). I've hat VT running a rescan multiple times thoughout the last few days (to filter out "false positives" in signatures), but it sticks. Not sure what brought up that alert – being reported by just 1 our of 58 engines I still consider it a false positive (especially as, to my knowledge, Virtumonde is focused on Windows). Just thought you should know.

Yikes, I created a dupe to #36 ...


Front end bullet simulation

Changes to local deployment for katana and all

Waiting for the enviroment to be set up for local vs katana running


CEPH Deployments for large VM images failing due to high image conversion time and job timeout

ISSUE TYPE

Improvement Request

COMPONENT NAME

CEPH, API

CLOUDSTACK VERSION

4.15

CONFIGURATION

Cloudstack 4.15 with KVM Hypervisors and RBD/CEPH as Primary Storage. Secondary Storage on NFS.

OS / ENVIRONMENT

CentOS 7.8

SUMMARY

The current VM deployment process on CEPH as Primary Store runs below command during the deployment to convert the image to raw and also write to the CEPH Pool at the same time. This takes huge amount of time eg below has a 15GB template which took around 3+ Hours. This causes the VM deployment fail due to Job Timeout

If this process is converted to a 2-Step Process as below

Step 1: Image converted to raw
Step 2: Raw image moved to CEPH either using qemu-img convert or rbd as below takes much lower time.

STEPS TO REPRODUCE

Upload a big template with root volume size of 300GB or higher ( NFS as secondary Store )
Deploy a VM with the template with CEPH as the backend primary store.

[root@TEST]# time qemu-img convert -p -O raw /mnt/f268aaee-6090-3fc9-9e9d-41b807bfa8c5.qcow2 rbd:cloudstack/test450:mon_host=VXILAB1-CMON.ceph.local:auth_supported=cephx:id=cloudstack:key=AQDicxxxxxxxxxxxxxxxxFrNxwwxwxw==:rbd_default_format=2:client_mount_timeout=30
    (100.00/100%)

real    114m40.176s
user    10m34.924s
sys     4m3.139s

[root@VXIMUM1-CHVZR-2 mnt]# time qemu-img convert -p -O raw /media/ISETest12.raw rbd:cloudstack/testimage:mon_host=VXILAB1-CMON.ceph.local:auth_supported=cephx:id=cloudstack:key=AQxxxxxxxxxxxxxxrNDqlJueQ==:rbd_default_format=2:client_mount_timeout=30
    (0.00/100%)
    (32.02/100%)

    (100.00/100%)

real    74m1.770s
user    4m40.347s
sys     11m20.207s

[root@VXIMUM1-CHVZR-1 media]# time rbd import ISETest12.raw --dest-pool cloudstack

Importing image: 100% complete...done.

real    7m58.793s

user    1m30.641s

sys     2m39.082s

[root@VXIMUM1-CHVZR-2 mnt]# time qemu-img convert -p -O raw /media/f268aaee-6090-3fc9-9e9d-41b807bfa8c5.qcow2 /media/ISETest12.raw
    (100.00/100%)

real    9m3.571s
user    4m8.513s
sys     2m41.161s

EXPECTED RESULTS

The expected result is that VM deployment on CEPH should complete in a reasonable time before the job times out.

ACTUAL RESULTS

The actual result is that the first time VM deployment on CEPH takes a long time and eventually times out due to the conversion process being extremely slow.

Hi @poonam-agarwal28 thanks for sharing the issue and the benchmarks. Can you share output of:
qemu-img --version
virsh version

Can you also run adn share the benchmark for converting your raw or qcow2 template to rbd with flags -t none -n, something like:
time qemu-img convert -p -n -t none -O raw /media/ISETest12.raw rbd:cloudstack/testimage:mon_host=VXILAB1-CMON.ceph.local:auth_supported=cephx:id=cloudstack:key=AQxxxxxxxxxxxxxxrNDqlJueQ==:rbd_default_format=2:client_mount_timeout=30

@rhtyd  Please note below O/P
[root@VXIMUM1-CHVZR-1 media]# time qemu-img convert -p -n -t none -O raw /media/ISETest12.raw rbd:cloudstack/testimage:mon_host=VXILAB1-CMON.ceph.local:auth_supported=cephx:id=cloudstack:key=AQDicAVfG2lpIhAAYu4bnFtZjy04FrNDqlJueQ==:rbd_default_format=2:client_mount_timeout=30
(32.02/100%)
(33.02/100%)
(100.00/100%)
real    78m42.581s
user    1m48.733s
sys     3m59.782s

Thanks for sharing @poonam-agarwal28 can you also share your qemu-img and ceph versions?

The bigger templates become the longer it takes for them to be converted. It's the way it currently works that we need to use qemu-img to convert the template.
A template of 300GB is a rather large file and can indeed take a lot of time.
You can increase the job timeout if that helps for you. What would a different suggestion be?

@rhtyd
[root@VXIMUM1-CHVZR-1 ~]# qemu-img --version
qemu-img version 2.10.0(qemu-kvm-ev-2.10.0-21.el7_5.7.1)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
[root@VXIMUM1-CHVZR-1 ~]# ceph --version
ceph version 10.2.11 (e4b061b47f07f583c92a050d9e84b1813a35671e)
[root@VXIMUM1-CHVZR-1 ~]# virsh version
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 2.10.0

The bigger templates become the longer it takes for them to be converted. It's the way it currently works that we need to use qemu-img to convert the template.
A template of 300GB is a rather large file and can indeed take a lot of time.
You can increase the job timeout if that helps for you. What would a different suggestion be?

The issue already details proposed solutions , instead to directly converting and writing the image to CEPH Pool , if we convert the image locally and then upload to the secondary store using the rbd client the results are much better

Thanks for sharing the details @poonam-agarwal28, we'll use your env details to setup a test env.
Meanwhile, it may be faster for you to confirm and share if the rbd import command can be executed on any KVM host, even when they're not Ceph hosts (osd or monitors)? If this works on KVM hosts irrespective of them not being a ceph host (mon, osd etc) and if you can share if this requires installation of generally available/required dependency (such as ceph-common etc) then we can explore into the implementation of the proposed solution.

@rhtyd
a)  rbd import ISETest12.raw --dest-pool cloudstack
This is the rbd import command you can use to directly import the converted image into CEPH
b ) The package ceph-common should provide the rbd binary used for executing the command.
ceph-common-10.2.11-0.el7.x86_64 : Ceph Common
Repo        : @ceph-x86-64
Matched from:
Filename    : /usr/bin/rbd

Thanks for confirming the dependency packages @poonam-agarwal28, but my question was to understand if this requires any dependency on the host where it can be performed. For example, can you run the rbd import command on any KVM host (irrespective whether it's an OSD/mon host or not), for example if you run this on a non-osd/non-mon KVM host do you need to pass any other parameters (such as credentials, path/port/ip address, any config file etc)?

Ping @poonam-agarwal28

@nvazquez  @rohityadavcloud  For rbd import command to run, ceph packages must be installed and the node running the command should be configured as a ceph client ( it should have the admin key with read/write access to connect to the ceph pool ). In my scenario the command was run from one of the OSD nodes

Thanks @poonam-agarwal28 for explaining.
As I understand this is a special case but not a bug. Functionally it would take more time for the import/provisioning and this doesn't affect the ceph support.

@nvazquez @rohityadavcloud For rbd import command to run, ceph packages must be installed and the node running the command should be configured as a ceph client ( it should have the admin key with read/write access to connect to the ceph pool ). In my scenario the command was run from one of the OSD nodes

In most cloudstack setup, the OSD nodes are not used as kvm nodes in CloudStack.
good idea, but may not work for most users.
another idea, is it possible to support templates in RAW format in cloudstack ?


Type path completion triggers only if space is typed after colon.

Not sure if this is ST or plugin related. While this is no big deal for me, I like to keep my variable declaration like this: var variable:Type; and cleaning those extra spaces needed to trigger completion is quite inefficient.
Is there any way to change this behaviour?

P.S. Awesome plugin. Helped me a lot to switch from Windows. And now I find ST with this bundle much better than FlashDevelop :) So yeah, thanks!

Awesome, works like a charm, thanks!


Fixed Permissions

Many files have incorrect permissions. More specifically, they have the executable bits set. This is unnecessary, as none of them are executable. This PR unsets the execute bits.

Looks good, not sure how only some of those had improper permissions, but thanks for fixing it.

Looks good, not sure how only some of those had improper permissions, but thanks for fixing it.

You’re welcome. Thank you for the merge.
Chances are, those files were authored on a system that does not understand Unix permissions. Like Windows.

You’re welcome. Thank you for the merge.
Chances are, those files were authored on a system that does not understand Unix permissions. Like Windows.


Adding event-specific calendar icon and location preview to post-preview organism

This adds any event-specific styles to the post-preview organism
Testing

Visit http://localhost:8000/browse-filterable/

Review

@jimmynotjim
@anselmbradford
@sebworks

Preview

:+1:

:+1:


Can not use gorm sqlite with tdlib in one project

Hello!
I have golang application with:
go-tdlib
gorm.io/gorm
gorm.io/driver/sqlite
And if I specify tdlibparams:
UseMessageDatabase: true,
UseFileDatabase: true,
UseChatInfoDatabase: true,
Then get errors:
Destroy bad SQLite database because of [Error : 0 : [query:SELECT sqlcipher_export('encrypted')] to database "/go-telegram/accounts-data/89166459517/tdlib-db/db.sqlite" failed: no such function: sqlcipher_export]
If I remove grom from project, then error disappears
Or if I change tdlibparams database:false, then also error disappears.
But I need use tdlib databases and I need use gorm in one project please help me =)

Hello, Is it possible that the problem is with the sqlite3 version ?  Can you provide a demo in https://github.com/go-gorm/playground ?


Add additional exception handling to avoid serverside issues.

Also cleanup all projects.

Coverage increased (+0.9%) to 47.682% when pulling d912d200a1d50c4db9d6bbd51469b48c134bba94 on jdgarrett:fix-stability into 5db4f2ba3be6094d6bedfb908afb5126469c76fa on locationtech:master.

Coverage increased (+0.9%) to 47.682% when pulling d912d200a1d50c4db9d6bbd51469b48c134bba94 on jdgarrett:fix-stability into 5db4f2ba3be6094d6bedfb908afb5126469c76fa on locationtech:master.

Coverage increased (+0.9%) to 47.682% when pulling d912d200a1d50c4db9d6bbd51469b48c134bba94 on jdgarrett:fix-stability into 5db4f2ba3be6094d6bedfb908afb5126469c76fa on locationtech:master.

Coverage increased (+0.9%) to 47.682% when pulling d912d200a1d50c4db9d6bbd51469b48c134bba94 on jdgarrett:fix-stability into 5db4f2ba3be6094d6bedfb908afb5126469c76fa on locationtech:master.

Coverage increased (+0.9%) to 47.682% when pulling d912d200a1d50c4db9d6bbd51469b48c134bba94 on jdgarrett:fix-stability into 5db4f2ba3be6094d6bedfb908afb5126469c76fa on locationtech:master.


building error with torch

There is no problem when I compile mxnet with USE_TORCH=0.
But when I set USE_TORCH=1, the problem turns out like this
~/torch/install/lib/libTH.so: undefined reference to `sgeqrf_'
~/torch/install/lib/libTH.so: undefined reference to `ssyev_'
~/torch/install/lib/libTH.so: undefined reference to `sgesvd_'
~/torch/install/lib/libTH.so: undefined reference to `dsyev_'
~/torch/install/lib/libTH.so: undefined reference to `dorgqr_'
~/torch/install/lib/libTH.so: undefined reference to `dpotri_'
~/torch/install/lib/libTH.so: undefined reference to `dgesv_'
~/torch/install/lib/libTH.so: undefined reference to `sgels_'
~/torch/install/lib/libTH.so: undefined reference to `dgels_'
~/torch/install/lib/libTH.so: undefined reference to `dtrtrs_'
~/torch/install/lib/libTH.so: undefined reference to `sorgqr_'
~/torch/install/lib/libTH.so: undefined reference to `spotrs_'
~/torch/install/lib/libTH.so: undefined reference to `dpstrf_'
~/torch/install/lib/libTH.so: undefined reference to `sgetri_'
~/torch/install/lib/libTH.so: undefined reference to `dpotrf_'
~/torch/install/lib/libTH.so: undefined reference to `dgetri_'
~/torch/install/lib/libTH.so: undefined reference to `sormqr_'
~/torch/install/lib/libTH.so: undefined reference to `dgeqrf_'
~/torch/install/lib/libTH.so: undefined reference to `strtrs_'
~/torch/install/lib/libTH.so: undefined reference to `dormqr_'
~/torch/install/lib/libTH.so: undefined reference to `dpotrs_'
~/torch/install/lib/libTH.so: undefined reference to `sgesv_'
~/torch/install/lib/libTH.so: undefined reference to `dgetrf_'
~/torch/install/lib/libTH.so: undefined reference to `dgeev_'
~/torch/install/lib/libTH.so: undefined reference to `sgetrf_'
~/torch/install/lib/libTH.so: undefined reference to `dgesvd_'
~/torch/install/lib/libTH.so: undefined reference to `spotrf_'
~/torch/install/lib/libTH.so: undefined reference to `spstrf_'
~torch/install/lib/libTH.so: undefined reference to `sgeev_'
~/torch/install/lib/libTH.so: undefined reference to `spotri_'
collect2: error: ld returned 1 exit status
make: *** [bin/im2rec] Error 1
Is it caused by torch or mxnet?
Thank you

Repeat https://github.com/dmlc/mxnet/issues/1254


Add a Dockerfile

Since tool requirest pngquant and jpegoptim, it would make sense to have a Docker image with those tools installed already and running the tool would be even easier.

Hi, I would like to help this issue.

@hwchiu Sure no problem, i assign this to you!

@aranajhonny thanks!!
It seems you have done the docker image.
@Remeic I think it's better to link github account to docker hub to trigger automatically build procedure for piuma server.
And we can also update READEME.md after the public docker image has been created.

@hwchiu looks like the PR for adding the Dockerfile was closed but never merged - @aranajhonny are you planning to finish the PR up or should @hwchiu  take it over?

Hi, @peterj can you take over the PR?

@Remeic  sure, I already sent out a PR for this - #17


Victor/eng 2366 restore changesetupdated event

Fixes reactivity in the system by triggering the changeset written ws event from the rebaser after it's done

bors merge


Zoom 90% is now the correct zoom 100%

Describe the bug
The Page Zoom 90% is the correct 100% Zoom
This issue is strange because in kiwi stable and Edge(mobile) the page at 100% is the same page in kiwi browser 90% Zoom
To Reproduce
Steps to reproduce the behavior:
Open this in edge
You can test this in this website
https://muhaffidh.app/
Open this in kiwi browser stable
https://muhaffidh.app/
Open this in kiwi browser dev
https://muhaffidh.app/
And compare them
Expected behavior
Having 100% means 100% Zoom
Just like in kiwi browser stable
Screenshots
Smartphone (please complete the following information):

Device: [e.g. OnePlus 7]
Android Version : [e.g. A11 ]
Kiwi Browser Version [ e.g. 90.0.4577.17 ]

Additional context
Add any other context about the problem here.

i closed the issuie cuz i thought it was a problem on my side

No it's not. It's hardcoded.

this issue is now in the stable version!!! it was only in the dev one


fix(.github/workflows) Grab the first access token URL

Description:
Two access token URLs are available, but need just one for the automerge feature

Affected area:

New Functionality      [ ]
Documentation          [ ]
Install                [ ]
Control Plane          [ ]
CLI Tool               [ ]
Certificate Management [ ]
Networking             [ ]
Metrics                [ ]
SMI Policy             [ ]
Security               [ ]
Tests                  [ ]
CI System              [ ]
Performance            [ ]
Other                  [ X]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

Codecov Report

Merging #2577 (4120ebd) into main (d9e691c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2577   +/-   ##
=======================================
  Coverage   63.12%   63.12%
=======================================
  Files         154      154
  Lines        7133     7133
=======================================
  Hits         4503     4503
  Misses       2613     2613
  Partials       17       17

Flag
Coverage Δ

unittests
63.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


fix: action buttons are now in a row when creating a doc with versions-only enabled

Description
Fixes #2476 (assuming it's actually a bug).

[x] I have read and understand the CONTRIBUTING.md document in this repository

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[ ] I have added tests that prove my fix is effective or that my feature works
[x] Existing test suite passes locally with my changes
[ ] I have made corresponding changes to the documentation

@qbeauperin thank you! I actually think the correct solution here is to hide the preview button entirely from until the document is saved. This is because the preview button fetches document data on-click to generate it's URL, and so it doesn't make sense to show that button at all if there is no document yet.
One other housekeeping thing I did was cleanup the className syntax so it's more readable moving forward.


Can't download !

C:\Users\Akash>udacimak render C:\Users\Akash\Machine Learning - Introduction v2.0.0
2019-11-16T19:01:23.009Z [error]: ERROR: Path to downloaded Udacity course/Nanodegree doesn't exist.
STACK: Error: Path to downloaded Udacity course/Nanodegree doesn't exist.
at renderCourse (C:\Users\Akash\AppData\Roaming\npm\node_modules\udacimak\lib\commands\render\functions\renderCourse.js:43:11)
at async render (C:\Users\Akash\AppData\Roaming\npm\node_modules\udacimak\lib\commands\render\index.js:20:5)

@akashbisht81 You need to put the path in double-quotes because it contains space character

Gotcha !, I just re-named the file name without spaces and replaced that
name instead, and now it worked like a charm. Thanks.
On Sun, Nov 17, 2019 at 4:40 PM udacimak<EMAIL_ADDRESS>wrote:

@akashbisht81 https://github.com/akashbisht81 You need to put the path
in double-quotes because it contains space character
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/udacimak/udacimak/issues/63?email_source=notifications&email_token=ADUA72DZURUOGUE2GZRIF6DQUERAVA5CNFSM4JOGOLJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEIJM3I#issuecomment-554735213,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADUA72DT4BPT6GW3U3D66QLQUERAVANCNFSM4JOGOLJQ
.

@udacimak I have downloaded the content for personal-use, But i have one issue, the video is not in HD, how can i download all the contents in HD format. Any suggestions on that ?

@akashbisht81 I've tried this before but it's not possible yet - audio is lost when downloading HD video.

Okay.
On Tue, Nov 19, 2019 at 5:37 AM udacimak<EMAIL_ADDRESS>wrote:

@akashbisht81 https://github.com/akashbisht81 I've tried this before
but it's not possible yet - audio is lost when downloading HD video.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/udacimak/udacimak/issues/63?email_source=notifications&email_token=ADUA72HXIRMODOXKEJXGV73QUMU2VA5CNFSM4JOGOLJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEMLVDQ#issuecomment-555268750,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADUA72BP6L5VYRBMT2WXFWTQUMU2VANCNFSM4JOGOLJQ
.


Update clippy allow due to depreciation

Clippy complains that #![allow(clippy)] is depreciated. This change changes it to #![allow(clippy::all)].
Closes:
#178

Thank you!

Published 0.7.1


[TFLite] Add options for benchmark_model and label_image to allow fp16 for fp32 models

Add options for benchmark_model and label_image to allow running fp32 models with fp16. Useful when testing NNPAI accelerators with fp16 capability.

Nagging Assignee @wt-huang: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@freedomtan please rebase branch

@rthadur it seems the patch is merged into master already.

@rthadur it seems the patch is merged into master already, see c28a24b

yes , thank you closing this PR


Feature/v2 compatibility

Update quotes into version file add set DEFAULT_API_VERSION to v2

Related to https://github.com/baweaver/pokegem/pull/5

Any update ? @baweaver


[Bug]: no-neck-pain.nvim disable doesn't work in SavePre hook

Your minimal.lua config
local root = "/tmp/persisted"

-- Set stdpaths to use root dir
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- Bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "--single-branch",
    "https://github.com/folke/lazy.nvim.git",
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

vim.opt.sessionoptions = "buffers,curdir,folds,globals,tabpages,winpos,winsize" -- Session options to store in the session

-- Install plugins
local plugins = {
  {
    "olimorris/persisted.nvim",
    opts = {
      autoload = true,
    },
  },
  {
    "shortcuts/no-neck-pain.nvim",
    opts = {
      buffers = {
        scratchPad = {
          enabled = true,
          location = "/tmp/",
        },
        bo = {
          filetype = "md",
        },
      },
    },
  },
  -- Put any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

local persisted_hooks = vim.api.nvim_create_augroup("PersistedHooks", {})

vim.api.nvim_create_autocmd({ "User" }, {
  pattern = "PersistedSavePre",
  group = persisted_hooks,
  callback = function()
    require("no-neck-pain").disable()
  end,
})

Error messages
No response
Describe the bug
What I expect
After :quitting a file while using :NoNeckPain to center the code, I expect to get back into the file at the same position where I left off when loading the Session.
What happens instead
Persisted.nvim opens the side buffer of NoNeckPain instead of my file. Even though I disable NoNeckPain using the PersistedSavePre hook.
Reproduce the bug
Steps to reproduce:

nvim
:e some-file.txt
:NoNeckPain
:q
nvim

Final checks

[X] I have made sure this issue exists in the latest version of the plugin
[X] I have tested with the minimal.lua config file above and still get the issue
[X] I have used SessionSave to save the session before restarting Neovim and using SessionLoad
[X] I have made sure this is not a duplicate issue

With your setup, :q seems to close the buffer you're working in, leaving the no-neck-pain tabs open:

I see. But if I disable them pre save, how are they getting persisted? Is that because the working buffer closes first?

So doing :q triggers the VimLeavePre autocmd. I've built Persisted to listen for that autocmd and run the persisted.save method which in turn calls this method:
---Write the session to disk
---@param session string
---@return nil
local function write(session)
  vim.api.nvim_exec_autocmds("User", { pattern = "PersistedSavePre" })
  vim.cmd("mks! " .. e(session))
  vim.g.persisting = true
  vim.api.nvim_exec_autocmds("User", { pattern = "PersistedSavePost" })
end

I suspect that VimLeavePre causes a conflict with NoNeckPain which doesn't allow it to close down its tabs. Might be worth asking the creator how this functions exactly in their plugin.
A quick search on GitHub reveals that there are a lot of users utilising the PersistedSavePre hook with other plugins.

I'm taking @shortcuts up on their offer to ping them.
@shortcuts Any ideas/insight, why this doesn't work?

Hey there, thanks for the investigation! I've tried with your reproduction and the only weird thing I've seen is that the reopened file is one of the nnp side buffer.
My guess is that there is a race condition between the two plugin since we both have hooks on the quit events. I noticed the prompt before quitting on your recording @olimorris and I do believe this might cause an issue, from my investigation it seems to be on the nnp side so I'll try to see if I can improve that!

@shortcuts sounds great. Totally up for rework on my side too to get our plugins to be friends 😉

I found someone close the NoNeckPain buffers "manually": https://github.com/yuma140902/dotfiles-public/blob/8dd33b742a45e74416b785d1a529ef4e35120752/neovim/nvim/lua/rc/plugins.lua#L568
They are using the blank buffers, I'm not sure how I can identify the buffers when I have scratch pads enabled.
I tried some things, but couldn't get it to work. It's probably a skill issue though.

I found someone close the NoNeckPain buffers "manually": https://github.com/yuma140902/dotfiles-public/blob/8dd33b742a45e74416b785d1a529ef4e35120752/neovim/nvim/lua/rc/plugins.lua#L568
They are using the blank buffers, I'm not sure how I can identify the buffers when I have scratch pads enabled. I tried some things, but couldn't get it to work. It's probably a skill issue though.

You can maybe try to compare the path of the file opened in the buffer? You can get access to it via _G.NoNeckPain.config and from there you have the path of the opened file in buffers.[left|right].scratchPad.pathToFile

I find a way to remove the prompt when quitting nvim with persisted enabled but it doesn't yet solve the issue of the side buffers :/ i'll keep digging


cannot assign to readonly property targetNSAlias on node v0.12

After upgrading to node v0.12, I am getting an error. After som research I believe this is due to the version of node-soap being use. I noticed that the package.json for this module reqquires soap 0.5, wheras the latest versionis 0.9.3 and looking through the oull request/issue history on the soap module I see that a fix for this issue was submitted and merged some time ago. I think an update to this modules dependencies is needed, I have tried just a straight upgrade on a fork but I then get some soap errors. I was wondering if you could give me some pointers on fixing this or perhaps have a look yourself?
The error on node v0.12 using soap v0.5 is below:
Cannot assign to read only property 'targetNSAlias' of TeamAccessType|xsd:string|NONE,READ_ONLY,READ_WRITE date=Tue Jul 07 2015 10:59:45 GMT+0100 (BST), pid=39975, uid=501, gid=20, cwd=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api, execPath=/usr/local/Cellar/node/0.12.0_1/bin/node, version=v0.12.0, argv=[node, /usr/local/bin/sails, lift], rss=183975936, heapTotal=153554176, heapUsed=116197872, loadavg=[2.75537109375, 2.11328125, 1.96044921875], uptime=700397, trace=[column=28, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ElementElement.description, line=819, method=description, native=false, column=29, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=AllElement.description.SequenceElement.description [as description], line=858, method=description.SequenceElement.description [as description], native=false, column=20, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ComplexTypeElement.description, line=765, method=description, native=false, column=46, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ElementElement.description, line=817, method=description, native=false, column=29, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=AllElement.description.SequenceElement.description [as description], line=858, method=description.SequenceElement.description [as description], native=false, column=20, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ComplexTypeElement.description, line=765, method=description, native=false, column=31, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ElementElement.description, line=843, method=description, native=false, column=33, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=MessageElement.postProcess, line=500, method=postProcess, native=false, column=13, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=OperationElement.postProcess, line=602, method=postProcess, native=false, column=11, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=PortTypeElement.postProcess, line=622, method=postProcess, native=false, column=14, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=BindingElement.postProcess, line=636, method=postProcess, native=false, column=15, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=ServiceElement.postProcess, line=671, method=postProcess, native=false, column=26, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=null, line=971, method=null, native=false, column=12, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=WSDL._processNextInclude, line=1022, method=_processNextInclude, native=false, column=8, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=WSDL.processIncludes, line=1052, method=processIncludes, native=false, column=10, file=/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js, function=null, line=961, method=null, native=false], stack=[TypeError: Cannot assign to read only property 'targetNSAlias' of TeamAccessType|xsd:string|NONE,READ_ONLY,READ_WRITE,     at ElementElement.description (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:819:28),     at AllElement.description.SequenceElement.description [as description] (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:858:29),     at ComplexTypeElement.description (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:765:20),     at ElementElement.description (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:817:46),     at AllElement.description.SequenceElement.description [as description] (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:858:29),     at ComplexTypeElement.description (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:765:20),     at ElementElement.description (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:843:31),     at MessageElement.postProcess (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:500:33),     at OperationElement.postProcess (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:602:13),     at PortTypeElement.postProcess (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:622:11),     at BindingElement.postProcess (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:636:14),     at ServiceElement.postProcess (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:671:15),     at /Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:971:26,     at WSDL._processNextInclude (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:1022:12),     at WSDL.processIncludes (/Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:1052:8),     at /Users/Sam/Documents/Work/salesknowledge/sales-knowledge-api/node_modules/node-google-dfp/node_modules/soap/lib/wsdl.js:961:10]
Thanks

Hi @Batornator,
One doubt looking at what you have posted, the error message seems to suggest you're trying to set a field that's read only [TeamAccessType ?]. We have had issues with the soap module in the past, I did have to use a lower version because the newer version gave me issue in setting one of the parameters of the header -but I am not sure this is the issue from the error posted.

Thanks for the pointer. I will have to look into that as the code was written by another team member I just happened to run into trouble with it after upgrading to node 0.12.
—
Sent from Mailbox
On Tue, Jul 7, 2015 at 5:26 PM, Andre John de Souza
<EMAIL_ADDRESS>wrote:

Hi @Batornator,
One doubt looking at what you have posted, the error message seems to suggest you're trying to set a field that's read only [TeamAccessType ?]. We have had issues with the soap module in the past, I did have to use a lower version because the newer version gave me issue in setting one of the parameters of the header -but I am not sure this is the issue from the error posted.
Reply to this email directly or view it on GitHub:
https://github.com/ShinyAds/node-google-dfp/issues/14#issuecomment-119260404


Rename user methods to suggest what they do

prepareUserDetails -> createUser (protected), creates a UserInterface implementation
getUserDetails -> getUser (public), returns a UserInterface implementation

Travis timed out again. :snail:

I like these changes. Thanks!

I was updating the Reddit provider and found myself staring at prepareUserDetails thinking "wait, what is this method supposed to do exactly?" Naming things is hard. :p
Thanks for the merge. :+1:


How to pass the column name from ts file. If I write [name]="title" , it is not taking.

I'm submitting a Enquiry  (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

Expected behavior

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Table version: 0.7.x

Angular version: 2.0.x

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [all | TypeScript X.X | ES6/7 | ES5]

This should be working fine:
<ngx-datatable-column [name]="titleProperty">
where titleProperty is a string property in your component


Windows dns, cant make it work

Hello, Im using windows dns for redirect and i can't make it work.
for example im trying to redirect http://www.cnn.local to https://www.walla.co.il

created a zone name cnn.local
created a cname record called "www" and put "www.walla.co.il.opts-https.redirect.center." in the fdqn host

when i query the dns i get the right info. C:\Users\Administrator>nslookup www.cnn.local
Server:  UnKnown
Address:  212.x.x.x
Name:    redirect.center
Address:  212.X.X.X (THIS IS MY DNS)
Aliases:  www.cnn.local
www.walla.co.il.opts-https.redirect.center
but browsing using chrome and IE doesn't work
im getting
Something is wrong on your host: www.cnn.local
Error message:
queryCname ENOTFOUND www.cnn.local
redirect.center
tried with the dot (.) in fdqn and without it.
tied with the opts-https and without it.
noting helps.
what am i doing wrong?

That won't work. The redirect server needs to lookup your source domain in the DNS system to know what to do. But, www.cnn.local is not a valid domain from the perspective of the server: hence, the error: CNAME not found for www.cnn.local.
The way it works is this, I think:

user types source-domain.com into browser
browser asks operating system to resolve DNS for source-domain.com
operating system queries DNS system for source-domain.com to find CNAME record target-domain.com.redirect.center which further resolves to IP of the redirector server (redirect.center) IP <IP_ADDRESS>
browser sends GET request with Host header 'source-domain.com' to <IP_ADDRESS>
redirector server receives the GET request: at this point the server has no information about where to redirect!
redirector server issues DNS lookup for 'source-domain.com' and looks for CNAME record (which should be there, since step 3 relies on it) whose value should be 'target-domain.
redirector server parses the value of the CNAME record 'target-domain.com.redirect.center' to extract 'target-domain.com' and options
redirector server constructs a response to the GET request with status code 301 (moved) and Location header set to 'http://target-domain.com/'

This is also why just accessing 'target-domain.com.redirect.center' from the browser will not work, because in Step 4, the Host header will be 'x.redirect.center' and the DNS lookup in 6 will just find 'CNAME redirect.center', and target-domain.com won't ever be used.
Other redirect services (https://redirect.name) lookup the target information from other DNS records like TXT, but the principle is the same: this information about the target redirect can only come from DNS because it is not contained within the GET request.
PS. @udleinati might be useful to post this basic info about how it works in the title page, because this is not obvious, to save people from figuring it out every time.

That won't work. The redirect server needs to lookup your source domain in the DNS system to know what to do. But, www.cnn.local is not a valid domain from the perspective of the server: hence, the error: CNAME not found for www.cnn.local.
The way it works is this, I think:

user types source-domain.com into browser
browser asks operating system to resolve DNS for source-domain.com
operating system queries DNS system for source-domain.com to find CNAME record target-domain.com.redirect.center which further resolves to IP of the redirector server (redirect.center) IP <IP_ADDRESS>
browser sends GET request with Host header 'source-domain.com' to <IP_ADDRESS>
redirector server receives the GET request: at this point the server has no information about where to redirect!
redirector server issues DNS lookup for 'source-domain.com' and looks for CNAME record (which should be there, since step 3 relies on it) whose value should be 'target-domain.com.redirect.center'
redirector server parses the value of the CNAME record 'target-domain.com.redirect.center' to extract 'target-domain.com' and options
redirector server constructs a response to the GET request with status code 301 (moved) and Location header set to 'http://target-domain.com/'

This is also why just accessing 'target-domain.com.redirect.center' from the browser will not work, because in Step 4, the Host header will be 'x.redirect.center' and the DNS lookup in 6 will just find 'CNAME redirect.center', and target-domain.com won't ever be used.
Other redirect services (https://redirect.name) lookup the target information from other DNS records like TXT, but the principle is the same: this information about the target redirect can only come from DNS because it is not contained within the GET request.
PS. @udleinati might be useful to post this basic info about how it works in the title page, because this is not obvious, to save people from figuring it out every time.

Hello, @radfish
thank you for the email.
i still cant make it work.
any chance of assisting me. willing to pay.
please conatct me yaron.e(at)gmx.com

@stammail would you make it work?


Delete snapshot data when task is deleted

Currently snapshot data is not cleaned up after a task is deleted, causing a new task that is created with the same name to reuse the old snapshot data.

Fixes with #776


SetVsyncEnabled(false) + SetScreenClearedEveryFrame(false) consumes more CPU than expected on Windows

Ebitengine Version
v2.6.4 and main (006f14ac196211d6cba6e4754cd8e69baa4cc69f)
Operating System

[X] Windows
[ ] macOS
[ ] Linux
[ ] FreeBSD
[ ] OpenBSD
[ ] Android
[ ] iOS
[ ] Nintendo Switch
[ ] PlayStation 5
[ ] Xbox
[ ] Web Browsers

Go Version (go version)
go version go1.21.6 windows/arm64
What steps will reproduce the problem?
Run this program and see the CPU usage on the task manager:
package main

import (
	"sync"

	"github.com/hajimehoshi/ebiten/v2"
)

type Game struct {
	once sync.Once
}

func (g *Game) Update() error {
	return nil
}

func (g *Game) Draw(screen *ebiten.Image) {
}

func (g *Game) Layout(width, height int) (int, int) {
	return width, height
}

func main() {
	ebiten.SetScreenClearedEveryFrame(false)
	ebiten.SetVsyncEnabled(false)
	if err := ebiten.RunGame(&Game{}); err != nil {
		panic(err)
	}
}

What is the expected result?
The CPU usage should be low (less than 5% or so)
What happens instead?
The CPU usage was about 50%
Anything else you feel useful to add?
This was found at https://github.com/hajimehoshi/ebiten/issues/2889 (CC @erexo)
Let's check Linux too.

Even on macOS, this optimization doesn't work with OpenGL.

thanks ❤


New version: MatrixPencils v1.5.3

Registering package: MatrixPencils
Repository: https://github.com/andreasvarga/MatrixPencils.jl
Created by: @andreasvarga
Version: v1.5.3
Commit: def78754e855c331baa1e9fe27623e4f45e3a304
Reviewed by: @andreasvarga
Reference: https://github.com/andreasvarga/MatrixPencils.jl/commit/def78754e855c331baa1e9fe27623e4f45e3a304#commitcomment-45999145

Superseded by #28115

Superseded by #28115


Outdated link in the About section

Just wanted to let you know that the link in the about section is outdated.

Hi @lplatzer which link? If you mean on NPM that should be fixed with the next release

Found it


StackedBarCharts image - ahartman

Ohhh, I see what you mean now!
You're right that it's not supported.
I think that stacked bars layer should be improved to handle this.
Want to try to do it? Otherwise I'd have some hours available, for hire.
It would also be possible (maybe easier) to adjust the plus/minus example, which uses the generic views layer to produce the bars, to use stacked bar views instead.

Dear Ivan,
I adapted your StackedBarsExample, please find attached.
After some thinking, this turned out to be quite easy, I extended your layers approach with a second BarsModel.
Depending on a value being positive or negative, it goes in one or the other barmodel.
You can also find some code to automatically determine Y-axis scaling based on bar values.
Take a look at my code adaptations and you should feel free to use this in your own examples if you wish.
You can help me with explaining what variables to adapt to accommodate more bars in a graph than the 4 in the example.
I have found bar width and the number of bars but how to decrease spacing between bars?
Also I want to find the setting to paint X-axis labels vertically so that they fit when charting more bars.
Finally I need to work out how to redraw for portrait orientation and I want to adapt your existing horizontal/vertical coding for that.
Met vriendelijke groeten, Kind regards, Mes meilleures salutations,
André Hartman
Rodeweg 90
B-2920 Kalmthout
België
tel:		0032 3 666 0411
GSM:	0032 488 626 895

Op 18 dec. 2016, om 19:23 heeft Ivan Schütz<EMAIL_ADDRESS>het volgende geschreven:
Ohhh, I see what you mean now!
You're right that it's not supported.
I think that stacked bars layer should be improved to handle this.
Want to try to do it? Otherwise I'd have some hours available, for hire.
It would also be possible (maybe easier) to adjust the plus/minus example, which uses the generic views layer to produce the bars, to use stacked bar views instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/i-schuetz/SwiftCharts/issues/197#issuecomment-267837269, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqAvJBdRALxRgweu6agwbiPsc5oymYuks5rJXoggaJpZM4LQEPj.

Ivan,
I made issue 200 with my example code attached.
Met vriendelijke groeten, Kind regards, Mes meilleures salutations,
André Hartman
Rodeweg 90
B-2920 Kalmthout
België
tel:		0032 3 666 0411
GSM:	0032 488 626 895

Op 5 jan. 2017, om 15:31 heeft Ivan Schütz<EMAIL_ADDRESS>het volgende geschreven:
Hi André,
as previously mentioned the attachments via email don't work.
The bars layer will adjust the spacing automatically if you pass more bars. You just have to ensure that the order field of the bars / nominal axis values is correct, including the padding ones.
For example, if you pass 8 bars in the example, make sure that the order of the bars is 1...7 and the padding axis values that are pre/appended to the mapped axis values array have order 0 and 8 respectively.
Note that you also can work with fixed spacing instead of width, in this case the width of the bars will be adjusted dynamically. For this you have to use the other initializer of stacked bars layer.
Here is an example which uses rotated x axis labels: https://github.com/grafiti-io/SwiftCharts/blob/master/Examples/Examples/NotNumericExample.swift https://github.com/grafiti-io/SwiftCharts/blob/master/Examples/Examples/NotNumericExample.swift
For screen rotation please orient with this: #105 https://github.com/i-schuetz/SwiftCharts/issues/105
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/i-schuetz/SwiftCharts/issues/197#issuecomment-270656888, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqAvOLdxk5IqxepCB4cFl1Bt2MO8L52ks5rPP64gaJpZM4LQEPj.

Ivan,
For some time, I was too busy to work on my project with SwiftCharts.
I customised your StackedBars example, so that it shows positive AND negative values. The trick sits in func populateModels().
You asked me to send the code example in a gist which I just made: https://gist.github.com/ahartman/fc97b05537fc4d38d94b3bb10e798119.
You wrote to me on 5 January that when adding bars, either the spacing or the bars width will adjust. Of course all adjustment is finite, ideally one should bar width as a percentage of total available width and let the bars layer adjust bars width as well as spacing to make the lost of available room.
If I want the bar width to adjust while keeping spacing fixed, how do I use " the other initializer of stacked bars layer".
Kind regards, André Hartman

Hi André,
could you maybe use master?  As you can see here: https://github.com/i-schuetz/SwiftCharts/blob/master/SwiftCharts/Layers/ChartGroupedBarsLayer.swift#L247
it's possible to pass the spacing and the bar's width.
Note that master has some api changes but they are small and should be easy to follow with one of the examples.
To use master you have to update your podfile with this:
pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'

Let me know how it goes! If you want to use zooming/a scrollable view port let me know, the api to do this, especially with the bars is a bit unwieldy right now but I'm happy to help.

Ivan,
I update my podfile but I seem not to get master. Pod update said SwiftCharts went from 0.5.1 to 0.5.1, which does not really bring me forward. Any ideas?
Regards, André Hartman


MUDROD-16 Implement Core Ontology Processing

This issue addresses https://github.com/mudrod/mudrod/issues/16
@Yongyao @quintinali there are a few modifications I need to make, however you can use the LocalOntology#main method and input -ontDir mudrod/core/src/main/resources/ontology to see what is going on.

@Yongyao @quintinali you can test this as follows
$ mvn clean install
$ java -cp "core/target/mudrod-core-0.0.1-SNAPSHOT.jar:core/lib/*" esiptestbed.mudrod.ontology.process.LocalOntology -ontDir core/src/main/resources/ontology/ > mudrod.log

It is not 100% complete but it looking good and will really provide value for our results.


ErrorException: Undefined array key "choices"

I'm currently using v0.5.2.
When using the chat completions, I keep getting the following exception when there is a server error on OpenAI's side.

While debugging I came across this line.

Why does it check the charset? Is that required?
If I remove the charset part, then the following exception is thrown which I would expect.

Hi @tomirons
Thank you for raising the issue and your PR.
I made another PR #134  which solves the problem in a more generic way.
Am I right when I assume that the content type is  application/json instead of application/json; charset=utf-8. Currently I am not able to reproduce the issue by myself.

@gehrisandro yeah, the content type I've been seeing when debugging this is just application/json.

I'm having the same issue today. Thanks for reporting @tomirons.

Hi, I just encountered this when openAI was returning a content_filtered error.
It would be really nice to know if there was an error on the completion call and then what type of error it was.
To help, here's the completion response on this error:
CATEGORY:array(1) {   ["error"]=>   array(5) {     ["message"]=>     string(265) "The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766"     ["type"]=>     NULL     ["param"]=>     string(6) "prompt"     ["code"]=>     string(14) "content_filter"     ["status"]=>     int(400)   } }

I have a similar issue... pls help: got the
ErrorException
Undefined array key "choices"
in prompt
$client = \OpenAI::client(getenv('OPENAI_API_KEY'));
$result_text = $client->completions()->create([
    'model' => 'text-davinci-003',
    'prompt' => 'Analyse this text and give me sentiment of the context on a scale between -1.0 and 1.0 just as decimal without spaces and consider context about Ukraine and Russland or war or death as very negative: ' . $this->article->text,

This has been fixed in the latest version: 0.5.3


Warning messages when spawning browser to view content

This isn't an fcli bug - it was a Gtk misconfiguration on my system.


Weird terrain in PA

Looks like some sort of dataset seam issue. https://opentrailmap.us/#map=15.07/40.46089/-75.51984

This is probably a bug in the Mapzen terrain tiles that shows up occasionally. The source data that we pulled into the mosaicked data would sometimes not have correct edge data. I believe there was a fix that we built ~5 years ago that solved this while at Snap, but I don't think we ever got it released into the public bucket 🤔.


Refreshing blink on resume, Firestore

When I open the recent apps and come back to my app (Pause the app), the list refreshes itself. That is probably because stopListening() is called in onStop().
I wonder if this is intended, or if there a way to fix this refreshing blink when coming back to the app.

I managed to remove the blink by moving stopListening to onDestroy. So far this doesn't seem to be crashing.

See https://github.com/firebase/FirebaseUI-Android/issues/947. I'm almost ready to publish a guide demoing how to keep track of your state.

Yeah let's talk about this issue on #947.
@SUPERCILEX excited to see this guide!  Also if you have any changes you think we should make in FirebaseUI to accommodate this, let me know.

@samtstern ❤. I've tried multiple times to come up with a nice API, but it never worked out nice. 😭


[CLI]: Cannot log multiple PIL Images

Describe the bug

When I am logging PIL images to wandb during training, only the first image appears in the web app. In the below example, it would log image1 at step 1 and 2 but image2 is not logged at all.

import wandb
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt

# init wandb
wandb.init(
    name="exampleRun",
    project="exampleProject",
    entity="exampleEntity",
    reinit=True,
    #dir=PATH,
)

# example image
image = np.random.rand(256, 256)

# prepare wandb image
fig, ax = plt.subplots()
ax.imshow(image, cmap="gray")
ax.axis('off')
fig.canvas.draw()
image_logging = Image.frombytes('RGB', fig.canvas.get_width_height(),fig.canvas.tostring_rgb())
image_logging = wandb.Image(image_logging, caption=f"Image")
plt.close()

# log the first image at step 1
wandb.log({"image1": image_logging}, step=1, commit=True)

# log the first image at step 2
wandb.log({"image1": image_logging}, step=2, commit=True)

# log the second image at step 1
wandb.log({"image2": image_logging}, step=1, commit=True)

# log the second image at step 2
wandb.log({"image2": image_logging}, step=2, commit=True)

wandb.finish()

wandb: Currently logged in as: *** (***). Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.15.4
wandb: Run data is saved locally in ***
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run exampleRun
wandb: ⭐ View project at https://wandb.ai/***/***
wandb: 🚀 View run at https://wandb.ai/***/***/runs/bp2p7acd

wandb: Waiting for W&B process to finish... (success).
wandb: 🚀 View run exampleRun at: https://wandb.ai/***/***/runs/bp2p7acd
wandb: Synced 7 W&B file(s), 4 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: ***

Additional Files

Environment
Tested on 2 environments:
WandB version: 15.4 (15.0)
OS:  Linux-4.18.0-372.9.1.el8.x86_64-x86_64-with-glibc2.28 (MacOS 12.6.6)
Python version: 3.10.9 (3.10.9)
Versions of relevant libraries: NA
Additional Context
No response

Hi, @batschoni thank you for writing in!
This is actually an intended behavior. Our SDK does not let users go back in time (step-wise) and in the example above you first go to steps 1 and 2, and then back in time to 1 and 2.
If you log images 1 and 2 together in steps 1 and 2 like this:
wandb.log({"image1": image_logging,"image2": image_logging}, step=1, commit=True)

# log the first image at step 2
wandb.log({"image1": image_logging,"image2": image_logging}, step=2, commit=True)

This should log the images together with the according steps.
Something like this, with different steps:
# log the first image at step 1
wandb.log({"image1": image_logging}, step=1, commit=True)

# log the first image at step 2
wandb.log({"image1": image_logging}, step=2, commit=True)

# log the second image at step 1
wandb.log({"image2": image_logging}, step=3, commit=True)

# log the second image at step 2
wandb.log({"image2": image_logging}, step=4, commit=True)

would log the images into wandb as well, but on different steps.
so would something like this:
# log the first image at step 1
wandb.log({"image1": image_logging}, step=1, commit=True)

# log the first image at step 2
wandb.log({"image2": image_logging}, step=1, commit=True)

# log the second image at step 1
wandb.log({"image1": image_logging}, step=2, commit=True)

# log the second image at step 2
wandb.log({"image2": image_logging}, step=2, commit=True)

but not when we go from step 1 to step 2 back to step one and back to step 2 unfortunately.
Cheers!

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

Hi @ArtsiomWB,
Thanks for your prompt feedback, much appreciated! Logging the images together in one dict (solution 1) indeed works.


Make Select-String faster by not doing extra work

PR Summary
By not tracking context in the common case where Context size is 0, and by not checking if the full name of a FileInfo is a Directory, about 30% of the execution time is cut when piping files into Select-String.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Change is not breaking
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] User-facing Documentation needed

[ ] Issue filed - Issue link:

Testing - New and feature

[x] Not Applicable or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

[ ] Add [feature] if the change is significant or affects feature tests

@PaulHigin You are right!

@adityapatwardhan Do you want me to fix all it the file or just the new ones? Happy to do both, but more to review if I fix all of them.

@powercode Fixing the CodeFactor issues for the code you added / changed should be sufficient. Thanks!

@iSazonov I'll have a look this evening.

@powercode Thanks for great work!


[nrfconnect] Explicitly configure python to be used by GN

Problem
GN needs python to run various helper scripts used during the build process. On different operating systems python name, which GN defaults to, may point to either python2 or python3 or it may not exist at all. On Windows, on the other hand, python 3 is distributed as python.exe executable, so python3 name also could not be used for that purpose.
Summary of Changes
Use more portable way to find python 3 in the system and pass the path to GN.

@saurabhst ?


Makes the tooltip directive

Ticket Link
GROUPINGS-1325
Test Checklist

[X] Unit Tests Passed:
[X] Jasmine Tests Passed:
[X] General Visual Inspection:

Also, the "placement" attribute may be too vague. Since "tooltip-placement" is already taken, we can go with "tooltip-position".

Also, the "placement" attribute may be too vague. Since "tooltip-placement" is already taken, we can go with "tooltip-position".

I tried making the attribute "tooltip-placement" but after trial and error, it seems you can't uppercase or special characters and it has to be one word. Is "tooltipdirection" ok?

Also, the "placement" attribute may be too vague. Since "tooltip-placement" is already taken, we can go with "tooltip-position".

I tried making the attribute "tooltip-placement" but after trial and error, it seems you can't uppercase or special characters and it has to be one word. Is "tooltipdirection" ok?

Maybe you can do attrs["tooltip-direction"]. Otherwise, tooltipdirection is fine.

Also, the "placement" attribute may be too vague. Since "tooltip-placement" is already taken, we can go with "tooltip-position".

I tried making the attribute "tooltip-placement" but after trial and error, it seems you can't uppercase or special characters and it has to be one word. Is "tooltipdirection" ok?

Maybe you can do attrs["tooltip-direction"]. Otherwise, tooltipdirection is fine.

I tried using hyphens but it didn't work, I'l use tooltipdirection

I found that Angular.js converts camel casing to the dash casing: https://stackoverflow.com/questions/25807763/custom-angularjs-directive-including-a-dash-in-the-name-doesnt-work

I accidentally merged a previous commit with the commit for this ticket so I'm closing this ticket and making a new pull request.


First pass at template

Thanks!
I've started a template package with some engines built off your parsnip/quantile-mode branch: https://github.com/dajmcdon/quantrines.


⚠ Bofrost.lu has degraded performance

In 5acabd1, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1974 ms

Resolved: Bofrost.lu performance has improved in 47eee2a after 10 minutes.


Bit operations below 33 bits now use the inbuilt bitwise library

When the IPREC register is at 32 or below, it will now use the bit library and then clamp it to the desired integer precision using a BAND
For demonstrative purposes, the left CPU is using a modified version of the old BSHL with the 30 cycle penalty removed, and the right CPU is using the new BSHR which will have no cycle penalty at 32 bit and below IPREC, both CPUs are set to 32 bit precision.
Both CPUs are at 14MHz, which is 10x the default limit of 1.4MHz
https://github.com/wiremod/wire-cpu/assets/57756830/71824bcb-56a8-4fa4-a545-4473aa6c7c00

The bit library returns signed representations of the transformations so that might be a break in behavior.

@thegrb93 I just tested, apparently the old bitwise functions use the msb to determine arbitrary precision levels, so I'll have to reimplement that to make it a non-breaking change, shouldn't be too bad
CPUSET 51,32
MOV R0,1
BSHL R0,31 // Result = -2147483648

CPUSET 51,8
MOV R0,1
BSHL R0,7 // Result = -128

CPUSET 51,9
MOV R0,1
BSHL R0,7 // Result = 128

@thegrb93 Just wanted to follow up, does this code have your approval or does it need further correction?

I think it's most likely good now yeah.


Changeset messages

We probably need to clarify a little more what should be written in the changeset messages and what shouldn't.

Should we say something about tokens or is this technical information that should be omitted?
Should we use "add" or "updated" when a component was tokenized?

https://github.com/swisspost/design-system/blob/main/CONTRIBUTING.md

Closing as discussed.


Parse error in if-else

Summary:
Conditional control flow constructs have strange parsing behaviour with block structure.
Description:
For an if-then-else statement, it seems that we are required to specify a block statement for the then-clause. Arbitrary statements seem disallowed.
Reproducible Steps:
Try to compile
model {
    if (1)
      print(5);
    else
      print(4);
}

Current Output:
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
Variable "else" does not exist.
error in 'stan/src/test/test-models/good/if-else-blockless.stan' at line 4, column 9
 2:     if (1)
 3:       print(5);
 4:     else
            ^
 5:       print(4);

Expected Output:
I would expect this to parse just fine.
Current Version:
v2.18.0

Yes, this should parse.  Would you mind labeling these things with a deliverable (bugs should be next release) and an assignee (@mitzimorris is handling all the current bugs for the parser while @VMatthijs  and @seantalts work on the Stan 3 parser).

Great! I already have all of these bugs I'm submitting fixed in the Stan 3 compiler. I am just submitting them to make sure that people agree they are bugs before I change the existing behaviour. I don't think it's worth anyone spending time on fixing them in the existing compiler. The new compiler should be finished in not too long. My sense is that for the moment, there are better things to spend time on than the old compiler.

On Nov 18, 2018, at 3:53 PM, Matthijs Vákár<EMAIL_ADDRESS>wrote:
Great! I already have all of these bugs I'm submitting fixed in the Stan 3 compiler. I am just submitting them to make sure that people agree they are bugs before I change the existing behaviour.

Do you still plan to try to write a spec?

I don't think it's worth anyone spending time on fixing them in the existing compiler. The new compiler should be finished in not too long.

What's "not too long"?  Do you have an expected time of completion for when it'll be ready to go out in a release in CmdStan, RStan, and PyStan?

My sense is that for the moment, there are better things to spend time on than the old compiler.

I believe bug fixes for our current releases need to remain a top priority until we have a viable replacement.

If you think it's worth writing out a spec, then I'm happy to write a document outlining what's implemented, though I'm hopeful that the implementation itself is rather readable as well, as almost all of it is written in a declarative style.
My expected timeline is as follows:

this week: get the error messages to the point that they are at least as good as those in the existing compiler
two weeks following that: get the code generation done
add to that another week to be conservative?
That would get us to the point of a complete beta version of the compiler.
Then, we'd need time to integrate it with CmdStan, RStan and PyStan. I have never worked on that code so don't know how much work it would be. Perhaps @seantalts could give an estimate?

Hi,
I have a similar error (variable "else" does not exist) with my if-else statement and was wondering if this issue is resolved?

This is still broken on develop so it'll still be broken in the pending 2.19 release.
We should fix it for 2.20 even if the OCaml parser isn't out.  We'd decided not to fix any more bugs in the existing C++ parser pending the new one coming out.  The problem is that it's taking way longer than anticipated to get the OCaml going and there's no end in sight yet.

The problem is that it's taking way longer than anticipated to get the OCaml going and there's no end in sight yet.

I think we have another month and a half left until we're over the original 6 month budget no? Something like that.

Thanks for your response.
In my model block, inside the function block, I have this:
real r1;
real r2;
if (x_i==1){
r1    = 0.2;
r2    = 0.2;
}
else if (x_i==2){
r1    = 0.2;
r2    = 0.5;
}
However, I receive the error "variable real does not exist." If I don't use the brackets above, I receive the error "variable else does not exist."
I was wondering if currently there is a fix for this? In general, can I use if-else statements in the function block that is inside the model block?
Thanks

Can you paste an entire (ideally minimal failing example) model somewhere?
I'm confused about what you mean by "function block inside the model block"
as that shouldn't work. Functions need to be defined in a separate block
outside of the model block. The temporary fix should just be to use the
braces on the else clause.
On Wed, Mar 20, 2019 at 03:00 msadeghpour<EMAIL_ADDRESS>wrote:

Thanks for your response.
In my model block, inside the function block, I have this:
real r1;
real r2;
if (x_i==1){
r1 = 0.2;
r2 = 0.2;
}
else if (x_i==2){
r1 = 0.2;
r2 = 0.5;
}
However, I receive the error "variable real does not exist." If I don't
use the brackets above, I receive the error "variable else does not exist."
I was wondering if currently there is a fix for this? In general, can I
use if-else statements in the function block that is inside the model block?
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/stan/issues/2697#issuecomment-474665337, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAxJ7G82kUhp19J5yJxw2MGMgmeywaOEks5vYaRUgaJpZM4Yn9TS
.

--
📲

The failing example is in the original issue:
model {
    if (1)
      print(5);
    else
      print(4);
}

It works if  you put braces around the bodies, but it should work this way, too.

Oh, I thought the person had a new failure. Never mind.
On Wed, Mar 20, 2019 at 8:02 PM Bob Carpenter<EMAIL_ADDRESS>wrote:

The failing example is in the original issue:
model {
if (1)
print(5);
else
print(4);
}
It works if you put braces around the bodies, but it should work this way,
too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stan-dev/stan/issues/2697#issuecomment-475005659, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAxJ7Nbk42Ut_ywC1gEmvATrQ77evtSjks5vYpPYgaJpZM4Yn9TS
.

Fixed in stanc3.


[Suggestion] adding roles to linking members

Upon linking a user (linking your discord account to your Minecraft account), Add hypixel roles (Non, VIP, VIP+ etc etc.) to the config.

Seems like a solid idea and I will look into this.
Possible implementation would be after someone links, send them a follow message asking them if they wish to sync their roles where they could maybe click a discord button which would then do all the magic.

possibly having a "config" command to change roles within the server/db

probably would just add it to constants.ts


Revive JavaScript build of the enigne + setup download at runtime

This PR:

Revives the JS extraction of the Hax engine:

was extremely slow due to poor string performance (I wrote a small helper that made parsing JSON go from one minute to instant on big JSON payloads...);

Add an option --hax-engine-path to the into command so that one can specify a path to:

a native hax engine;
a JS hax engine;
auto detect.

Make auto detect able to download from dists on the internet:

for now, this points to a place that doesn't exists.

Proposal for JS dists:

Side note: the (rust) Hax frontend defines the types, and thus sets the tone. To ensure compatibility, this PR introduces RUST_SRC_HASH, a hash that captures all the rust sources of the frontend. RUST_SRC_HASH is inlined in the frontend binary (it can be queried via cargo hax -V).
In the frontend, when "resolving" the engine, the goal is to find a binary or a JS dist built in an environment with a particular RUST_SRC_HASH.
Thus, my proposal is to upload ${RUST_SRC_HASH}.js each time a commit is pushed to main to some location we can query via HTTP. A simple thing would be github pages, with a dedicated repo.

EDIT:

the GH pages approach is a bit overkill, make weekly release instead
should RUST_SRC_HASH actually be JSON_TYPE_HASH? i.e. compute that hash thing out of the JSON type definitions?

Closing, instead, I'm going to:

open a PR for just reviving the JS compilation;
open (later) a PR for release / download of JS dists.


Support docker-compose by supporting kind of measurement session as variable

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
The test require a long time to run, supporting docker-compose will allow the test to be run unattended
Describe the solution you'd like
All options are already supported in the current .env file (at the end of it)
The only option not supported is the initial selection of the kind of measurement to run.
Making this option into a variable in the .env file will allow to run pre-configured test unattended
Describe alternatives you've considered
Detaching from the container is also possible but docker-compose will support a more "configure, run and forget" type of approach
Additional context
None

That's already possible in .env using:
SELECTED_DEVICE_TYPE=Light bulb(s)


[BUG REPORT] App crashes on pressing button to  record video (iOS 13.2)

Hey
The app is currently crashing on pressing the button to record a video on iOS13.2.
I have reproduced this crash on two phones, both on iOS13.2,  iPhone8 and an iPhone XS Max (with a completely clean OS install)
Steps to reproduce

open app
draw line
press large record button to take video
App Crashes completely and shuts

My guess is that there's a small change to the way the new OS calls for video recording or related permissions that's making it go wonky at this point.
I'd really love to get a fix - I've been using the app in creative workshops and I've been asked to re-run this at the V&A museum in early 2020. Sadly I'm not a developer or I would dive in and try and patch this myself.  I will, however, offer a fix bounty of an original drawing (pen/ink or charcoal!) to whoever fixes this. (Really!)
Related twitter thread:
https://twitter.com/mildlydiverting/status/1096050048729784322
What I've been up to with the app:
http://mixconference.org/programme/workshops/
https://www.strangelovefestival.com/2019-programme/3d-drawing

Thanks a lot for this report! We are going to take a look at this

Thank you! It would be so great to get this updated and working before February 2020. I'm serious about the drawing offer too :)

We got a fix in place, so hopefully it should be in the appstore within not too many days.

I have this same issue too! Glad I found the GitHub. Any ETA on the patch for the app?

@HalfdanJ

Sorry, I dont have a date. It is under review in the app store.

 App Store review is pretty slow


esp_eth: DP83848: correct link detection to use BMSR (IDFGH-12557)

Reading the link state via PHYSTS was incorrect, as it only reflects the link state bit from BMSR.  BMSR latches link down events, and are not cleared without being read.  (See 802.3-2008 section 2, section <IP_ADDRESS>.13) This leads to the original DP828xx code only supporting link up, then a single link down event.
Switch to reading the link state via BMSR, but continuin to read the negotiation results via PHYSTS and ANLPAR.  This is inline with LAN8720x, RTL8201, KSZ80xx phy drivers, and other opensource drivers for the DP838xx family of devices.
Tested on a private board with a DP83825i PHY[1].  No publically available boards using the original DP83848 are known of for testing.
[1] https://github.com/espressif/esp-idf/pull/13559

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Karl Palsson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

the title is already fix(esp_eth/dp83848): correct link detection to use BMSR is that not sufficient?  I already amended it to suit the guidelines, the pull request just still contains the original title.  (The JIRA issue check is just broken)

dp83848 is not a component. esp_eth is the component. Therefore, ideally should be just fix(esp_eth). I'm asking to fix it because I'm not sure if it is flagged in internal CI and so making it fail...

sha=e2945871b731b8e59ff718a9eec7962777fc6e6b


Naming and calling convention for standard "generic" tap test(s)

Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/78
Originally created by @aaronsteers on 2021-03-31 20:45:41

The following discussion from !39 should be addressed:

[ ] @DouweM started a discussion:

Can we pick a more descriptive name? Since this is part of the public interface, we'll want to support it for a long time.

View 5 previous comments from the original issue on GitLab


Install package from mygitlab, dependencies from npm

Hi, how are you?
Our node.js team has sharing some packages in private gitlab on Intranet.
I am trying reuse their packages with config:
{
  ....
  "mygitlab": {
    "version": "1.0",
    "baseurl": "https://gitlab.example.com", // access via VPN
    "auth": "hhhhhhhhhhhhhhhhaaaaaaaaaaasssssssssshhhhhhhhh",
    "handler": "jspm-git"
  }
}

The sharing packages has dependencies which specified in package.json like this:
{
  "name:": "awesome-tool",
  "main": "./index.js",
  "dependencies": {
    "bytes": "^2.3.0",
    "some-base-tool": "git+ssh://git@gitlab.example.com:30022/packages/some-base-tool.git#v0.2.x",
  }
}

Now, if I do jspm install mygitlab:packages/awesome-tool will get
     Looking up mygitlab:packages/awesome-tool
     Updating registry cache...
     Looking up mygitlab:bytes

warn Error on lookup for mygitlab:bytes, retrying (1).
     Error: fatal: Authentication failed for '/'

warn Error on lookup for mygitlab:bytes, retrying (2).
     Error: fatal: Authentication failed for '/'

warn Error on lookup for mygitlab:bytes, retrying (3).
     Error: fatal: Authentication failed for '/'

warn Error on lookup for mygitlab:bytes
     Error: fatal: Authentication failed for '/'

err  Error looking up mygitlab:bytes.

warn Installation changes not saved.

How can I make it lookup to npm?
many thanks

Hi @Pleasurazy! Just write bytes<EMAIL_ADDRESS>in your dependencies and it's going to use the npm registry for resolving this package. Btw. dependencies like git+ssh://git@gitlab.example.com:30022/packages /some-base-tool.git#v0.2.x won't work with jspm. You'd need to write it as some-base-tool<EMAIL_ADDRESS>or similar to that depending on how you configure your baseUrl of your mygitlab registry.
Probably it should look like
{
  "name:": "awesome-tool",
  "main": "./index.js",
  "dependencies": {
    "bytes": "^2.3.0",
    "some-base-tool": "git+ssh://git@gitlab.example.com:30022/packages/some-base-tool.git#v0.2.x",
  },
  jspm: {
  "dependencies": {
    "bytes": "^2.3.0",
    "some-base-tool": "git+ssh://git@gitlab.example.com:30022/packages/some-base-tool.git#v0.2.x",
  }
  }
}

hello @subesokun
actually npm:bytes and some-base-tool is not my dependency directly.
real dependency tree is:
MY_JSPM_WEB_PROJECT <= mygitlab:awesome-tool <= (npm:bytes + ssh//some-base-tool)
I just trying resolve this problem in various ways. And jspm-git looks graceful.
I try to draw a mock to describe my situation:

Thank you for your quickly replied.

OK I see. That's a bit tricky situation. If the awesome-tool package depends on native NPM functions i.e. if it requires some native NPM module then you can't use jspm-git. In that case you can install this package only via the jspm-npm. Does this awesome-tool package gets somehow provided in a private npm registry? If so you could install it via jspm-npm by setting the NPM registry globally or locally in your project via a .npmrc file. If awesome-tool tool uses only plain JS then using jspm-git is ok but you've to provide a package override configuration if that package isn't under your control, see https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm . if you need help on that please feel free to ask.

If awesome-tool tool uses only plain JS then using jspm-git is ok but you've to provide a package override configuration if that package isn't under your control

Yes, awesome-tool tool just only plain JS, therefore it can be serve to browser.
I am successful installed using -o '{"dependencies": {"bytes": "npm:bytes@^2", "debug": "npm:debug@^2", ...etc}}'
and successful installed if I can control that package:
{
  "name": "awesome-tool",
  "version": "1.0.0",
  "dependencies": {
    "bytes": "^2.3.0",
    "debug": "^2.2.0"
  },
  "jspm": {
    "dependencies": {
      "bytes"<EMAIL_ADDRESS>      "debug"<EMAIL_ADDRESS>    }
  }
}

however, that is not graceful. I will continue work for graceful solution. thank you for your support. :)

Does this awesome-tool package gets somehow provided in a private npm registry?

Not provided, since we are disallowing to publish packages to npm registry and any third party host.

A recommendation could be to host your own jspm registry and then upload your custom package override there. This way you don't have to add the jspm configuration to the original package. You can easily clone the jspm registry by cloning it into your private gitlab and then adjust your local registry to point to your cloned registry. I think gitlab is also smart enough to auto sync with the original jspm registry. See https://github.com/jspm/jspm-cli/blob/master/docs/registries.md#creating-a-private-jspm-registry

If you've more question please feel free to post them here :) Closing for now.