[WIP] feat(html): add HTML module support (html)

This PR attempts to add support for a new module type (module.type === 'html')  to support HTML 'natively', replacing the need for loaders/plugins like the html-loader/html-webpack-plugin and  adding support for using HTML as an Entrypoint and to declare Entrypoints  (JS, CSS, HTML) from within the HTML Template
entry.html
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>HTML Modules</title>

    <link href="./entry.css" rel="stylesheet" entry>

      <import src="./import.html"></import>

webpack.config.js
const config = {
  entry: {
    index: 'path/to/entry.html'
  },
  module: {
    rules: [
       {
           test: /\.html$/,
           type: 'html'
       },
       ...
    ]
  }
}

:information_source: This PR includes defaults for common module.rules, so normally it won't be necessary to specify module.rules for common cases (.html) like in the example above, it's sole purpose is to illustrate the concept, adding custom rules for e.g other templating languages (.pug etc) is of course supported aswell

TODO
Fix

[ ] Render HTML correctly

HTMLTemplate
HTMLGenerator (Dependencies)

[ ] Replace entrypoint placeholders with output URLs (Assets URLs)

needs to rerender on every change, alonside the changes files

Feature

[ ] Figure out how to treat/handle a HTML ChunkGroup/Chunk (Entrypoint)
[ ] output (webpack.config.js) Support (e.g [name].[ext])

no [hash] placeholder support (doesn't make sense)
the 'main'  entry should ideally (always) be named index (index.html)

[ ] preload  Support
[ ] prefetch Support

 (maybe)

Chore

[ ] Add Type Definitions

Test

[ ] Add tests

Will this PR resolve #536?
I'm new to webpack, but I'd like to be able to point it to a list of HTML files, and have each script/image/stylesheet in those files processed "automatically".
For example, given:
entry: "page1.html"

<!DOCTYPE html>

    <title>Example</title>

I'd like main.ts to be processed as an entry file, and for its output path to be written into the resulting HTML (by default), like:
...

...

The image would also be processed in a similar way (as well as any link/stylesheet elements, etc.).
(In my specific case, I'd probably have to block the output of the HTML itself, because I'm working with server-side HTML templates, but I assume that I could do something like this with a plugin?)
I've just started work on implementing webpack, so I'd like to know if this type of thing will be supported "soon", or if I should just use the current method of importing CSS inside JS, etc. (which I find a bit strange).

It's now possible to vote for this feature @ https://webpack.js.org/vote (HTML as entrypoint).
Note: There is currently a bug with the voting app (https://github.com/webpack-contrib/voting-app/issues/15).


Error executing Migrations

I've tried to use Serenity many times in the past but have never once gotten it work out of the box -- and still haven't. I'm using Visual Studio 2019. I'm just wondering what setup I need to have to have it work out of box.

I download Serene and start a new project with the Serene ASP.NET Core template. I press F5 to compile, it complains ASP.NET Core 2.2 SDKnot found. I go to the website to download, but it says its been deprecated.
So I follow this guide (https://github.com/volkanceylan/Serenity/issues/4801) and to upgrade my Serene ASP.NET Core 2.2 project to ASP.NET Core 3.1. Press F5, it compiles, but I hit this unresolved issue:
https://github.com/volkanceylan/Serenity/issues/4801#issuecomment-582151311
So I gave up and hunted around for ASP.NET Core 2.2 SDK. Downloaded and installed. Started a new Serene ASP.NET Core project. Pressed F5. Error on "Error executing migrations" in DataMigrations.cs.

Just curious, what version of Visual Studio/ASP.NET Core do I need to get started without running into issues? I just want to explore the functionality without hitting a compile brickwall every time. Thanks.

just install .net core 2.2 (after it works you can upgrade to 3.1 if you want) or you can use .net framework
About "Error executing migrations, try to create an empty database with db name same with your connection string and run again, it should work

If not please show more detail about your exception
My projects are using either .net framework or .net core 2.2 or .net core 3.1 with visual studio 2019

btw what is kind of database you are using, MSSQL, Oracle or MySql... ?
take a look this https://serenity.is/docs/setting-connection-dialect

And there are a lot video tutorial here:
https://github.com/volkanceylan/Serenity#video-tutorials-thanks-a-lot-to-samdubey-and-sayuga-for-these-contributions

Thanks!
I didn't specify any database because Serene was supposed to create tables in LocalDB. (I'm running VS2019/ASP.NET Core 2.2.8) I just tried it again -- my steps were literally Start New Project > SERENE (ASP.NET Core) > (install AdminLTE, etc.) OK > F5.
But it works now! (not sure why it didn't before? It was failing on migrations. I wiped out everything and started again)
I guess the golden configuration is .NET Core 2.2 SDK before installing SERENE, and things should work out of box.


Different bitrates computed using the saved file size and computed using the likelihoods from the entropy model

I'm using the EntropyBottleneck module in a factorized prior network. While training, the aux_loss and bpp_loss are decreasing but when I use the trained network to compress and save the compressed images, the bitrate computed using the saved file size is much larger than the bitrate computed using the likelihoods from the entropy model (about 2.7 bpp in comparison to 1.1 bpp).
The network architecture is below:
import torch
import torch.nn as nn
from compressai.compressai.entropy_models import EntropyBottleneck
from compressai.compressai.models import CompressionModel
from compressai.compressai.layers import GDN

class FactorizedPrior_Net1(CompressionModel):
    def __init__(self, in_channels=1, out_channels=1, layer_num=3, intermediate_channels1=128, intermediate_channels2=192):
        super().__init__()
        self.layer_num = layer_num
        N = intermediate_channels1
        M = intermediate_channels2

        Encoder_layers = []
        for i in range(self.layer_num - 2):
            Encoder_layers.append( nn.Conv2d(in_channels=N, out_channels=N, kernel_size=5, stride=2, padding=2))
            Encoder_layers.append(GDN(N))

        self.Encoder = nn.Sequential(
            nn.Conv2d(in_channels=in_channels, out_channels=N, kernel_size=5, stride=2, padding=2),
            GDN(N),
            *Encoder_layers,
            nn.Conv2d(in_channels=N, out_channels=M, kernel_size=5, stride=2, padding=2),
        )

        self.entropy_bottleneck = EntropyBottleneck(channels=M)

        Decoder_layers = []
        for i in range(self.layer_num - 2):
            Decoder_layers.append(nn.ConvTranspose2d(in_channels=N, out_channels=N, kernel_size=5, stride=2, output_padding=1, padding=2))
            Decoder_layers.append(GDN(N, inverse=True))

        self.Decoder = nn.Sequential(
            nn.ConvTranspose2d(in_channels=M, out_channels=N, kernel_size=5, stride=2, output_padding=1, padding=2),
            GDN(N, inverse=True),
            *Decoder_layers,
            nn.ConvTranspose2d(in_channels=N, out_channels=out_channels, kernel_size=5, stride=2, output_padding=1, padding=2),
        )

    def forward(self, x):
        y = self.Encoder(x)
        y_hat, y_likelihoods = self.entropy_bottleneck(y)
        x_hat = self.Decoder(y_hat)

        return {"x_hat": x_hat, "likelihoods": {'y': y_likelihoods}}

    def compress(self, x):
        y = self.Encoder(x)
        y_strings = self.entropy_bottleneck.compress(y)
        return {"EB_strings": y_strings, "EB_shape": y.size()[-2:]}

    def decompress(self, strings, shape):
        assert isinstance(strings, list) and len(strings) == 1
        y_hat = self.entropy_bottleneck.decompress(strings[0], shape)
        x_hat = self.Decoder(y_hat)
        return {"rec_image": x_hat}

This is the code for training the network:
import torch
import numpy as np
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
import os
from datetime import datetime
from tqdm import tqdm
import logging
import torch.optim.lr_scheduler as lr_scheduler
from torchvision.utils import make_grid
from pytorch_msssim import ms_ssim
from FFT_Exercise_Paper.ComplexValuedNN.SAR_Data_Compression.RV_CAE.Models import FactorizedPrior_Net1
from compressai.compressai.losses import RateDistortionLoss
from compressai.compressai.optimizers import net_aux_optimizer
from compressai.compressai.models.utils import update_registered_buffers

##### Parameters
in_channels = 1
out_channels = 1
intermediate_channels1 = 64
intermediate_channels2 = 128
net1_layers_num = 4 #should be more than 2

test_freq = 50
save_freq = 1
total_step = 0
epoch_step = 0
best_testSQNR = 1

total_epochs = 5
train_batch_size = 8
test_batch_size = 1
lr = 0.0001
aux_lr = 0.001
use_lr_scheduler = True
if use_lr_scheduler:
    lr_scheduler_step = 1
clip_max_norm = 1
loss_lmbda = 2000
distortion_metric = "mse"
pretrained = False
if pretrained:
    checkpoint_path = 'logs/2023-05-08_10_36_39/Models/Model_epoch_31.pth.tar'
device = 'cuda' if torch.cuda.is_available() else 'cpu'

description = 'Net1_Normal'
save_path = os.path.join('D:/Reza/My Python Projects/New Project/FFT_Exercise_Paper/ComplexValuedNN/SAR_Data_Compression/RV_CAE/Logs/', '{}_Layers {}_{}_{}'.format(datetime.now().strftime('%Y-%m-%d_%H_%M_%S'),intermediate_channels1, intermediate_channels2, description))
os.makedirs(os.path.join(save_path, 'Models/'), exist_ok=True)

class AverageMeter:
    """Compute running average."""

    def __init__(self):
        self.val = 0
        self.avg = 0
        self.sum = 0
        self.count = 0

    def update(self, val, n=1):
        self.val = val
        self.sum += val * n
        self.count += n
        self.avg = self.sum / self.count

def configure_optimizers(net, lr, aux_lr):
    """Separate parameters for the main optimizer and the auxiliary optimizer.
    Return two optimizers"""
    conf = {
        "net": {"type": "Adam", "lr": lr},
        "aux": {"type": "Adam", "lr": aux_lr},
    }
    optimizer = net_aux_optimizer(net, conf)
    return optimizer["net"], optimizer["aux"]

def test(net1, test_dataloader, device, criterion, distortion_metric, epoch, total_step, best_testSQNR):
    net1.eval()

    loss = AverageMeter()
    SQNR = AverageMeter()
    bpp_loss = AverageMeter()
    distortion_loss = AverageMeter()
    aux_loss = AverageMeter()

    with torch.no_grad():
        for batch_idx, batch in enumerate(test_dataloader):

            input = batch[:, :, 0, :, :].to(device)
            output = net1(input)

            out_criterion = criterion(output, input)
            SQNR_temp = torch.sum(torch.square(abs(input)))/torch.sum(torch.square(abs(input - output['x_hat'])))

            loss.update(out_criterion['loss'])
            SQNR.update(10*torch.log10(SQNR_temp))
            bpp_loss.update(out_criterion['bpp_loss'])
            if distortion_metric == 'mse':
                distortion_loss.update(out_criterion['mse_loss'])
            elif distortion_metric == 'ms_ssim':
                distortion_loss.update(out_criterion['ms_ssim_loss'])
            aux_loss.update(net1.entropy_bottleneck.loss())

            if batch_idx%1==0:
                try:
                    grid_imgs = torch.concat((grid_imgs, torch.abs(input), torch.abs(output['x_hat'])), dim=0)
                except:
                    grid_imgs = torch.concat((torch.abs(input), torch.abs(output['x_hat'])), dim=0)

        grid = make_grid(grid_imgs, nrow=4)
        logger.info("Test on test dataset: epoch-{}, step-{}".format(epoch, total_step))

        if event_writer !=None:
            logger.info("Add tensorboard for test dataset---epoch:{}-Step:{}".format(epoch, total_step))
            if distortion_metric == "mse":
                event_writer.add_scalar("Test MSE_avg", distortion_loss.avg.item(), total_step)
            elif distortion_metric == "ms_ssim":
                event_writer.add_scalar("Test MSE_avg", distortion_loss.avg.item(), total_step)
            event_writer.add_scalar("Test SQNR_avg (dB)", SQNR.avg.item(), total_step)
            event_writer.add_scalar("Test bpp_loss_avg (dB)", bpp_loss.avg.item(), total_step)
            event_writer.add_scalar("Test loss_avg (dB)", loss.avg.item(), total_step)
            event_writer.add_scalar("Test aux_loss_avg (dB)", aux_loss.avg.item(), total_step)
            event_writer.add_image('test example', grid, global_step=total_step)

    if SQNR.avg.item() > best_testSQNR:
        best_testSQNR = SQNR.avg.item()
        net1.entropy_bottleneck.update()
        ceckpoint_dict = {
            "epoch": epoch,
            "state_dict": net1.state_dict(),
            "optimizer": optimizer.state_dict(),
            "aux_optimizer": aux_optimizer.state_dict(),
        }
        torch.save(ceckpoint_dict, os.path.join(save_path, 'Models/Model_best_testSQNR.pth.tar'))
    net1.train()
    return best_testSQNR

def train(net1, train_dataloader, test_dataloader, epoch, device, criterion, optimizer, aux_optimizer, lr_scheduler, distortion_metric, train_batch_size=8, test_freq=10, total_step=0, total_epochs=50, best_testSQNR=1):
    epoch_step = 0
    net1.train()

    with tqdm(total=len(train_dataloader), desc=f'Epoch {epoch + 1}/{total_epochs}', unit='batch') as pbar:
        for batch_idx, batch in enumerate(train_dataloader):

            input = batch[:, :, 0, :, :].to(device)
            output = net1(input)

            out_criterion = criterion(output, input)

            pbar.set_postfix(**{'train loss (batch)': out_criterion['loss'].item()})

            optimizer.zero_grad()
            aux_optimizer.zero_grad()
            out_criterion['loss'].backward()
            if clip_max_norm > 0:
                torch.nn.utils.clip_grad_norm_(net1.parameters(), clip_max_norm)
            optimizer.step()

            aux_loss = net1.entropy_bottleneck.loss()
            aux_loss.backward()
            aux_optimizer.step()

            if distortion_metric == "mse":
                train_batch_sumDistorion = torch.sum(out_criterion['mse_loss'])
            elif distortion_metric == "ms_ssim":
                train_batch_sumDistorion = torch.sum(out_criterion['ms_ssim_loss'])
            train_batch_sumbpp = torch.sum(out_criterion['bpp_loss'])

            if event_writer !=None:
                logger.info("Add tensorboard for Train batch---epoch:{}-Step:{}".format(epoch, total_step))
                if distortion_metric == "mse":
                    event_writer.add_scalar("Train MSE_avg", train_batch_sumDistorion/train_batch_size, total_step)
                elif distortion_metric == "ms_ssim":
                    event_writer.add_scalar("Train MS-SSIM_avg", train_batch_sumDistorion/train_batch_size, total_step)
                event_writer.add_scalar("Train bpp_loss_avg", train_batch_sumbpp/train_batch_size, total_step)
                event_writer.add_scalar("Train lr", optimizer.param_groups[0]["lr"], total_step)

            if (total_step % test_freq) == 0:
                best_testSQNR = test(net1=net1,
                                     test_dataloader=test_dataloader,
                                     device=device,
                                     criterion=criterion,
                                     distortion_metric=distortion_metric,
                                     epoch=epoch,
                                     total_step=total_step,
                                     best_testSQNR=best_testSQNR)

            epoch_step += 1
            total_step += 1
            pbar.update(1)
        try:
            lr_scheduler.step()
        except:
            pass
    if (epoch % save_freq) == 0:
        net1.entropy_bottleneck.update()
        ceckpoint_dict = {
            "epoch": epoch,
            "state_dict": net1.state_dict(),
            "optimizer": optimizer.state_dict(),
            "aux_optimizer": aux_optimizer.state_dict(),
        }
        torch.save(ceckpoint_dict, os.path.join(save_path, 'Models/Model_epoch_{}.pth.tar'.format(epoch)))

    return total_step, best_testSQNR

logger = logging.getLogger("Real-Valued autoencoder to compress and decompress the Imaginary component SAR data with Entropy Modeling")
event_writer = SummaryWriter(os.path.join(save_path, 'tb_logs/'))
summary_text = "Compression of the Imaginary component of the SLC data\n" \
               "Parameters:\n" \
               "in_channels = {}\n" \
               "out_channels = {}\n" \
               "intermediate_channels1 = {}\n" \
               "intermediate_channels2 = {}\n" \
               "test_freq = {}\n" \
               "save_freq = {}\n" \
               "total_epochs = {}\n" \
               "train_batch_size = {}\n" \
               "test_batch_size = {}\n" \
               "lr = {}\n" \
               "aux_lr = {}\n" \
               "use_lr_scheduler = {}\n" \
               "clip_max_norm = {}\n" \
               "loss_lmbda = {}\n" \
               "distortion_metric = {}\n" \
               "pretrained = {}\n"\
    .format(in_channels, out_channels, intermediate_channels1, intermediate_channels2, test_freq, save_freq,
            total_epochs, train_batch_size, test_batch_size, lr, aux_lr, use_lr_scheduler, clip_max_norm, loss_lmbda, distortion_metric, pretrained)
event_writer.add_text("summary", summary_text)

net1 = FactorizedPrior_Net1(in_channels=1, out_channels=1, layer_num=net1_layers_num, intermediate_channels1=intermediate_channels1, intermediate_channels2=intermediate_channels2).to(device)
optimizer, aux_optimizer = configure_optimizers(net=net1, lr=lr, aux_lr=aux_lr)
if use_lr_scheduler:
    lr_scheduler = lr_scheduler.StepLR(optimizer, step_size=lr_scheduler_step, gamma=0.5)
else:
    lr_scheduler = None
criterion = RateDistortionLoss(lmbda=loss_lmbda, metric=distortion_metric)

if pretrained:  # load from previous checkpoint
    print("Loading pretrained states from checkpoint")
    checkpoint = torch.load(checkpoint_path, map_location=device)
    update_registered_buffers(net1.entropy_bottleneck, "entropy_bottleneck", ["_quantized_cdf", "_offset", "_cdf_length"], checkpoint["state_dict"])
    epoch = checkpoint["epoch"] + 1
    net1.load_state_dict(checkpoint["state_dict"])
    optimizer.load_state_dict(checkpoint["optimizer"])
    aux_optimizer.load_state_dict(checkpoint["aux_optimizer"])

dataset = np.load("D:/Reza/Data/dataset.npy")
trainset = dataset[200:]
testset = dataset[:200]
trainset = np.expand_dims(trainset, axis=1)
testset = np.expand_dims(testset, axis=1)
train_dataloader = DataLoader(dataset=trainset,
                              batch_size=train_batch_size,
                              shuffle=True,
                              pin_memory=True,
                              num_workers=0)
test_dataloader = DataLoader(dataset=testset,
                             batch_size=test_batch_size,
                             shuffle=False,
                             pin_memory=True,
                             num_workers=0)

for epoch in range(total_epochs):
    total_step, best_testSQNR = train(net1=net1,
                                      train_dataloader=train_dataloader,
                                      test_dataloader=test_dataloader,
                                      epoch=epoch,
                                      device=device,
                                      criterion=criterion,
                                      optimizer=optimizer,
                                      aux_optimizer=aux_optimizer,
                                      lr_scheduler=lr_scheduler,
                                      distortion_metric=distortion_metric,
                                      train_batch_size=train_batch_size,
                                      test_freq=test_freq,
                                      total_step=total_step,
                                      total_epochs=total_epochs,
                                      best_testSQNR=best_testSQNR)
net1.entropy_bottleneck.update()
ceckpoint_dict = {
    "epoch": epoch,
    "state_dict": net1.state_dict(),
    "optimizer": optimizer.state_dict(),
    "aux_optimizer": aux_optimizer.state_dict(),
}
torch.save(ceckpoint_dict, os.path.join(save_path, 'Models/Model_Final.pth.tar'))

The following is the code for compressing and decompressing using the trained network:
import torch
import numpy as np
import os
from FFT_Exercise_Paper.ComplexValuedNN.SAR_Data_Compression.RV_CAE.Models import FactorizedPrior_Net1
from compressai.compressai.models.utils import update_registered_buffers
import math

device = 'cuda' if torch.cuda.is_available() else 'cpu'
in_channels = 1
out_channels = 1
intermediate_channels1 = 64
intermediate_channels2 = 128
net1_layers_num = 4
bottleneck_size = (16, 16)
Checkpoint_path = "D:/Reza/My Python Projects/New Project/FFT_Exercise_Paper/ComplexValuedNN/SAR_Data_Compression/RV_CAE/Logs/2023-06-16_10_31_16_Layers 64_128_Net1_Natural_Normal/Models/Model_best_testSQNR.pth.tar"

############################################################ Compress
patch = np.real(np.load("D:/Reza/Data/test_data"))[0] #select only one patch

net1 = FactorizedPrior_Net1(in_channels=in_channels, out_channels=out_channels, layer_num=net1_layers_num, intermediate_channels1=intermediate_channels1, intermediate_channels2=intermediate_channels2).to(device)

print("Loading pretrained states from checkpoint")
checkpoint = torch.load(Checkpoint_path, map_location=device)
update_registered_buffers(net1.entropy_bottleneck, "entropy_bottleneck", ["_quantized_cdf", "_offset", "_cdf_length"], checkpoint["state_dict"])
epoch = checkpoint["epoch"] + 1
net1.load_state_dict(checkpoint["state_dict"])
net1.eval()

###### Compress and save
compressed_outp = net1.compress(torch.tensor(patch).to(device))
with open('Compressed_strings/compressed_patch.bin', 'wb') as f:
    f.write(compressed_outp["EB_strings"][0])

############################################################ Decompress
string_path = "Compressed_strings/compressed_patch.bin"

net1 = FactorizedPrior_Net1(in_channels=in_channels, out_channels=out_channels, layer_num=net1_layers_num, intermediate_channels1=intermediate_channels1, intermediate_channels2=intermediate_channels2).to(device)

print("Loading pretrained states from checkpoint")
checkpoint = torch.load(Checkpoint_path, map_location=device)
update_registered_buffers(net1.entropy_bottleneck, "entropy_bottleneck", ["_quantized_cdf", "_offset", "_cdf_length"], checkpoint["state_dict"])
epoch = checkpoint["epoch"] + 1
net1.load_state_dict(checkpoint["state_dict"])
net1.eval()

###### Load and Decompress
with open(string_path, 'rb') as f:
    string_temp = f.read()
    # Decompress the data
    decompressed_outp = net1.decompress(strings=[[string_temp]], shape=bottleneck_size)
    decompressed_patch = np.array(np.squeeze(decompressed_outp['rec_image'].cpu().detach().numpy()))

########################################################## Metrics
#compute bitrate using the saved file size
avg_bpp = (os.path.getsize('Compressed_strings/compressed_patch.bin')*8) /(256*256)

#compute bitrate using the likelihoods from the entropy model
def compute_bpp(out_net):
    size = out_net['x_hat'].size()
    num_pixels = size[0] * size[2] * size[3]
    return sum(torch.log(likelihoods).sum() / (-math.log(2) * num_pixels)
              for likelihoods in out_net['likelihoods'].values()).item()
outp = net1.forward(torch.tensor(patch).to(device))
print(f'Bit-rate: {compute_bpp(outp):.3f} bpp')

Is there any mistake that I'm making while training or saving the network?

the bitrate computed using the saved file size is much larger than the bitrate computed using the likelihoods from the entropy model (about 2.7 bpp in comparison to 1.1 bpp).

Did you run model.update(force=True) after training, but before encoding/decoding the images? This is done for you automatically as of CompressAI v1.2.3, but earlier versions definitely will need a manual update.

Thank you @YodaEmbedding for the answer.
I have CompressAI v1.2.4, however,  I am still running net1.entropy_bottleneck.update() before saving the trained network, won't it do the model.update(force=True).
When I run aux_loss = net1.aux_loss() the output is int type and cannot apply backward on it. That's why I am doing  aux_loss = net1.entropy_bottleneck.loss() instead.
When I plot the distributions of the entropy model, I get the below figure, which I'm not sure how to interpret

Looks unusual. Usually, most channels are "empty" with sharp peaks between 0.8--1.0, with only a few high-variance channels.
I noticed that you're using a very large lambda value. Try something smaller, e.g. 0.067. (Which corresponds to $≈ 4300 / 255^2$.) For example, see here for the lambda values of the CompressAI pretrained models: https://interdigitalinc.github.io/CompressAI/zoo.html#training
This doesn't explain the reason for the mismatch per se, but it may help.

I tried 0.067 as the lambda value for training. After 4 epochs, the aux_loss reaches <1 and all the likelihoods are 1, so the computed bpp from the likelihoods is 0 for all of the test samples.

I'm not sure why that could be happening. Was the code for RateDistortionLoss modified?
It might be worthwhile to try running net1.update(force=True) after net1.load_state_dict. Also, confirm that your net1.entropy_bottleneck.quantiles are all >10, as the plot you posted indicates.

Thank you @YodaEmbedding for the help.
I used net1.entropy_bottleneck.update(force=True) after net1.load_state_dict() and now the computed bpps are much closer (about 0.3 bpp difference). Is this difference normal?

It's good to see that they're getting closer. However, the differences are usually very small, e.g. 0.0001bpp. Is that the only EntropyBottleneck / GaussianConditional used by your model?
Also, try adding this line immediately before update():
_update_quantiles(net1.entropy_bottleneck)
net1.entropy_bottleneck.update(force=True)

where:
@torch.no_grad()
def _update_quantiles(self):
    device = self.quantiles.device
    shape = (self.channels, 1, 1)
    low = torch.full(shape, -1e9, device=device)
    high = torch.full(shape, 1e9, device=device)

    def f(y, self=self):
        return self._logits_cumulative(y, stop_gradient=True)

    for i in range(len(self.target)):
        q_i = _search_target(f, self.target[i], low, high)
        self.quantiles[:, :, i] = q_i[:, :, 0]

def _search_target(f, target, low, high):
    assert (low <= high).all()
    assert ((f(low) <= target) & (target <= f(high))).all()
    while not torch.isclose(low, high).all():
        mid = (low + high) / 2
        f_mid = f(mid)
        low = torch.where(f_mid <= target, mid, low)
        high = torch.where(f_mid >= target, mid, high)
    return (low + high) / 2

Your training loop should have brought aux_loss low, but in case it didn't, the above code will reduce it to nearly 0.

I added the suggested lines before net1.entropy_bottleneck.update(force=True) while testing the trained network but it didn't change the performance. The printed output is as following.
(tensor(-50.2349, device='cuda:0', grad_fn=<MinBackward1>), tensor(50.0519, device='cuda:0', grad_fn=<MaxBackward1>))
I have only one EntropyBottleneck in the network but I'm using it to encode two different (highly correlated) feature maps, simultaneously.
I faced another issue as well, when I don't normalize the input data (for one of my applications I cannot normalize) while training, the aux_loss and bpp_loss decrease for a few thousand steps but then start increasing exponentially. I read #148 but still cannot figure out the problem.

Here is the aux_loss and bpp_loss for not-normalized data with different lambda values (This problem does not occur with normalized data).
The first figure is the aux_loss and the second one is the bpp_loss:

However, the aux_loss and bpp_loss don't start increasing at the same step. The bpp_loss starts increasing around step 2500, while the aux_loss keeps decreasing for a while and starts increasing around step 3500.
When I keep on the training, the bpp_loss increases to a point that the final compressed file is larger that the input file (As you can see in the figure, more than 9 bpp for a 8-bit input image)!!! Although the distortion loss (MSE) decreases reasonably and the quality of the reconstructed image is high.

@Reza-Asiyabi did you ever figure this out?


account/identity flow

Looks like we'll need a change conflict resolution, and we have a couple comments to address.


Fixes Issue #34: SVUNIT_CLK_GEN macro causes testcase to end early or hang

Note that I added some methods into the svunit_testcase class to get this to work.  Since the svunit_testcase class seems to handle both testcases and individual tests, I ended up adding testcase related functions such as start_testcase() and stop_testcase() into the svunit_testcase class.  These new methods allow the SVUNIT_CLK_GEN macro to generate a clock that runs for the entire time the testcase (and all of the tests it contains) are active.
Unfortunately this meant that the original start() and stop() methods now had an ambiguous name.  In order to make things more clear, I renamed the original start() and stop() methods to start_test() and stop_test().  Hopefully this renaming is ok with you.  If not, then I would be happy to change them back or rename them to something else.

did you happen to run the regression in the test dir? I don't have a vcs license so it'd be handy if you can give me a thumbs up that everything passes... uh... except for maybe 1 test which I can't remember...

cd test
./run

I tried running the regression on my patch and there were a handful of failures.  I haven't had the time to debug the failures, but I also have other patches in my local copy that may be contributing to them.  However, I can say it is working properly in real world environment.


How to compute xt+ in equation 7?

Thanks for your great work! I get confused about xt+ in equation 7.

It should be computed in GenPercept way as follows,

or it should be computed in DDPM way?

By the way, how do you choose xt+ in YOSO training, rand in (0,T) or fix to 401?

We adopt the xt parameterization, which means that conditioned on both gaussian noise ε  and timestamp t, we finetune the latent diffusion model to directly regress xt. During YOSO training, we randomly sample t from the interval (0,T), where T=1000. This formulation allows YOSO to handle a more general case than GenPercept, with GenPercept being a special case when t=0.

Thanks a lot!


chore: added .phpunit.result.cache to gitignore

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


fix link in readme

thanks for making this package :)

Oops indeed, thanks for the PR and the nice message :)


perf(semantic): simplify logic in enter_scope + leave_scope

SemanticBuilder::enter_scope contained multiple checks purely to handle when called for Program scope (where scope has no parent). This is a very uncommon case as Program is visited only once, but these checks run for every scope.
So don't call enter_scope from visit_program, and inline the special logic for root scope there instead, to simplify enter_scope.
A branch in leave_scope also gets more predictable (always taken).

#4383  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on  Graphite

I ran the benchmarks several times and perf impact was inconclusive - too much noise in the bench results. But this should be a little faster.


Mac with M1 Chip support

Hi, would you support this package on Mac with M1 chips? thanks

Hello ~ I haven't tested it on Mac since I'm not very familiar with M1 structure as well, but I'll check it out in the future to see if a mac compatible version can be made ;)

Yes this would be awesome, it looks like the code isn't targeting 'mps' for apple silicon.


Unable to connect Elastic Search

My actions before raising this issue

[X] Read/searched the docs
[X] Searched past issues

Expected Behaviour
Seamless Elastic Search connection
Current Behaviour
Following is docker logs
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:36Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:36Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:40Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:40Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:47Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:48Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}

Possible Solution

Not sure about the solution but I think elasticsearch.url: http://elasticsearch:9200 in kibana.yml maybe we need to change this to hosting machine IP
i.e for local machine IP will start with 192.168.X.X and for AWS Instance External IP should do the job
Steps to Reproduce (for bugs)

Clone CVAT and change branch to develop
Get into chat Folder
docker-compose -f docker-compose.yml -f components/openvino/docker-compose.openvino.yml -f components/analytics/docker-compose.analytics.yml -f components/tf_annotation/docker-compose.tf_annotation.yml -f components/openvino/docker-compose.openvino.yml -f cvat/apps/dextr_segmentation/docker-compose.dextr.yml up

Context

Your Environment

Git hash commit (git log -1): 1b93d6edfb7526b3c1f599435bbc2f961ff4ccef
Docker version docker version (e.g. Docker 17.0.05): v19.03.8
Are you using Docker Swarm or Kubernetes? Kubernetes
Operating System and version (e.g. Linux, Windows, MacOS):MacOS
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs:
cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:00Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}

cvat_kibana           | {"type":"log","@timestamp":"2020-05-12T09:40:00Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}

@nmanovic

@gururajdori Hi, could you attach logs from the elastic docker logs cvat_elasticsearch?

@azhavoro Hello, below log for cvat_elasticsearch container
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2020-05-12T20:44:38,512][INFO ][o.e.n.Node               ] [] initializing ...
[2020-05-12T20:44:40,200][INFO ][o.e.e.NodeEnvironment    ] [AKM3ogp] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/vda1)]], net usable_space [18.5gb], net total_space [58.4gb], types [ext4]
[2020-05-12T20:44:40,217][INFO ][o.e.e.NodeEnvironment    ] [AKM3ogp] heap size [1007.3mb], compressed ordinary object pointers [true]
[2020-05-12T20:44:40,274][INFO ][o.e.n.Node               ] [AKM3ogp] node name derived from node ID [AKM3ogpOSpO75KuXauhTXg]; set [node.name] to override
[2020-05-12T20:44:40,275][INFO ][o.e.n.Node               ] [AKM3ogp] version[6.4.0], pid[1], build[oss/tar/595516e/2018-08-17T23:18:47.308994Z], OS[Linux/4.19.76-linuxkit/amd64], JVM["Oracle Corporation"/OpenJDK 64-Bit Server VM/10.0.2/10.0.2+13]
[2020-05-12T20:44:40,277][INFO ][o.e.n.Node               ] [AKM3ogp] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.Ho72kffJ, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.cgroups.hierarchy.override=/, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=oss, -Des.distribution.type=tar]

I cannot reproduce this issue with docker-compose and suppose it's related with Kubernetes deployment

@azhavoro Hello, Can you put git head to 1b93d6edfb7526b3c1f599435bbc2f961ff4ccef commit id and try?
I stopped the Kubernetes cluster and tried but still facing the same issue

This also happens in my ec2 deployment (not Kubernetes).
I'm using latest release (https://github.com/openvinotoolkit/cvat/commit/8eb7c13619e39d9546ba3807027d30eab9c5ce2b) and Docker 19.03.12.
Attached are elastic and kibana logs.
elastic.log
kibana.log

@ilouzl
In the logs I see that elastic and kibana were stared sucessfully
[2020-10-11T13:58:31,477][INFO ][o.e.c.r.a.AllocationService] [uGhlyAT] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.kibana][0]] ...]).
{"type":"log","@timestamp":"2020-10-11T13:58:30Z","tags":["status","plugin:elasticsearch@6.4.0","info"],"pid":1,"state":"green","message":"Status changed from red to green - Ready","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200/."}

So, could you please provide more information about your issue: logs from the cvat server (docker logs cvat> cvat.log)? What do you see in the browser when you open the analytics tab, are there any errors?

@azhavoro
It was started successfully but in kibana logs there are several connection errors with es:
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["error","elasticsearch","admin"],"pid":1,"message":"Request error, retrying\nHEAD http://elasticsearch:9200/ => connect ECONNREFUSED <IP_ADDRESS>:9200"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["status","plugin:elasticsearch@6.4.0","error"],"pid":1,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch:9200/.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}

What happens is that the Analytics tab is stuck with the 'Loading Kibana' animation and Kibana UI won't load.
Attached are new error logs (just logging in and selecting Analytics tab).
kibana.log
cvat.log
es.log
Also in Chrome console I get this error:
vendors.bundle.js:1 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' http: https: data: blob: 'unsafe-inline'".

    at Function (<anonymous>)
    at vendors.bundle.js:1
    at vendors.bundle.js:1
    at vendors.bundle.js:1
    at Function.template (vendors.bundle.js:1)
    at commons.bundle.js:1
    at Object.show (commons.bundle.js:1)
    at fatalError (commons.bundle.js:1)
    at window.onerror (commons.bundle.js:1)

@azhavoro
It was started successfully but in kibana logs there are several connection errors with es:
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["error","elasticsearch","admin"],"pid":1,"message":"Request error, retrying\nHEAD http://elasticsearch:9200/ => connect ECONNREFUSED <IP_ADDRESS>:9200"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
{"type":"log","@timestamp":"2020-10-11T13:58:10Z","tags":["status","plugin:elasticsearch@6.4.0","error"],"pid":1,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch:9200/.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}

I think it's a normal behavior Elastic needs some times to start and be ready to accept connections.
Regarding Kibana error: do you use any reverse proxy?

I'm using Cloudflare dns if that's what you're asking

I think this might be the cause of this issue https://github.com/elastic/kibana/issues/76630 and we cannot fix it on CVAT side.

@azhavoro
In order to verify your diagnosis, I tried accessing CVAT using the explicit IP address of my ec2 (without passing through Cloudflare DNS) and the error was still there.
As a sanity check, I've deployed a simlar CVAT instance (on a new machine), this time without HTTPS serving, and then Kibana loads perfect.
Maybe it's indeed something with HTTP serving?

@ilouzl According the mentioned issue the specific values of the CSP headers cause this error. This header doesn't related with https. On the cvat side we don't set or override this header, also Kibana works fine for cvat.org or our internal instance over https.
How do you setup https for you instance? Could you check the response headers with curl curl -u "user:pass" -I -L https://CVAT_URL/analytics/app/kibana?

Thanks, This is the response:
HTTP/2 301
date: Thu, 15 Oct 2020 09:10:43 GMT
content-type: text/html; charset=utf-8
set-cookie: __cfduid=d4e0022ba6170fa783241d51da8e89ef11602753043; expires=Sat, 14-Nov-20 09:10:43 GMT; path=/; domain=.tapwithus.com; HttpOnly; SameSite=Lax
location: /login
x-frame-options: SAMEORIGIN
vary: Origin,Cookie
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'self' http: https: data: blob: 'unsafe-inline'
strict-transport-security: max-age=31536000; includeSubDomains; preload
cf-cache-status: DYNAMIC
cf-request-id: 05cd1fb453000009879d224000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=16&lkg-time=1602753044"}],"group":"cf-nel","max_age":604800}
nel: {"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 5e28689a1f5b0987-IAD

HTTP/2 200
date: Thu, 15 Oct 2020 09:10:43 GMT
content-type: text/html
set-cookie: __cfduid=d4e0022ba6170fa783241d51da8e89ef11602753043; expires=Sat, 14-Nov-20 09:10:43 GMT; path=/; domain=.tapwithus.com; HttpOnly; SameSite=Lax
last-modified: Mon, 21 Sep 2020 08:29:49 GMT
accept-ranges: bytes
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'self' http: https: data: blob: 'unsafe-inline'
strict-transport-security: max-age=31536000; includeSubDomains; preload
cf-cache-status: DYNAMIC
cf-request-id: 05cd1fb480000009876305e000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=16&lkg-time=1602753044"}],"group":"cf-nel","max_age":604800}
nel: {"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 5e28689a6f9b0987-IAD

@ilouzl Hi, did you resolve this issue?

Unfortunately not

could you try curl command (I mean curl -u "user:pass" -I -L https://IP/analytics/app/kibana) with public IP of you instance ? What is the output?

On the cvat side we don't set or override this header, also Kibana works fine for cvat.org or our internal instance over https.

Isn't analytics disabled on the demo server?

@azhavoro @ilouzl
I am not sure the issue is still relevant, so, I will close it. If somebody still has questions or ideas, please reopen and share


Allow Admin to set node selectors

Story
No response
Description
Currently node selectors are hard coded to role=management and role=projects this means that any cluster requires at least 2 nodes and they must be suitably labelled.
This should be configurable to allow for single node testing and for other node topologies.

What's the user story this enables?

As a K8s System Administrator
I want to decide which nodes in my cluster the FlowForge Application and Projects run on
So that I can provision the right capacity to meet demand
Currently the helm chart and kubernetes driver assume that there are at least 2 nodes in the cluster. One tagged with role=managment and one or more with role=projects.
The FlowForge app will run on the node tagged role=management and the projects will run on the nodes tagged role=projects
This currenty requires a cluster to have at least 2 nodes. For small scale testing this is a problem but it also enforces constraints on the admin that are not required, but are a choice I made early on. Allowing these to be configured allows much greater flexibility.


Convert to WebExtension

With Firefox 57 releasing in November, all other types of extensions will be deprecated:https://blog.mozilla.org/addons/2017/02/16/the-road-to-firefox-57-compatibility-milestones/

Hi, thanks for reporting this. But currently I don't have enough time to port that extension right now. Sorry about that.


🐛 The file store doesn't update after a command is run anymore

Describe the bug
We (or i should say I) probabòy broke either the listener for file changes or the reload of the file tree into the store after a command has been run. This is very important and we should fix this asap.
Reproduction

go to https://sveltelab.dev
type some command that should update the file tree inside the terminal like npx tailwindcss init
nothing changes in the file tree

Expected behavior
After a command has been run the file tree should be updated
Screenshots
No response
Additional context
It could be three things imho

i broke something while integrating svelte-check (and changing the way the callback for when a command is finished works)
i broke something while integrating svelte-check (and chokidar no longer starts)
the fact that stackblitz now uses npm instead of turbo broke chokidar (this should be an easy check and now that i think about it it could very well be it)

In the end it was StackBlitz fault lol


Check Kotlin version

Check if used Kotlin version matches the bundled one.
TODO:

[ ] cover with integration tests
[ ] extend docs with explanation about compileKotlin.kotlinOptions.apiVersion
[ ] make the IDE-Kotlin versions map from docs available as a JSON list – In the intellij-sdk-docs repository
[ ] fetch above list automatically in the Gradle IntelliJ Plugin

I'd rather scan the Kotlin stdlib from the actual target platform bundled library binary. it's safer, will automatically support newer target IDE versions, and also requires no internet.
also this probably needs buildFeature flag


Proper branch name

@basarat Please create branch release and set it as default in settings.

Also create branch dev for 'hot' development


Synchronous_mode gets stuck in RL training

@nsubiron
I use synchronous mode and fixed timestamp mode to train RL model, with the server running at 20 FPS. I use world.tick() and world.wait_for_tick() to send the tick information as fast as possible, hoping that the simulation can speed up. At first, this method really goes well. But after several episodes, the simulation get stuck and show the following warning:

RuntimeError: time-out of 10000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2000

Similar issues can be found at #1803, #2038 and #1994
https://github.com/carla-simulator/carla/pull/1803#issuecomment-526430034
It can be caused by, for example, the tick arrives before we start waiting for it and we end up having a dead-lock. We can solve this by stop wait for the tick and newly start another tick to reconnect the client and server. But in my knowledge the world.wait_for_tick() method can't support this kind of solution. How can I fix the problem?
Carla 0.9.5 windows10, python 3.7, GTX960M

I also tried on the carla 0.9.8 windows version. Using 'world.tick()' to replace older version 'world.tick()+world.wait_for_tick()', the same error occurs.


fix getting setting

The dict get would get NoneType thus cause https://github.com/ExplodingCabbage/sublime-gitignorer/issues/19 .

@ExplodingCabbage, why you not review this pull-request? It's fixed problems on my Windows. Thanks.

I'm not sure how people are hitting the case that this would fix, since as far as I can see this would only ever come into play if they explicitly had nulls set in their preferences. But since that case at least is possible, I guess I'll merge this.

Sorry for taking a while to get round to this, by the way. I completely forgot it was open.


Rework tests.

Create separate tests for nursery.
Move gluonts/mx related tests to test/mx.
Upgrade pip in all test-runners.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

E           RuntimeError: Inference tensors cannot be saved for backward. To work around you can make a clone to get a normal tensor and use it in autograd.

@kashif Is that related to your changes?

@jaheba no not that i can think...

@jaheba  perhaps set the lightning module as soon as you instantiate the model:
    model = DeepARModel(
        freq="1H",
        context_length=context_length,
        prediction_length=prediction_length,
        num_feat_dynamic_real=num_feat_dynamic_real,
        num_feat_static_real=num_feat_static_real,
        num_feat_static_cat=num_feat_static_cat,
        cardinality=cardinality,
    )

    lightning_module = DeepARLightningModule(model=model)

and then its good...

Any idea why this only fails in 3.8?
/cc @borchero

@jaheba is the behavior of deepcopy different in 3.8 vs 3.7 etc?

@jaheba no clue, this is weird. Maybe replace with torch.inference_mode() with with torch.no_grad() for the moment, that should solve the problem. PyTorch Lightning also hasn't transitioned to inference_mode yet (see https://github.com/PyTorchLightning/pytorch-lightning/pull/9443).

@borchero Thanks, looks good now!


feat: add calculate median

#114 which is a superset of this, has been merged. Closing this pr.

For the future, such "superset" PRs should maybe include a "closes ..." in their description so this happens automatically.


Fix envvar descriptions

Description
Some envvars need a description update to harmonise them with descriptions used in other locations.
Only a view got an additional text for improved clarification.
Needs backporting to 2.0.0 (@kobergj
Related Issue

Fixes: #5482

Motivation and Context
Came up during the work on documenting "search"
How Has This Been Tested?
Text fixes only
Screenshots (if appropriate):
Types of changes

[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 change)
[ ] Technical debt
[ ] Tests only (no source changes)

Checklist:

[ ] Code changes
[ ] Unit tests added
[ ] Acceptance tests added
[ ] Documentation ticket raised:

CI reports: Error response from daemon: No such image: owncloudci/php:7.4...?

:boom: Acceptance test localApiTests-apiGraph-ocis failed. Further test are cancelled...


Replace CocoaPods with Carthage

Replaces CocoaPods with Carthage (closes #821)

Turns ASIHTTPRequest into a framework (ViennaRSS/ASIHTTPRequest)
Adds MMTabBarView (ViennaRSS/MMTabBarView) to Carthage (closes #1123)
Removes the Xcode workspace

This is the final PR. I will rebase this on #1087 after that one is merged.

Perhaps relevant: https://github.com/MiMo42/MMTabBarView/releases/tag/1.4.0


Change setup to build both dev extensions

I believe it makes more sense for the setup command to build all the development extensions. This approach should simplify the process for anyone setting up the repository, as it would have for me.

I agree with the change, but FYI, if you claim you had trouble with setup, you didn't see my message about running mise run setup, because that script already builds both (but yes, not properly documented yet)

@naps62 I did manage to get that to work after some weird issues where mise was conflicting with asdf. The issue is that on the setup task you are building  the production extensions, not the dev ones, that listen on a different port. So yeah, now that I think about it, that can be an issue too.


slugbuilder: Bump buildpacks

Big news is that the Ruby buildpack now uses Bundler 1.9. Also, new PHP versions and GDAL for Python.
https://github.com/heroku/heroku-buildpack-ruby/compare/d2d08e2b...4b493f80
https://github.com/heroku/heroku-buildpack-python/compare/3ea07357...7fd3a047
https://github.com/heroku/heroku-buildpack-scala/compare/230cbfa3...9e8907d5
https://github.com/heroku/heroku-buildpack-php/compare/8da6b92a...04a7e4f8

LGTM


ADB needs to support interpreter mode flags

ADB needs to support interpreter mode flags
if flags['--adb']:
        db = adb.ADB()
        db.run(input_file) # need to pass mode flags to interpreter
        sys.exit(0)

This is also true for the embedded call to the repl.
See the following code snippet for ideas,
        repl(redundancy=flags['-r'],
             prologue=flags['-p'],
             functional_mode=flags['-F'])

To be clear, which ones are we looking to support?
functional_mode, prologue, and redundancy seem obvious. What would we want exceptions to do here? Similarly with symtab_dump? I imagine we don't want to support do_walk=False.
It seems to make sense that we just keep the runtime affecting flags. Meaning prologue, functional_mode, exceptions, and redundancy. I could also see the case for tree_dump but do_walk=False I don't feel makes any sense.

After some tinkering, exceptions could probably just work like an extended error message. Sort of like how you would expect it to work in the normal interpreter.
Here's a truncated example of what I mean:
ERROR: /home/oliver/test.ast: 7: 'A' is not defined
Traceback (most recent call last):
  File "/home/oliver/dev/asteroid/asteroid/adb/adb.py", line 193, in run
    interp(input_stream,
  ...
  ...
  ...
  File "/home/oliver/dev/asteroid/asteroid/symtab.py", line 77, in lookup_sym
    raise ValueError("'{}' is not defined".format(sym))
ValueError: 'A' is not defined

    ==>> let *p = B(1,2).

To be clear, which ones are we looking to support?
functional_mode, prologue, and redundancy seem obvious. What would we want exceptions to do here? Similarly with symtab_dump? I imagine we don't want to support do_walk=False.
It seems to make sense that we just keep the runtime affecting flags. Meaning prologue, functional_mode, exceptions, and redundancy. I could also see the case for tree_dump but do_walk=False I don't feel makes any sense.

Please take a look at the repl implementation in the interpreter.  I would expect those three flags to be supported.

Ahh alright. Sure. I’ll just mirror that.
On Tue, Aug 30, 2022 at 12:09 PM Lutz Hamel @.***>
wrote:

To be clear, which ones are we looking to support?
functional_mode, prologue, and redundancy seem obvious. What would we
want exceptions to do here? Similarly with symtab_dump? I imagine we
don't want to support do_walk=False.
It seems to make sense that we just keep the runtime affecting flags.
Meaning prologue, functional_mode, exceptions, and redundancy. I could
also see the case for tree_dump but do_walk=False I don't feel makes any
sense.
Please take a look at the repl implementation in the interpreter. I would
expect those three flags to be supported.
—
Reply to this email directly, view it on GitHub
https://github.com/asteroid-lang/asteroid/issues/194#issuecomment-1231876286,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIVRVS6LOU7YZ63IIPIFPZDV3YW43ANCNFSM6AAAAAAQANNYRA
.
You are receiving this because you were assigned.Message ID:
@.***>

After some tinkering, exceptions could probably just work like an extended error message. Sort of like how you would expect it to work in the normal interpreter.
Here's a truncated example of what I mean:
ERROR: /home/oliver/test.ast: 7: 'A' is not defined
Traceback (most recent call last):
  File "/home/oliver/dev/asteroid/asteroid/adb/adb.py", line 193, in run
    interp(input_stream,
  ...
  ...
  ...
  File "/home/oliver/dev/asteroid/asteroid/symtab.py", line 77, in lookup_sym
    raise ValueError("'{}' is not defined".format(sym))
ValueError: 'A' is not defined

    ==>> let *p = B(1,2).

Hmmm, you folded a different discussion into this bug report.  In any case.  Just try the interpreter and see what it does: it will trap the exceptions and will not show you Python stuff but if you enable -e then it will show you the whole ugly truth.
By default Asteroid should never expose Python level stuff.

👍
On Tue, Aug 30, 2022 at 12:11 PM Oliver Wendell McLaughlin <
@.***> wrote:

Ahh alright. Sure. I’ll just mirror that.
On Tue, Aug 30, 2022 at 12:09 PM Lutz Hamel @.***>
wrote:

To be clear, which ones are we looking to support?
functional_mode, prologue, and redundancy seem obvious. What would we
want exceptions to do here? Similarly with symtab_dump? I imagine we
don't want to support do_walk=False.
It seems to make sense that we just keep the runtime affecting flags.
Meaning prologue, functional_mode, exceptions, and redundancy. I could
also see the case for tree_dump but do_walk=False I don't feel makes any
sense.
Please take a look at the repl implementation in the interpreter. I would
expect those three flags to be supported.
—
Reply to this email directly, view it on GitHub
<
https://github.com/asteroid-lang/asteroid/issues/194#issuecomment-1231876286
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AIVRVS6LOU7YZ63IIPIFPZDV3YW43ANCNFSM6AAAAAAQANNYRA
.
You are receiving this because you were assigned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/asteroid-lang/asteroid/issues/194#issuecomment-1231877802,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADXERTYBUUOOIP4SG57NLGLV3YXB5ANCNFSM6AAAAAAQANNYRA
.
You are receiving this because you authored the thread.Message ID:
@.***>

This is fixed and part of the new PR


Do not overwrite service environment variable if value is empty

This PR makes it possible to set environment variables outside of kontena.yml. User just have to document environment variable keys in kontena.yml and use cli to set the actual values.
kontena.yml: (inside folder named "demo")
app:
  image: registry.kontena.local/demo-app:latest
  environment:
    - MY_VAR
    - OTHER_VAR

cli:
$ kontena service add-env demo-app MY_VAR=foo
$ kontena service add-env demo-app OTHER_VAR=bar

Fixes #614

LGTM!


feat: improved v35 performance

For v35, I did a faster parsing of uuid value. This greatly affected the performance.
When parsing a value, it is also validated.
But the bundle size is slightly exceeded…
t’s up to you to decide if this performance increase (and uuid validation) is worth increasing build size.
(Your current solution does not validate uuid strings)
Benchmark master:
uuidv1() x 1,644,613 ops/sec ±1.21% (91 runs sampled)
uuidv1() fill existing array x 7,209,045 ops/sec ±0.82% (91 runs sampled)
uuidv4() x 432,989 ops/sec ±0.91% (92 runs sampled)
uuidv4() fill existing array x 454,731 ops/sec ±0.74% (93 runs sampled)
uuidv3() x 137,231 ops/sec ±0.78% (86 runs sampled)
uuidv5() x 135,756 ops/sec ±1.27% (85 runs sampled)

Benchmark this branch:
uuidv1() x 1,645,002 ops/sec ±1.09% (89 runs sampled)
uuidv1() fill existing array x 7,294,826 ops/sec ±0.82% (92 runs sampled)
uuidv4() x 457,979 ops/sec ±0.76% (90 runs sampled)
uuidv4() fill existing array x 466,131 ops/sec ±0.76% (91 runs sampled)
uuidv3() x 253,029 ops/sec ±1.01% (83 runs sampled)
uuidv5() x 254,426 ops/sec ±1.22% (84 runs sampled)

Bundlewatch result: https://ja2r7.app.goo.gl/R7EhcSrDJemj7yhk6
Please read PR description ^

I completed the validation using the sample from UUID class.
This of course increased the size of the module. But not more than 1 Kb (for complete bundle). Why do you have such strict limits? )
It’s a little strange that you care so much about the size of your module’s bundle. Since it includes a little-used v35.
It would be logical to publish versions separately (v1, v4, v35): @uuid/v1, @uuid/v4, @uuid/v35.
Of course you understand that the new functionality requires more code (and larger size of bundle).

Sorry, I think there may have been a misunderstanding.  I wasn't suggesting that we add the UUID class' code to this PR. Rather, I was simply using that as an example of where we might leverage your code if/when we decided to add support for a parse/validate feature.  Historically, however, we've shied away that (too small an audience, already addressed in other modules).

@broofa now it’s clear ... then I will try to make the fastest parsing of the UUID that will fit into the limits you set.

@awwit I believe there might still be a misinterpretation: with regards to UUID parsing we‘re really not concerned about bundle size! We‘re more concerned about the feature and API scope of this library! This library is used by millions of projects in the node.js ecosystem to generate UUIDs. If you look at how widespread UUID parser libraries on npm are you will notice that this is an almost negligible fraction compared to the usage of this library.
Hence, we are reluctant of adding little-used features in here that would probably be better off in a separate, special purpose npm module. I think we would be happy to host such an effort in the uuidjs GitHub organization, but for the time being not in this module itself.
And regarding bundlesize: since we moved to ES modules this library supports treeshaking. So people will only get those algorithms in their frontend bundle that they actually use. For Node.js bundle size is not a concern, hence no need to publish separate npm modules.

@ctavan good =) then which option will suit you?
In this PR, initially I did only a quick parsing of the UUID and checking for string validation by template 00000000-0000-0000-0000-000000000000. To match the exception "namespace must be uuid string or an Array of 16 byte values"
It seemed correct to me to correspond to the description of the exception. =)

Closing, with apologies in advance if that comes across as rude.  That is not my intent.  To recap the reasons for this:

The increased code complexity is not warranted.  It doesn't offer enough benefit to the existing uuid audience (mainly because this only affects ~1% of users that use v3/v5 uuids).
High performance parsing will be more interesting if/when it is exposed as part of a module's public API.
Currently we (uuidjs org) don't have plans for that.  If that changes, we should consider using this implementation.

Thanks!


how to train?

hello,
how to train?
when I run python train_loop.py:
import fastreid.utils.comm import comm
ModuleNotFoundError: No module named `fastreid`

check here
https://github.com/JDAI-CV/fast-reid/blob/master/GETTING_STARTED.md#training--evaluation-in-command-line

check here
https://github.com/JDAI-CV/fast-reid/blob/master/GETTING_STARTED.md#training--evaluation-in-command-line

thanks，when I use 2gpus train Market bagtricks-Res50 model, rank1=80%+.  How to set the gpu nums?


change package pycurl to option.

tornado builtin http client doesn't support proxy. Should change the test cases to test both two type of clients, and add notice for user.

You still didn't test client == 'simple'.


bottom sheet dismiss by it self

hey , thanks for the great library . I'm facing an issue which is : if I start new activity from fragment which is inside bottomsheet layout and finish it ,when the fragment containing my bottom sheet resumes the bottom sheet is dismissing by it self . I want it to still be visible . Is there any solution for that poroblem ?

Can you share a code snippet? Hard for anyone to debug this based on description alone

I am also facing the same issue.

It's really a great library When the bottomsheet is Showing, I lock the screen,and the bottomsheet with Fragment will dismiss.So I can't see it when I unlock screen. How can I solve this?


Dream page2

Description
Finished dream page with styling
Checklist

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas

Staging Link


license: add github workflow for header check

@yuanbohan There are lots of clippy warnings, could you please fix it in another PR? We might need to suppress the warnings if they come from the generated codes.

@yuanbohan There are lots of clippy warnings, could you please fix it in another PR? We might need to suppress the warnings if they come from the generated codes.

:ok_hand:


Add $or operator

$or operator would allow OR conditions

Now is there any way to search for multiple fields using one input field? For example: search by the name of an automobile part or its name, using only one input field.

@ajkyru not yet implemented, but will be

@ajkyru temporary solution could be to expose a getter function that returns value of both fields and then filter by that value. You can find an example at the end of the demo page https://vadimdez.github.io/ng2-filter-pipe


Port #18878 to v3

http://jsbin.com/jipecazaqu/edit?html,css,output

Bootstrap 3 is no longer being officially developed or supported.
All work has moved onto our next major release, v4. As such, this issue or pull request is being closed as a "won't fix." For additional help and support, we recommend utilizing our community resources. Thanks for your understanding, and see you on the other side of v4!
<3,
@mdo and team


Limited number of Nextcloud apps available

Issue description
The available Nextcloud apps are restricted by https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json and https://github.com/NixOS/nixpkgs/blob/eec16b48aa9e98c64b4fdd4a564092ea03a9c8a8/pkgs/servers/nextcloud/packages/generate.sh#L11, but I fail to understand the reason why.
Only making a few apps available makes it a lot harder to install apps outside of those.
If it is for the licenses, then those could be automatically translated from the licenses available in https://github.com/helsinki-systems/nc4nix/blob/main/29.json (I'd be willing to help with that).
CC @dotlambda @Ma27 @pyrox0

There's also the issue that some apps need to be patched to work on NixOS, e.g. https://github.com/NixOS/nixpkgs/pull/211631.

I see, but that probably concerns the fewest of apps, no? Maybe then the better way is to remove apps that need to be patched (so basically invert the list).

There's another issue with Nextcloud apps: you have to manually find out which license they use. Yes, there's a metadata field in the appinfo.xml, but it's worthless for us, because most app authors fail to differentiate between *Only and *Later (that's a common theme for the GPL family of licenses).
Also, I don't consider this too critical since there are at least three ways of installing apps into Nextcloud:

use fetchNextcloudAPp yourself
do it imperatively via the appstore (or whatever else it's called)
I think the upstream nc4nix automatically generates all of the apps

Finally, nobody has stepped up to do that (and maintain the stuff!).

I get your point, but I still think it would be more convenient to have more apps available this way.
As for the license only vs. later the problem is that the allowed values are limited in https://github.com/nextcloud/appstore/blob/0681b16dc3fc6ac4bcce53a6c6ec1084a9f6c1d0/nextcloudappstore/api/v1/release/info.xsd#L368 and there is no way to differentiate them. It's not really the individual app developers that are failing to provide this information.
The reason for this is unclear to me, it seems the code was written a long time ago by an now ex-employee. This was probably an oversight the author didn't think about.
Another problem I see: It is possible to have an app with multiple licenses (not sure if that means dual-license or just parts with different licenses) and I don't think it is possible to provide multiple licenses in nix?

I get your point, but I still think it would be more convenient to have more apps available this way.

New apps can always be added via a PR. We are not limiting ourselves to those.

The reason for this is unclear to me, it seems the code was written a long time ago by an now ex-employee. This was probably an oversight the author didn't think about.

Sure but getting that into shape for all apps is probably a lengthy effort.

Another problem I see: It is possible to have an app with multiple licenses (not sure if that means dual-license or just parts with different licenses) and I don't think it is possible to provide multiple licenses in nix?

#335595

Regarding automated license mapping there is also https://github.com/nextcloud/appstore/issues/1274 and it seems like everyone is fine with transitioning to SPDX identifiers. It will just take the app authors some time to do that (and unmaintained apps are not going to get updated :/ )


add opcode to structs

With Op, one must assume that the event/payload is meant to be used as-is, which is problematic since each payload only includes op and d before every other field. Using structs in this way would cause a lot of redundant struct-fields, since each one would need a Data field i.e
type Hello struct {
	Op   int `json:"op"`
	Data struct {
		HeartbeatInterval int `json:"heartbeat_interval"`
	} `json:"d"`
}

Instead, wrappers should unmarshal payloads into a Gateway Payload, and unmarshal the corresponding data from there using the json.RawMessage. It follows then, that a user should not send payloads using an event directly (i.e Hello), but by marshalling the event into the GatewayPayload.Data json.RawMessage field, then marshalling that struct to Discord.


Bug: Pipeline test cases system output has incorrect type

The pipeline test cases system output is currently typed as string. There was a PR to change it to a struct, which was reverted.
Those are actually not the only 2 types that can occur because GitLab supports multiple test frameworks with different formats:

plain strings
structs (ruby tests seem to produce this)
arrays of strings (JUnit produces this in some cases)

It should be possible to handle these variants without crashing. Either ignoring errors when the type is not string, which would already be a useful improvement, or providing a variant type over the possibilities, or normalizing everything to strings (by accessing the corresponding struct member re. concatenating the strings in the array).
Apologies for (re) opening a can of worms, but this issue breaks a downstream project for my use case: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter/issues/682

I guess we should just make it an interface{} in that case, but can you share some pointers that show what flavors of system output Gitlab actually returns?

This is a redacted and truncated example of what we get in a Java project:
{
  "total_time": 1907.8749999999905,
  "total_count": 3418,
  "success_count": 2822,
  "failed_count": 558,
  "skipped_count": 38,
  "error_count": 0,
  "test_suites": [
    {
      "name": "unit test",
      "total_time": 1907.8749999999905,
      "total_count": 3418,
      "success_count": 2822,
      "failed_count": 558,
      "skipped_count": 38,
      "error_count": 0,
      "suite_error": null,
      "test_cases": [
        {
          "status": "failed",
          "name": "REDACTEDTest",
          "classname": "REDACTED",
          "file": null,
          "execution_time": 6.504,
          "system_output": "redacted multi-line string",
          "stack_trace": null,
          "recent_failures": null
        },
        {
          "status": "failed",
          "name": "REDACTEDTest2",
          "classname": "REDACTED",
          "file": null,
          "execution_time": 5.346,
          "system_output": [
            "redacted multi-line string",
            "redacted multi-line string"
          ],
          "stack_trace": null,
          "recent_failures": null
        },
      ]
    }
  ]
}

Additional observed values were null and objects - here is an example that was referenced in the PR I linked above:
{
      "name": "rspec-ee system pg11 geo",
      "failed_count": 41,
      "test_cases": [
        {
          "status": "failed",
          "name": "example",
          "classname": "ee.spec.features.geo_node_spec",
          "file": "./ee/spec/features/geo_node_spec.rb",
          "execution_time": 6.324748,
          "system_output": {
            "__content__": "\n",
            "message": "RSpec::Core::MultipleExceptionError",
            "type": "RSpec::Core::MultipleExceptionError"
          }
        }
      ]
    }

Let me know if I can help in any other way :)

Well, it shows 4 cases, not just mine :)  The json object is from an upstream GitLab test, not from my instance.
GitLab sadly does not document a schema for this field, in fact it documents very little for this response. The above are all the types which I have encountered in related threads on the internet so far.

Sorry, I didn't look good enough I guess 😊 But in that case let's just make it an interface{} for now... Feel free to make a PR for that 😏

No worries!
It's been 5 years since I wrote a line of go, but I'll give it a try. Can you link me to a recent tooling cheetsheet and/or describe how I can run the tests?

No worries, I just pushed a commit to update the field (a42af8593e45e5a55a6008e482ecbc3dc6f5d06b) so will close this issue and hope this solves the incompatibilities with this struct.

Thank you!
Shouldn't the test data in https://github.com/xanzy/go-gitlab/blob/master/testdata/get_pipeline_testreport.json and the corresponding test(s) be adapted as well?

Sure, updated in 7e3c23c9c221c0a334e11356503a99d41f206651

Thanks! I tried adding this locally, but didn't realize that I needed to use map[string]interface{} instead of map[string]string and the same for arrays.
At least I know how to run the tests now :=

It would be great if you could ping me when the release containing this fix is tagged so I can ask downstream to update :)

Tagged v0.88.0


cmd: remove old command main files

Now that the unified binary has its own main file under "cmd/"
we no longer need the split main.go files.
Signed-off-by: John Mulligan<EMAIL_ADDRESS>

Note: I noticed that that github tried to make "csi-v1.0" the parent branch, which wasn't what I used (master), so I changed it. However, if PRs are supposed to be  filed against the csi-v1.0 branch first please let me know and I'll duplicate this. If not, we should consider changing the settings of the repo.

Note: I noticed that that github tried to make "csi-v1.0" the parent branch, which wasn't what I used (master), so I changed it. However, if PRs are supposed to be filed against the csi-v1.0 branch first please let me know and I'll duplicate this. If not, we should consider changing the settings of the repo.

The move to master is pending on PR #302 but all new PRs are to be posted against master.

@Madhu-1 @humblec @gman0 @leseb Request a review and if appropriate add the second approval for a merge. Thanks.

@phlogistonjohn we have makefile targets all: rbdplugin cephfsplugin in place but I dont see targets. Dont we need to clean it up as well ?

Hi @humblec that issue was not introduced by this PR. It was introduced by one of my previous PRs and needs fixing but shouldn't block this pr. I will follow up with more fixes for the "unified" build approach.


Open Editor View problem

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.85.1
OS Version: win 10 pro

Steps to Reproduce:

simply open folder

It looks like you have lost the Explorer view from the Explorer container. I suggest you use Command Palette (F1) to run the Reset View Locations command.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Custom theme cannot be downloaded.

Custom theme cannot be downloaded. The right edit panel cannot be loaded

@sugarkett Can you please describe clearly that how can I reproduce you problem?


Please publish Augury to Chrome Web Store

Thanks for this great app. Please publish Augury to Chrome Web Store.

Right now, Chrome always disable this extension automatically, then it cannot be enabled again.
I have to uninstall and install again to use it.

@Hongbo-Miao: we're still working on making this available via chrome store, but this should happen very very soon now. Stay tuned!

Already being tracked: https://github.com/rangle/augury/issues/297

thanks for letting me know!!


Adds an additional flex justify class 'space-evenly'

In addition to the current Flex justify classes found in the docs, there is also another justify class which could be useful to have as a standalone.

Hey @TuzBot thanks for the PR!
The only issue with space-evenly for me is that it is not supported at all in Edge or IE. This is true for a bunch of other flex-related values that we excluded for the same reason, like justify-content: baseline and justify-content: stretch.
I'm not entirely opposed to including utilities that don't have support in all modern browsers, but part of me feels it's a bit of a waste since I doubt there's many people out there working on projects where they don't have to support at least Edge.
I also feel like if we are going to include one flex value that's not supported in Edge that we should include all of them, which would make this a lot easier to say no to.
Do you think there's enough contexts where people can safely use this utility to justify including it by default?

Hmm, tricky. I think our current approach makes a lot of sense. I see a ton of value in Tailwind only offering utilities that are practical to use given today's browser support. This is the exact same reason we're not including grid classes in the core right now. I could see things like grid being added as optional extensions (which is actually the plan), but not included in core until they have a sufficient amount of browser support.
One thing you can obviously do is create your own utilities if you want to use these. Check out this doc page for more info: https://tailwindcss.com/docs/adding-new-utilities

Hey @adamwathan
Yea, I get the issue and the real pain of support IE (of some version).

I doubt there's many people out there working on projects where they don't have to support at least Edge.

Too true and with that being said, it makes the class .space-evenly redundant and pointless in this case.
I will close this PR 👍


Starting with TorchMode.On is broken

Steps to reproduce

<Camera torchMode={Camera.Constants.TorchMode.On} />
Observe the flash turn on, then immediately off.

Expected behaviour
The light should stay on.
Actual behaviour
The light flickers off.
Environment

Node.js version: v6.2.1
React Native version: 27.1
React Native platform + platform version: iOS 9.3.2

react-native-camera
Version: npm version or "master": 0.3.8
Related issue
similar: https://github.com/lwansbrough/react-native-camera/issues/123 and fixed here: https://github.com/lwansbrough/react-native-camera/pull/261 but it doesn't fix the light staying on.  mentioned here as well: https://github.com/lwansbrough/react-native-camera/issues/123#issuecomment-217403124

+1 encountering as well

+1

+1

+1

+1

See my comment at #123

I fixed this by using state for torchMode (initially off) and setting it to on after showing my camera component:
this.setState({showCameraComponent: true}, () => {

    this.setState({torchMode: Camera.constants.TorchMode.on})

});

<Camera ... torchMode={ this.state.torchMode }/>

@wouteralberts that's works, thank u!

+1

yes, just as @wouteralberts said. It works well for me!

Thanks for the workaround @wouteralberts.
Nevertheless this needs to be fixed.


J5 - MISO is fluctuating around ~1V

I am debugging an issue with the MISO line, exposed via J5 connector on TOF EVK board.
I have modified this Arduino library to work with 4 ICU30201 and wired them up. For some reason, the teensy 4.1 board gets stuck during ICU.begin() at the first SPI transmission (chdrv_prog_ping).

I believe this issue is because of MISO which is fluctuating between 3.3 and 0 as shown above.
Is schematic available for ToF EVK board? Is so, I can check if there is some component like a voltage buffer is between the sensor's MISO line and J5.
For some reason, the eval board and 4 sensors works fine with the Windows ICUX0201 Evaluation Platform App.

The observation is likely because of my logic analyzer's low rate. Closing this issue.


[Bug] Constant crashing

[x] Used appropriate template for the issue type
[x] Searched both open and closed issues for duplicates of this issue
[x] Title adequately and concisely reflects the feature or the bug

Describe the bug
Discord crashes all the time to the We tracked the problem screen on BetterDiscord Beta 6
To Reproduce
Use Discord.
It sometimes does it when I hover over the BetterDiscord button/menu
Expected behavior
It crashes
Screenshots
I dont use github that much so i dont know how to add screenshots
System information
Windows 10 Insider, BetterDiscord 2.0.0 Beta 6
Additional context

I have no additional context.
Are you willing and able to fix this?

No I am not. All knowledge I have is just basic scripting.

same for me right now

Duplicate of #342


[CppCodeGen] Use dependency analysis to generate EE datastructures

The code to generate EE data structures (EEType, etc.) is duplicated between RyuJIT codegen and CppCodeGen. The CppCodeGen path is missing number of features from RyuJIT codegen - in particular support for interface dispatch.
This issue is about switching CppCodeGen to use the same dependency analysis nodes as RyuJIT codegen - to increase the amount of code shared between the two, and add the missing features to CppCodeGen.

This is needed to make interface calls with CppCodeGen work, e.g.:
static void Main() {
    IMyInterface iface = ...
    iface.MyMethod();
}

Fixed by https://github.com/dotnet/corert/pull/1648


fontsize <= 0

while using glyphwise to test some ideas I came accross the following:
when the fontsize is 0 coldtype throws a ZeroDivisionError
when the fontsize is negative the text is getting mirrored (or inverted?).
maybe the zero error could be 'silenced'?

hm, not sure what I expected. but I was a bit surprised since I used multiplication and not division.
there are other quite reasonable examples where the fontsize might end up being zero.
eg the following (where I just add a tiny fontSize to the calculation).
empty results but correct metadata sounds good.
from coldtype import *

@animation(timeline = 60, bg = 0)
def scratch(f):
    return (StSt('COLDTYPE', Font.MutatorSans(), .01 + f.e('eeio', 1)*240, wght = .3)
        .align(f.a.r)
        .rotate(f.e("ceio", 1, rng=(0, 360)))
        .f(1))


Opengl3 driver shows no GPUParticles2D (CPUParticles2D) when amount is 1

Godot version
4.0.2
System information
Manjaro, GeForce GT 520M, GLES3
Issue description
When I create a particle and make its amount 1, nothing gets rendered. It happens for GPUParticles2D and CPUParticles2D. I asked this issue in discord channel and someone confirmed that they had the same issue (in compatibility mode).
For me because I don't have a vulkan supported GPU, even if I run the editor (and game) in forward+ mode still get the same result.
Steps to reproduce
In compatibility mode:

Create a GPU[CPU]Particles2D
Change its texture to something (ex: Godot logo)
Make its amount 1.

The texture should be hidden after step 3
P.S: You could add a process material but it wouldn't change anything.
Minimal reproduction project
N/A

Duplicate of https://github.com/godotengine/godot/issues/75747
Please remember to search for your issue before opening a new bug report


More control over superagent

e.g.
import superagent from 'superagent';
// monkeypatch
superagent.parse['application/ld+json'] = superagent.parse['application/json'];

request.parse(fn)

request.use(fn)

Thoughts?

These are undocumented because docs for superagent just plain sucks...

@staltz can you assign me to this please?

Assigning isn't really a proper open source community feature in Github, it's meant for people in organizations, so let's just go with the label "in progress". What matters most is that you told in this issue that you're working on it, so other people don't do duplicate work. :)

cool will do it like that. Thanks :)

This issue was moved to cyclejs/cycle-core#236


Riru-Core Updated

Riru core no longer supports pre v24 modules. Hopefully update is planned. Thank you for your time and great work.

I have upgraded the riru version to 26, it should have been fixed.


Saving error

Error Code
Error: Precondition Failed

Error: Precondition Failed
    at Request.<anonymous> (https://homebrewery.naturalcrit.com/homebrew/bundle.js:76373:19)
    at Emitter.emit (https://homebrewery.naturalcrit.com/homebrew/bundle.js:1966:20)
    at xhr.onreadystatechange (https://homebrewery.naturalcrit.com/homebrew/bundle.js:76682:10)
{
  "status": 412,
  "method": "PUT",
  "url": "/api/update/He8Sgkbyg2K3"
}

### Your description of what happened:

This error happened thrice in a row when autosaving.
The brew is 10 pages long, and I'm using the legacy renderer

You have an old version of the Homebrewery site that is missing a recent update. If reloading the page didn't work, try Hard Reloading the page. You can do this by pressing CTRL + SHIFT + R at the same time while at the Homebrewery.  Alternatively, you can open up the Chrome Developer Console (Right-click on the page and choose "inspect"). This will add some options to the refresh button if you right-click it. Again, choose "Hard Reload".

That should force Chrome to check for an update to the Homebrewery. Let us know if that doesn't work.

It worked, thanks!


[BUG] Changelog doesn't use absolute paths

I have several files with the same name spread across the graph (index / inbox files in various folders / sub-hierarchies, e.g. work/-INBOX-, projects/-INBOX-, ... and a global -INBOX- for quick notes to process later.)
Because the change log link doesn't include the full path, most of these notes get lost / aren't properly tracked by the change log.
Notes should be linked by the full path instead. (There's even an Obsidian option, but I'm not sure if it's accessible or if there's an API call to generate a link according to the current setting. Didn't see anything on the file descriptor itself.)
I locally edited the JS resulting from https://github.com/badrbouslikhin/obsidian-vault-changelog/blob/main/main.ts#L91 to
const path = recentlyEditedFile.path;
const link = path.substring( 0, path.length - (1+recentlyEditedFile.extension.length) );
changelogContent += "- " + humanTime + " \u00B7 [[" + link + "]]\n";

and that works for me, for now. But others will probably also run into this.

Apologize for the delay in responding to this issue!
Thanks for reaching out. This is a valid remark, can you please submit a PR?


Create monolithic bytecode build of [Jengaboot] for distribution.

jengaboot has two components. A statically compiled build system jenga, and then a dynamically loaded jengaRoot file. We want to distribute jenga to hosts without them having to compile it, in a cross platform manner. However, we can't just use the bytecode version of jenga because the bytecode jenga can't dynamically load jengaRoot (it's an unrelated issue, but still blocking us). So instead, we can "fuse" the jengaRoot into jenga to do a custom build of jenga that doesn't dynamically load whatever jengaRoot you have in the directory - instead it has it precompiled into jenga. Then we can distribute the bytecode version of that. This will work on npm or on CI servers without network access and without having opam available.

Tracked in https://github.com/reasonml/rebel/pull/27

gg jengaboot


Don't use bracketless single line if statements in Javascript

What it says on the box. Inspired by #1384 but we do it in a bunch of places. Should include a linter change to enforce this.

bracketless single-line if statements seem legit? it seems like the ruby style do thing if whatever, if (whatever) do thing;
I'd definitely want to make sure we don't have anything multi-line (especially with misleading indent) here, but I think we can set up linter configs for that separately
but if we do want to make sure everything has to have braces, that seems OK to me, just, it's gonna make the code less dense so I have a slight dispreference for it


Unable to upgrade to Laravel 10

   "require": {
        "illuminate/support": "^10.0.0",
        "illuminate/console": "^10.0.0",
        "illuminate/database": "^10.0.0",
        "illuminate/broadcasting": "^10.0.0",
        "illuminate/queue": "^10.0.0",
        "illuminate/container": "^10.0.0"
    },
Composer update error

- zgabievi/laravel-promocodes 9.1.0 requires illuminate/container ^9.0 -> satisfiable by illuminate/container[v9.0.0-beta.1, ..., 9.x-dev].
    - Root composer.json requires zgabievi/laravel-promocodes ^9.1.0 -> satisfiable by zgabievi/laravel-promocodes[9.1.0].

I'm assuming this is because of the illuminate support version is specified at 9 but it should be 10.

I also waiting Laravel 10 support

I'm want to install on Laravel 10 too. Is this package abandoned?

I'm want to install on Laravel 10 too. Is this package abandoned?

I wouldn't this still hasn't been updated!

@ricardobarantini
@Elliot-putt
@ricardobarantini
@zgabievi
I have created a Pull request to upgrade to Laravel 10,
the upgrade will work on both V10 and V9.
so no breaking changes
You are welcome to use my repo
https://github.com/Elshaden/laravel-promocodes.git
you have to add it to your required
"zgabievi/laravel-promocodes":"dev-L10"

You need to add the url also
"repositories": [

        {
           "type": "vcs",
           "url": "https://github.com/Elshaden/laravel-promocodes.git"
        }
]

@Elshaden Do yout think you can add the fix https://github.com/zgabievi/laravel-promocodes/pull/111 to your repo? I need both of this fixes urgently, and @zgabievi doesn't seems to be active lately to review the pull requests :(

@mgaratemu
Ok Done
I could not Pull your request because it was not made in My repo. so I just copied what you asked for.


Multithreading when creating solid

Maybe we can create the solid in multiple threads to save some time.

There is a workaround for this, where you can export the mesh as an stl, then reimport it, and use the Part -> Create Part from Mesh command to accomplish the same thing in a much shorter time

https://wiki.freecad.org/FreeCAD_and_Mesh_Import

https://wiki.freecad.org/FreeCAD_and_Mesh_Import

Not seeing how this would enable any multithreading or be any quicker.
I am aware the OCCT has some multithreading facilities but never been clear of what functions actually use it.
Although I think loading of images might be one. i.e import of STL.
Think it also depends on your OS and level of OCC that FreeCAD is using, plus how many cores you machine has.

I'm not saying it's multithreaded, but it's faster than the supplied function in the addon, especially for larger images. With this I can import meshes of images with a width of 1200px in minutes as opposed to DNF with the supplied function


jeecg 4.0 file upload vulnerability

In landing state，Visit the link，Upload  the allowed file suffix first
http://<IP_ADDRESS>:8080/jeecg_war_exploded/jeecgFormDemoController.do?commonUpload

The system only does the front-end check to the upload file，we can use burp to grab bag，change the suffix of file name to jsp，Then you can upload it successfully

The uploaded address is as follows，we can use the upload vulnerability to get a webshell
http://<IP_ADDRESS>:8080/jeecg_war_exploded/upload/20200430/20200430093604CtVJPhFP.jsp

Hi,
This issue was assigned with CVE-2020-23083.
Is there any plan to fix it?


Added mqtts documentation

A Guide on how to configure the MQTT channels so that they are secured

Thank you very much! I made changes to reflect most of your feedback.
Regarding the more maintainable UML diagrams, I absolutely agree in principle, however as far as I can tell the suggestions in discord still require us to generate two images and then include some logic to decide which image to show based off whether we are in dark mode or not. Since mermaid is a JS tool, I don't see how we can include this in .md files (let me know if this is possible!). For now I replicated Giovanni's style from the getstarted branch and included the .drawio file so that it can be adjusted fairly painlessly.
I also rebased this branch on the getstarted branch as there is a reference to those pages and the link would break as soon as that branch would be merged, so now this PR will have to wait until that branch is merged.

Nice changes!
We need to come up with a common understanding of how we want to do the branches and light/dark mode (especially for figures).
I will bring these topics up in the following meetings.
If I understand correctly you are building this PR up on top of the getstarted branch. If that is so how about making that branch the merge target instead of main. You can do that at the very top when editing your PR.

Otherwise, your reviewer needs to know exactly what you changed and find those changes in a large set of all getstarted changes - which is cumbersome.

Because we are already reviewing this PR I think you can safely set it to Open instead of "Draft"

@Mjaethers can this be evenetually merged into main directly?

@Mjaethers can this be evenetually merged into main directly?

I think this is exactly what I mentioned in the last meeting - that we need to spread the word that we no longer pursue the "intermediate" branch tactics, but we create normal feature branches and merge them into main.
Hopefully, this confusion will shortly subside. 😀

I rebased this branch onto the getstarted branch because I reference some of those pages. We can merge this PR into main directly, but this will result in some broken links until getstarted is merged into main. To me it makes sense to just merge this into getstarted.

@giobart I thought we already merged the loose branches (such as getting-started) into main - but from what I was able to see this is not the case - is anything blocking this?

Thank you for realizing all the change requests!
LGTM now


Max instances per account?

Open to discussion, after #21

According to my use case and experience after using PockeBase and pockethost.io:
Free Tier: Only one,
Front Pocket: One
Back Pocket: two instances

@rajesh6161 Firebase lets users create any number of projects. But maybe eventually we will have both instance limits and overall account limits, like not using more than 100 minutes (or 200 minutes) across ALL account instances on the free tier. And then you can upgrade certain instances to not count against that free tier limit. Tagging #44 here because I think this is an important idea!

Not sure if this is possible, but another platform, Backendless, has a "free" tier sort of that's just rate limited, where you pay a single flat fee of $50, and then you essentially get the rate-limited instance indefinitely. That was always nice for me since I didn't have to pay for multiple monthly instances.

@brewhousedigital Yeah I'm thinking along those lines too, some kind of limited free tier that works across all instances in a given account. Maybe it does make more sense to bill per-account rather than per-instance. So you can buy 1000 minutes and it gets spread across whatever projects you have. If you want to isolate a specific project, you can always create a 2nd account for it (rare).

moved to roadmap


Add SuperRare mappings

Implement mappings of NFTs issued on SuperRare platform
https://superrare.co/

I would like to work on this, where can I find the right files to get started? Where is the list of NFTs?

I would like to work on this, where can I find the right files to get started? Where is the list of NFTs?

Hi @janus,
Finding answers to those questions is a good part of the whole task :)

Hi @janus,
Finding answers to those questions is a good part of the whole task :)

@frostiq

@frostiq

@frostiq  I got gitcoin message telling me that I have been accepted to work on this. Is that correct or an error?

@frostiq  I got gitcoin message telling me that I have been accepted to work on this. Is that correct or an error?

@janus, sorry about that. You probably got an auto-approval. Unfortunately, there are a couple of merge requests by other authors that are very close to completion.

@janus, sorry about that. You probably got an auto-approval. Unfortunately, there are a couple of merge requests by other authors that are very close to completion.

Hello @frostiq,
can you check my modifications in my PR?

Hello @frostiq,
can you check my modifications in my PR?


Fix counsel-dash

Set appropriate buffer while building candidates collection.
When the counsel-dash-collection  called from ivy, the current buffer is minibuffer so the value of buffer-local helm-dash-docsets variable is not what you expect.

TYVM!