SimulatedAnnealingPruner prune iteration issue

Describe the issue:
When i use the SimulatedAnnealingPruner, it has iteration of temperature, but i found that its evaluation results is always the same every times, is there anything wrong with the evaluate function?
PS: I checked the Simulatedpruner source code, and found that it must have comparation with the acc every iteration in order to find which search space is better, do I understand this correctly? So i have the doubt.

Hi @sungh66 , yes, you are right, it needs to compare the acc to find the best one. Can you show your evaluation results and log? Let's find what makes wrong.

I run your base cifar10 and it has the same problem.During pruning, the cifar10 evaluate acc result is always 10%, so it mat not be my code's fault?
My code may be a little complicated, but the model is simple, is the resnet50
def test(model, test_set):     model.eval()     fe = DeepMAR_ResNet50_ExtractFeature(model=model)     print('att test with feat_func_att')     result = attribute_evaluate(fe, test_set, **{})     print( '-' * 60)     print( 'Evaluation on %s set:' % (args.test_split))     ma = np.mean(result['label_acc'])     print( 'Label-based evaluation: \n mA: %.4f'%(ma))     print( 'Instance-based evaluation: \n Acc: %.4f, Prec: %.4f, Rec: %.4f, F1: %.4f' \            %(result['instance_acc'], result['instance_precision'], result['instance_recall'], result['instance_F1']))     print( '-' * 60)     return ma
`class DeepMAR_ResNet50_ExtractFeature(object):
"""
A feature extraction function
"""
def init(self, model, **kwargs):
self.model = model
def __call__(self, imgs):
    old_train_eval_model = self.model.training
    # set the model to be eval
    self.model.eval()
    # imgs should be Variable
    if not isinstance(imgs, Variable):
        print('imgs should be type: Variable')
        raise ValueError
    score = self.model(imgs)
    score = score.data.cpu().numpy()
    self.model.train(old_train_eval_model)
    return score`

`def attribute_evaluate(feat_func, dataset, **kwargs):
print("extracting features for attribute recognition")
pt_result = extract_feat(feat_func, dataset)
# obain the attributes from the attribute dictionary
print("computing attribute recognition result")
N = pt_result.shape[0]
L = pt_result.shape[1]
gt_result = np.zeros(pt_result.shape)
# get the groundtruth attributes
for idx, label in enumerate(dataset.label):
    gt_result[idx, :] = label
pt_result[pt_result>=0] = 1
pt_result[pt_result<0] = 0
return attribute_evaluate_lidw(gt_result, pt_result)

def extract_feat(feat_func, dataset, **kwargs):
"""
extract feature for images
"""
test_loader = torch.utils.data.DataLoader(
dataset = dataset, batch_size = 32,
num_workers = 2, pin_memory = True)
# extract feature for all the images of test/val identities
start_time = time.time()
total_eps = len(test_loader)
N = len(dataset.image)
start = 0
with torch.no_grad():
for ep, (imgs, labels) in enumerate(test_loader):
imgs_var = imgs.cuda()
feat_tmp = feat_func( imgs_var )
batch_size = feat_tmp.shape[0]
# print(feat_tmp.size)
# print(feat_tmp.size/batch_size)
# print(N.type())
temp = feat_tmp.size/batch_size
if ep == 0:
feat = np.zeros((N, int(temp)))
feat[start:start+batch_size, :] = feat_tmp.reshape((batch_size, -1))
start += batch_size
end_time = time.time()
print('{} batches done, total {:.2f}s'.format(total_eps, end_time-start_time))
return feat
 def attribute_evaluate_lidw(gt_result, pt_result):
"""
Input:
gt_result, pt_result, N*L, with 0/1
Output:
result
a dictionary, including label-based and instance-based evaluation
label-based: label_pos_acc, label_neg_acc, label_acc
instance-based: instance_acc, instance_precision, instance_recall, instance_F1
"""
# obtain the label-based and instance-based accuracy
# compute the label-based accuracy
if gt_result.shape != pt_result.shape:
print('Shape beteen groundtruth and predicted results are different')
# compute the label-based accuracy
result = {}
gt_pos = np.sum((gt_result == 1).astype(float), axis=0)
gt_neg = np.sum((gt_result == 0).astype(float), axis=0)
pt_pos = np.sum((gt_result == 1).astype(float) * (pt_result == 1).astype(float), axis=0)
pt_neg = np.sum((gt_result == 0).astype(float) * (pt_result == 0).astype(float), axis=0)
print(gt_pos,gt_neg,len(gt_pos),len(gt_neg))
print(pt_pos,pt_neg,len(pt_pos),len(pt_neg))
label_pos_acc = 1.0*pt_pos/gt_pos
label_neg_acc = 1.0*pt_neg/gt_neg
label_acc = (label_pos_acc + label_neg_acc)/2

print(label_pos_acc,label_neg_acc)
result['label_pos_acc'] = label_pos_acc
result['label_neg_acc'] = label_neg_acc
result['label_acc'] = label_acc
# compute the instance-based accuracy
# precision
gt_pos = np.sum((gt_result == 1).astype(float), axis=1)
print('gtpos.ptpos',gt_pos,pt_pos)
pt_pos = np.sum((pt_result == 1).astype(float), axis=1)
floatersect_pos = np.sum((gt_result == 1).astype(float)*(pt_result == 1).astype(float), axis=1)
union_pos = np.sum(((gt_result == 1)+(pt_result == 1)).astype(float),axis=1)
# avoid empty label in predicted results
cnt_eff = float(gt_result.shape[0])
for iter, key in enumerate(gt_pos):
    if key == 0:
        union_pos[iter] = 1
        pt_pos[iter] = 1
        gt_pos[iter] = 1
        cnt_eff = cnt_eff - 1
        continue
    if pt_pos[iter] == 0:
        pt_pos[iter] = 1
instance_acc = np.sum(floatersect_pos/union_pos)/cnt_eff
instance_precision = np.sum(floatersect_pos/pt_pos)/cnt_eff
instance_recall = np.sum(floatersect_pos/gt_pos)/cnt_eff
floatance_F1 = 2*instance_precision*instance_recall/(instance_precision+instance_recall)
result['instance_acc'] = instance_acc
result['instance_precision'] = instance_precision
result['instance_recall'] = instance_recall
result['instance_F1'] = floatance_F1
return result`

Got it, do you pre-train your model before pruning? and what's the sparsity? In the paper, the sparsity increase very small during each iteration. So if you use SA Pruner independence, please set a small sparsity. In the paper, the sparsity is 0.02 in each iteration. If you set a big sparsity, the evaluation result will approximately random, because too many weight are pruned.
FYI, https://arxiv.org/abs/1907.03141

Got it, do you pre-train your model before pruning? and what's the sparsity? In the paper, the sparsity increase very small during each iteration. So if you use SA Pruner independence, please set a small sparsity. In the paper, the sparsity is 0.02 in each iteration. If you set a big sparsity, the evaluation result will approximately random, because too many weight are pruned. FYI, https://arxiv.org/abs/1907.03141

Thanks, though i haven't fix the problem, the finetune result is god and i had pretrain my model.

Got it, do you pre-train your model before pruning? and what's the sparsity? In the paper, the sparsity increase very small during each iteration. So if you use SA Pruner independence, please set a small sparsity. In the paper, the sparsity is 0.02 in each iteration. If you set a big sparsity, the evaluation result will approximately random, because too many weight are pruned. FYI, https://arxiv.org/abs/1907.03141

I had pretrained my model, and the same pruned result exactly because of  the sparsity is too big as you said.So i set the sparsity to 0.1.Besides, do i need to finetune the model every pruning iteration?How many finetune epochs per pruning iteration is more appropriate compared to one-time finetuneing？

I had pretrained my model, and the same pruned result exactly because of the sparsity is too big as you said.So i set the sparsity to 0.1.Besides, do i need to finetune the model every pruning iteration?How many finetune epochs per pruning iteration is more appropriate compared to one-time finetuneing？

Yes, the model should speed up and finetune before the next iteration. The epoch number is hard to recommend, finetune to stable is ok.
And you can have a try autocompress pruner. https://nni.readthedocs.io/en/stable/Compression/Pruner.html#autocompress-pruner

Describe the issue: When i use the SimulatedAnnealingPruner, it has iteration of temperature, but i found that its evaluation results is always the same every times, is there anything wrong with the evaluate function? PS: I checked the Simulatedpruner source code, and found that it must have comparation with the acc every iteration in order to find which search space is better, do I understand this correctly? So i have the doubt.

hi, i use AGPPruner now, but how to apply pruning in the process of finetune Where should this API be placed in the code?


Type safety for loaders

This looks interesting!
Is it also possible to get type safety for mercurius loaders?

For sure, I already was planning to add that feature to mercurius-codegen 👍


Lazy load not working as expected

IMPORTANT: Please use the following link to create a new issue:
https://new-issue.vuejs.org/?repo=vuejs/vue-cli
If your issue was not created using the app above, it will be closed immediately.
中文用户请注意：
请使用上面的链接来创建新的 issue。如果不是用上述工具创建的 issue 会被自动关闭。

Wrong.


Question

Hello, I need to launch the WebUI to be in a way that accessible to anyone in my local area network. How can I do that?

will be accessible within your network to anyone who sets your iplocal:6969

[No, it didn't work. In my computer, it shows  <IP_ADDRESS>:6969. Which means this is a specific IP address to my computer only. No one can open it, instead it's this particular computer. Though I tried on my phone opening <IP_ADDRESS>:6969 and local:6969, but it didn't help either.

add a —share param in the launch script and you will get a shareable link


loghub 0.5.0 causes UndefinedError for old workflow

I've been using loghub for a while now and with a recent update from a master-branch based installation (~0.5.0) to the released 0.5.0 version I now get:
$ loghub pytroll/pycoast -t "$LOGHUB_GITHUB_TOKEN" -st v1.3.2 -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes"

LOGHUB: Querying issues since tag "v1.3.2"

Traceback (most recent call last):
  File "/home/davidh/miniconda3/envs/satpy_py37/bin/loghub", line 8, in <module>
    sys.exit(main())
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/loghub/cli/main.py", line 52, in main
    parse_arguments(skip=False)
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/loghub/cli/main.py", line 299, in parse_arguments
    show_related_issues=options.show_related_issues,
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/loghub/core/formatter.py", line 381, in create_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/loghub/core/formatter.py", line 453, in render_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 25, in top-level template code
  File "/home/davidh/miniconda3/envs/satpy_py37/lib/python3.7/site-packages/jinja2/environment.py", line 452, in getitem
    return obj[argument]
jinja2.exceptions.UndefinedError: 'pri' is undefined

What can I do to fix this?
NOTE: This works with 0.4.0.

Hi @djhoese, sorry for the issues. I will take a look at this, this week. Will try your example and see if I can reproduce it ok?
Cheers!

Any updates on this? I'm not really up to date on the recent changes to loghub so I'm not sure if I can help.

@goanpeca, please take a look at this one.

I cannot reproduce this issue, so I am not sure where the error is coming from.

With conda-forge channel added as priority and strict channel priority set:
conda create -n loghub_test python=3.7 loghub
conda activate loghub_test
loghub pytroll/pycoast -t "$LOGHUB_GITHUB_TOKEN" -st v1.3.2 -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes"

LOGHUB: Querying issues since tag "v1.3.2"

Traceback (most recent call last):
  File "/home/davidh/miniconda3/envs/loghub_test/bin/loghub", line 10, in <module>
    sys.exit(main())
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/cli/main.py", line 52, in main
    parse_arguments(skip=False)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/cli/main.py", line 299, in parse_arguments
    show_related_issues=options.show_related_issues,
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/core/formatter.py", line 381, in create_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/core/formatter.py", line 453, in render_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 25, in top-level template code
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 452, in getitem
    return obj[argument]
jinja2.exceptions.UndefinedError: 'pri' is undefined

@djhoese I tried that, but I need to have access to the repo to be able to use my token, otherwise the rate limit kicks in, any chance you could add me with write permissions, or share internally a token so I can debug this?

I will take a look again in the afternoon.

I don't think you need any special permissions to the repository do you? You just need to make a personal access token on your github account. For example, I'm able to run loghub against spyder-ide/loghub even though I don't think I have any permissions to the repository. Note that I'm unable to reproduce the issue with the loghub repository (at least with what I've tried so far).

Got it:
loghub spyder-ide/loghub -t "$LOGHUB_GITHUB_TOKEN" -st v0.3.0 -plg "type:bug" "Bugs fixed" -plg "reso:completed" "Features added" -plg "type:task" "Documentation changes"

LOGHUB: Querying issues since tag "v0.3.0"

Traceback (most recent call last):
  File "/home/davidh/miniconda3/envs/loghub_test/bin/loghub", line 10, in <module>
    sys.exit(main())
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/cli/main.py", line 52, in main
    parse_arguments(skip=False)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/cli/main.py", line 299, in parse_arguments
    show_related_issues=options.show_related_issues,
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/core/formatter.py", line 381, in create_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/loghub/core/formatter.py", line 453, in render_changelog
    show_prs=show_prs)
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 25, in top-level template code
  File "/home/davidh/miniconda3/envs/loghub_test/lib/python3.7/site-packages/jinja2/environment.py", line 452, in getitem
    return obj[argument]
jinja2.exceptions.UndefinedError: 'pri' is undefined

Awesome, I will make a fix and make a release this week. Thanks for the help!


self.hparam silently removes params that are not serializable

🐛 Bug

Following the approach found under hyperparameters in the docs, step 3, I passed a dict with parameters to my pl.LightningModule.
In the __init__ printing self.hparams shows all contents I passed.
However, in the function def configure_optimizers(self), some hparams are gone.
This might be related to that not all param values are YAML serializable, and therefore automatically removed? Because the 2 removed params are "criterion": torch.nn.BCELoss() and "optimizer": partial(optim.Adam, lr=0.001).
To Reproduce
Steps to reproduce the behavior:

Run the following script:

from functools import partial
import torch
import torch.optim as optim
from torch.utils.data import Dataset
import pytorch_lightning as pl
from pytorch_lightning import Trainer

# partial to give all params, except the data
hparams = {
    "criterion": torch.nn.BCELoss(),  # F.cross_entropy(),  # loss function
    "optimizer": partial(optim.Adam, lr=0.001),  # (lr=0.001),
    # "learning_rate": 0.001,
    "filters": 64,
    "layers": 2
}

class EmptyDataset(Dataset):
    def __init__(self, transform=None):
        pass

    def __len__(self):
        return 32

    def __getitem__(self, idx):
        return {"input": np.array([1]), "output": "nothing"}

class LitLake(pl.LightningModule):
    def __init__(self, hparams: dict, transforms: dict = None):
        super().__init__()

        self.hparams = hparams
        print("self.hparams\n", self.hparams)

    def forward(self, x):
        pass

    def training_step(self, batch, batch_idx):
        """
        Lightning calls this inside the training loop with the data from the training dataloader
        passed in as `batch`.
        """
        # forward pass
        x, y = batch
        y_hat = self(x)
        loss = self.hparams["criterion"](y_hat, y)
        tensorboard_logs = {'train_loss': loss}
        return {'loss': loss, 'log': tensorboard_logs}

    def configure_optimizers(self):
        print("self.hparams\n", self.hparams)
        optimizer = self.hparams["optimizer"](self.parameters())
        scheduler = optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=10)
        return [optimizer], [scheduler]

    def train_dataloader(self):
         return DataLoader(EmptyDataset(), batch_size=4, num_workers=1)

model = LitLake(hparams=hparams)
# most basic trainer, uses good defaults
trainer = Trainer()  # gpus=1, num_nodes=1
trainer.fit(model)  # KeyError: 'optimizer'

See error

Script output (CLICK ME)

self.hparams
 "criterion": BCELoss()
"filters":   64
"layers":    2
"optimizer": functools.partial(<class 'torch.optim.adam.Adam'>, lr=0.001)
GPU available: True, used: False
TPU available: False, using: 0 TPU cores
self.hparams
 "filters": 64
"layers":  2
Traceback (most recent call last):
  File "lightning_hparams_bug.py", line 61, in <module>
    trainer.fit(model)  # KeyError: 'optimizer'
  File "/home/*user*/anaconda3/envs/onseilake/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 965, in fit
    self.optimizers, self.lr_schedulers, self.optimizer_frequencies = self.init_optimizers(model)
  File "/home/*user*/anaconda3/envs/onseilake/lib/python3.7/site-packages/pytorch_lightning/trainer/optimizers.py", line 18, in init_optimizers
    optim_conf = model.configure_optimizers()
  File "lightning_hparams_bug.py", line 51, in configure_optimizers
    optimizer = self.hparams["optimizer"](self.parameters())
KeyError: 'optimizer'

Code sample

Expected behavior

Either:

self.hparams keeping the non-serializable parameters (will give problems with loading?)
Throw an error explaining why those param values are not acceptable and how to approach it, instead of silently removing them.

Environment

PyTorch Version (e.g., 1.0): 1.5.0
OS (e.g., Linux): Ubuntu 18.04
How you installed PyTorch (conda, pip, source): conda
Build command you used (if compiling from source): -
Python version: 3.7.6
CUDA/cuDNN version: 10.2
GPU models and configuration: 1x GeForce GTX 1080 Ti
Any other relevant information: -

Additional context

Bug reproduced by @Borda

Happens to me too. I'm also waiting for this fix, since i really want to use the new feature to put anything in hparams.

@dscarmo you can take it over and send a PR :] or I ll check it tomorrow...

Need to add warning about this.

@awaelchli this should be fixed with PR, right?

@edenlightning yes the linked PR solves this.


Cannot find documentation on how to add files to Xamarin.* projects (like what the contentFiles folder does)

I'm going to explain our scenario so that you can understand what appears to be missing from the NuGet documentation...
We are trying to create a NuGet package using a .NET Standard 2.0 project. With this generated NuGet package, we want to update 'styles.xml' and add a file named 'colors.xml' in a Xamarin.Android project (in the Xamarin.Forms solution that will be installing our NuGet package). Similar to this functionality: https://docs.microsoft.com/en-us/nuget/reference/nuspec#package-folder-structure
That being said; we cannot find any documentation on the following:

How do we create and populate the contentFiles folder when using a .NET Standard 2.0 library?

Do we create a contentFiles folder in our .NET Standard Library (the source of our NuGet package)?
Do we somehow create the folder with some MSBuild tag in our .csproj file?

Do we need to use a .nuspec file (instead of the convenient '.NET Standard Project > Package window) to generate a NuGet package if we want to insert/update files in the installing project?
Should the resulting contentFiles path be '/contentFiles/any/monoandroid/Resources/values/styles.xml.transform' & '/contentFiles/any/monoandroid/Resources/values/colors.xml.transform' (getting the transform idea from here: https://docs.microsoft.com/en-us/nuget/create-packages/source-and-config-file-transformations#xml-transforms)

All-in-all it has proven very difficult to find the necessary documentation for us because we are new to NuGet package creation. We don't even know what we need to search the docs for, thus finding the applicable docs is darn near impossible.
It would be great if there was a more explanatory (beginner-friendly) doc for how to use contentFiles in packages targeting Xamarin when using .NET Standard to generate said packages.
Thank you,
-Derek

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

ID: 41c84374-f2c0-0c70-5acf-15f51e6075ae
Version Independent ID: 64d29811-909e-4ac9-9ecc-a01e46cdbbb5
Content: Manually Creating NuGet Packages for Xamarin - Xamarin
Content Source: docs/cross-platform/app-fundamentals/nuget-manual.md
Product: xamarin
GitHub Login: @asb3993
Microsoft Alias: amburns

Hi @dfoulk, unfortunately I don't have an immediate answer for you. I have added a note in our backlog to revisit this topic to see what we can add regarding ContentFiles – thank you for the suggestion.
In the meantime, you might try posting on Developer Community or the Xamarin Forums for support.


Use payment expiry to clean payments table

When deleting payments, we remove the payments older than a day that are pending.
We could be more precise because invoices have a expiry value... if we force an expiry time for the invoices we create on any backend wallet (let's say, 30 minutes), then we can clean the database faster: it would improve the "Checking pending transactions..." step when you enter a wallet.

I'd also suggest adding a (maybe  configurable) buffer to the timeout that can be useful when investigating payment issues. Possibly with a way to temporarily disable cleanups.

different use cases needs different expiry times, i would like to see a default value and the optional possibility to set a custom expiry value on invoice creation.

The default should be sufficiently long IMO. 24 hours, maybe even more.

This apparently was done on 4855e2cd.
This is how it looks like now:
https://github.com/lnbits/lnbits/blob/2dfae9ecc1f7f1ac6bd4210f6c841da26914b4ec/lnbits/core/crud.py#L200-L224


Only add double-click event listener if showOnRightClick is false

See #168
Recreated PR because I messed up the previous branch.

Closing due to inactivity.

Sorry about that


Infer declarations are allowed in generic constraints, but do not infer generic constraint types

TypeScript Version:  4.0.2

Search Terms: generic constraint, extends infer
Code
type InferGenericConstraint<Fn> =
    Fn extends <T extends infer Constraint>(arg: T) => any
        ? Constraint
        : never;

type GenericFunctionExample = <T extends number>(arg: T) => void;

type InferredConstraint = InferGenericConstraint<GenericFunctionExample>;

Expected behavior:

Preferred: InferredConstraint is number.
Alternative: infer declaration is disallowed within a generic constraint clause.

Actual behavior: InferredConstraint is never
Playground Link: https://tsplay.dev/gWoYlN
Related Issues: #1213

In version 4.2.0-dev.20201115, InferredConstraint is unknown rather than never. I tried a large number of variations, but none of them can work around the fundamental fact that the type inferred for the constraint just isn’t right.
Things I tried:
type ConstraintOf<Fn extends <S>(arg: S) => any> = Fn extends <S extends infer Constraint>(arg: S) => any ? Constraint : never;

type ConstraintOf<Fn extends <S extends unknown>(arg: S) => any> = Fn extends <S extends infer Constraint>(arg: S) => any ? Constraint : never;

type ConstraintOf<Fn extends <S extends Constraint, Constraint>(arg: S) => any> = Fn extends <S extends infer Constraint>(arg: S) => any ? Constraint : never;

type ConstraintOf<Fn extends <S extends Constraint, Constraint>(arg: S) => any> = Constraint;

Personally, my goal here is to be able to take a generic function (known to be of the form <S extends Foo>(arg: S) => Bar, where Foo and Bar can vary, and be able construct a new function that takes the same argument, with the same constraint, but returns something else.
Specifically, I am working on a compose function that can handle (this one specific case of) generic functions, i.e.
export function compose<Constraint, A, B>(a: <S extends Constraint>(arg: S) => A, b: (a: A) => B): <S extends Constraint>(arg: S) => B;

Generalizing this requires higher-order kinds, but it seems to me that this specific use-case should not. I just want to extract the constraint (known to be that one single value), and use it in another type.
This almost works:
declare function first<S extends { foo: 42; }>(arg: S): S & { bar: 3; };
declare function second<S>(arg: S): S & { baz: 'test' };
const test = compose(first, second);

Then test has the type <S extends unknown>(arg: S) => S & { bar: 3; } & { baz: 'test' }.
Ironically, the unknown that we now get is arguably worse than the never obtained in 4.0.2: it means that my test function here can be called with any value, despite being written as requiring something that extends { foo: 42; }. At least with never, it will never be really call-able without shenanigans.

Well, I found a workaround for the constraint, though it doesn’t solve my compose issue entirely.
type ConstraintOf<Fn extends <S extends any>(arg: S) => any> = Fn extends (arg: infer Arg) => any ? Arg : never;

Now ConstraintOf<<T extends number>(arg: T) => void> evaluates to number. So that solves the problem that @lazytype was working on.
(The bug should stay open because as far as I can tell, the other variations on this idea should have worked, too, and it’s kind of madness that this one worked and those didn’t. If anything, this version makes way less sense.)
However—and maybe this is now a separate discussion—my compose still does not work right.
If I declare my compose function as
export function compose<Fn extends <S extends any>(arg: S) => any, B>(
  a: Fn,
  b: (a: ReturnType<Fn>) => B,
): <S extends ConstraintOf<Fn>>(arg: S) => B;

then we lose the ability to “carry forward” the type of the actual S into the return types of each function and thus the final return of the result. For example,
declare function first<S extends { foo: 42; }>(arg: S): S & { bar: 3; };
declare function second<S>(arg: S): S & { baz: 'test' };
const test = compose(first, second);

Here, test has the type <S extends { foo: 42; }>(arg: S) => { foo: 42; } & { bar: 3; } & { baz: 'test'; }: no S & as there should be. The problem here seems to be that ReturnType<Fn> fixes S to exactly the constraint—which is probably the exact same mechanism that allows this ConstraintOf to work.
Attempting to define compose as
export function compose<Fn extends <S extends any>(arg: S) => A, A, B>(
  a: Fn,
  b: (a: A) => B,
): <S extends ConstraintOf<Fn>>(arg: S) => B;

fails—A is inferred as unknown.
We can go further, with
export function compose<Fn extends <S extends any>(arg: S) => A, A, B>(
  a: Fn & ((arg: any) => A),
  b: (a: A) => B,
): <S extends ConstraintOf<Fn>>(arg: S) => B;

Now A actually gets a real value—but again only as { foo: 42; }, not S & { foo: 42; }, so no improvement over the first iteration.
And at this point I’d give up, and assume that carrying S forward the way I want would subtly require higher-order kinds behind the scenes or something—except it doesn’t. If I don’t care about constraints, and define compose as
export function compose<Initial extends any[], A, B>(a: (...args: Initial) => A, b: (a: A) => B): (...args: Initial) => B;

then it will carry the S through just fine, albeit without any constraints—which is honestly kind of crazy! Though this is a good-crazy, because that would be a way more convenient way to capture generic arguments and allows for manipulation of generic functions. If only it captured the constraint, we’d be good to go.
But I cannot figure out any way to combine these two to get both benefits at once.


“Property 'neo' does not exist on type 'Window & typeof globalThis'.ts(2339)”

Hello,
I am trying to follow the tutorial on the Readme page. The goal is to utilize BaseDapi in my app.
My code looks like the following:
import { BaseDapi } from '@neongd/neo-dapi';

export const demo =() => {
    const dapi = new BaseDapi(window.neo);
 return (
      dapi,

    );
  }

However, I get a red underline under '.neo' with the following error: “Property 'neo' does not exist on type 'Window & typeof globalThis'.ts(2339)”
This error is still there if I change to 'window.onegate', etc.
Any idea why this error is showing up and how to fix?
Thanks,
Rob

This is a TypeScript error message indicating that the default window object does not have a 'neo' property.
To resolve this error, you can add a declaration in the module where you need to use this property.
declare const window: Window & {
  neo?: Provider;
};

Alternatively, you can add this declaration to a global declaration file that can be used throughout your application.
interface Window {
  neo?: Provider;
}


Upgrade NDI to v5

Goal:

[x] Take advantage of GPU pipeline: "To the degree possible, hardware acceleration of streams uses GPU-based fixed function pipelines for decompression and is supported on Windows, macOS, iOS, tvOS platforms; all GPUs on these platforms are supported with special case optimized support for Intel QuickSync and nVidia. However, this is not required, and we will always fall back to software-based compression and decompression."
[ ] At the moment, the camera is capturing frames in BGRA, switch to UYVY with Accelerate if possible. "Use UYVY or UYVA color if possible, as this avoids internal color conversions. If you cannot generate these color formats and you would use the CPU to perform the conversion, it is better to let the SDK perform the conversion."

NDI automatically takes care of GPU access, no APIs found.

Moving away from BGRA does not lower CPU usage on iOS.

Last commit for v5 update https://github.com/rampadc/NDISenderExample/commit/bff1203c7b13b5a0261ab7043deaf2d2e5a5130a

Switched camera format to UYVY


rewrite in functional style

unclear why changes are lost
https://github.com/moonbitlang/core/pull/891#issuecomment-2308864108
cc @guuzaa

Pull Request Test Coverage Report for Build 2972
Details

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

Totals

Change from base Build 2968:
0.03%

Covered Lines:
3894

Relevant Lines:
4652

💛  - Coveralls

Thank you! I appreciate your feedback on the style. You know, I'm new to moonbit.  But why doesn't binary_search call binary_search_by? In my opinion, doing so could reduce duplication.

@guuzaa yes, you are right, but for core library, the predictable preformance matters, even though the optimizer could inline it.


Is there any way to deal with errors/exceptions raised in the pipeline tasks?

I realize that these are just shell scripts.. but not clear how to manage errors (some of which may invalidate the remaining tasks).  Otherwise.. pretty cool.

wait.. so the shell script should return a 1 or FALSE or set some exit code.. will this cancel the pipeline?  It looks like run() will return false if the shell command returns false

Yes, the behavior is the following:
A Task fails as soon as one of it's Commands fails (https://github.com/mara/data-integration/blob/master/data_integration/pipelines.py#L102).
This by default means that the shell command of a Command returned a non-zero exit code (https://github.com/mara/data-integration/blob/master/data_integration/pipelines.py#L66).
When a Task fails, the pipeline execution waits until all currently running Task finish (https://github.com/mara/data-integration/blob/master/data_integration/execution.py#L135)
We still need to implement a "continue on error" behavior for pipelines, see #6


Feature Request: Stop users from running commands outside of the target VC

This would keep the scope of the bot limited to the users who are actually using it.

Should be an easy one to implement. I was actually meant to do this a bit ago but completely forgot. Should have this done by today.


Add exception verbose log

Not really thread savvy here, please take a look to https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.catch on how to put the decorator at the beginning of the thread.
And no idea to how include loguru as dependence.


Switch proxies to LazyGhostTrait

Q
A

Type
improvement

BC Break
no

Fixed issues
Replace #2692

Summary
Use the LazyGhostTrait from symfony/var-exporter to generate lazy proxy classes.

[x] Add LazyGhostProxyFactory that implements the ProxyFactory interface and use it by default
[x] Add configuration to switch back to Proxy Manager, and run the test suite with this it
[x] Deprecate using proxy manager, to be removed in 3.0
[ ] Add documentation (including Autoloading Proxies)
[ ] Review implementation to ensure property hooks and native lazy ghost will not require any breaking change. Using the ORM PRs as reference implementation https://github.com/doctrine/orm/pull/11652 and https://github.com/doctrine/orm/pull/11659
[ ] Fix job names for the new matrix variable lazy-ghost-objects

Considering the unchecked checkboxes in your initial PR description, is this a WIP?

I've just rebased this PR.
The bundle will need an update to register the autoloader.
Regarding native lazy objects and prop hooks PR on ODM, I think the approaches are not conflicting this this PR.


Flickering List in iphone X only

react : 16.3.1
react-native : 0.55.2
react-native-swipe-list-view : 1.1.0
Only in Iphone X, in real device as well as in simulators list flickers whenever i navigate to another screen and come back
Video Link

Hey @rf1804 I see the flickering you're talking about but I'm not sure this is a  issue. It looks like the little white bar at the bottom of the list is flickering. I would suggest swapping out the  with a  or  to isolate the problem and see if it is really a problem with this component.
I'd be happy to help try to figure it out if you want to post some code. Thanks!

Hey @jemise111 thanks for the reply, i was also not sure earlier that what is causing this flickering so first i removed fab button but that still happened, so i colored bottom tab bar as u also pointed i was also thinking that white part is of tab bar but it wasn't, den i commented the swipe list and problem does not occured, so i tried 2 3 times to check is it really coz of swipe list only and i found that whenever there is swipe list and i navigate to some screen and come back it starts flickering, i think in iphone x it is not able to get right size, it is constantly calculating and flickering for 10 to 20 seconds and den it becomes normal.

Hm that's very strange. Did you try swapping out the  with a  to isolate the problem?
You could also try setting a fixed height on the List, or playing with the initialListSize prop and setting it to a higher value than the default.

@jemise111 as u said i tried using <FlatList> to check is it a bug of <SwipeListView> or not, but using <FlatList> also it occurs means either it's because navigation library react-native-navigation or with react-native.
I've opened a issue in react-native-navigation hope to solve it soon.

initialListSize prop did the partial work, it does not flicker now but that white part comes up on screen push and den goes down on next screen push

i guess the problem was it is not getting the proper height to calculate number of rows to render and coz of iphone X padding it was flickering as it was confused between actual height

@jemise111 as u said i tried using <FlatList> to check is it a bug of <SwipeListView> or not, but using <FlatList> also it occurs means either it's because navigation library react-native-navigation or with react-native.
I've opened a issue in react-native-navigation hope to solve it soon.

initialListSize prop did the partial work, it does not flicker now but that white part comes up on screen push and den goes down on next screen push

i guess the problem was it is not getting the proper height to calculate number of rows to render and coz of iphone X padding it was flickering as it was confused between actual height

Interesting.. well if you don't mind since this isn't an issue with this library I will close this. If you find any more issues feel free to re-open.
If I were you I would try to set fixed heights on everything - the main screen, the tab bar, and the list. Maybe some combination of fixed heights + initialListSize can do the trick. Good luck!

@jemise111 i tried giving fixed height but no luck, even for to find out what is that white part i've even given background color to every component but i've not able to find from where that white part comes.

Any updates on this?

just give height: '100%' instead of flex:1 of main container, somehow it worked


[AzureMonitorDistro] prep distro release 1.2.0-beta4

Changes

Updated with the latest beta version of Exporter released last week.
The versioning script complained that we had no Changelog entries for this release. I summarized all the work.
The versioning script sorted the releases in our Changelog. We did a hotfix (1.1.1) a few weeks ago. When I merged that change into main, I sorted by version. The script sorted by date.
The deprecated Azure.Monitor.OpenTelemetry.LiveMetrics package was still in the Package.Data.props. Removed.

API change check
API changes are not detected in this pull request.


App update not syncing with Google Play Store

GIVEN I have enabled 'silent' System Updates in Owner Profile
AND I have installed a new profile with Google Play and Google Play Services (Sandboxed)
WHEN see  'Apps are up-to-date' as a silent notification
AND I check the Google Play Store updates
THEN I see that App updates can be installed/and are not up to date
Expected:
The app update and google play need to sync.
Provide secure delivery method for attachments

Our app repository client is an entirely separate thing from the Play Store.

@thestinger Sorry I'll redraft, that's not what I mean

Redrafted but can't reopen, so new issue


Incorrect parameter on chart deployment

The helm chart adds the parameter --service-account-name which seems to not exist, since the pod fails with the error Critical error: flag provided but not defined: -service-account-name. What could be the fix?

The problem is that, the service account flag had been added in this commit on August 29.
But the chart use image 0.0.17(https://github.com/rancher/local-path-provisioner/releases/tag/v0.0.17) released 14 Aug.
So, the helm chart is for a unreleased version of the app.
In the docker registry, there is no images for nightly, or snapshots.
This chart is basically broken

I just built and publish a docker image bclermont/local-path-provisioner:b821f90-amd64 and the chart works now

This can be closed since there's updated images.


.EnterpriseLibrary.Data.Database  error when running mvc core application

Hi,
I get the following error when I use EnterpriseLibrary.Data.Database library in the class library that called for MVC core application, the logic worked fine with the old web project.
AN EXCEPTION HAS OCCURRED  WITH ERRORCODE: Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Data.Database", name = "Configuration".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The type Database cannot be constructed. You must configure the container to supply this value.

EnterpriseLibary is deprecated and was never written with Core in mine. I don't believe it's maintained anymore, so there's not much Core can do.


Feat/more response types

Adds an ApiError type for deserialising REST API errors. There's an enum in there for pulling specific properties of interest off. If it doesn't recognise the response type then it'll just return the serde_json::Value.
Renames Response to QueryResponse and adds GetDocResponse for calls to /index/type/id
Fleshes out Hit type with more meta properties
Uses Hit type by default in Response
Rename fields to not start with an _. In Rust, a field that starts with _ means it's unused and you'll get compiler warnings if you do anything with it. Instead I'm using sere attributes to rename them so they still parse properly

I also ran cargo fmt over the source.

I also haven't implemented the standard Error trait for ApiError, because I was planning to create an error_chain for this library that would wrap it up. That'll take care of any unwrap()s when parsing aggregations too.

Sorry I probably could've broken this PR up into smaller pieces but I got on a roll :)

I'm going to tweak the error type a bit so it's nicer for pattern matching.

Hmm, now I'm wondering if QueryResponse should really be called SearchResponse...

@KodrAus apologies for the delayed response, have been swamped at work - reviewing now - it looks awesome.

@KodrAus ok, merged, please add yourself to the authors, I think at this point it more accurately reflects the situation :-)

@stephanbuys no problem! I've gotten into a bad habit of starting a PR and then snowballing a bunch of random things into it as I think of them. It makes it hard to focus on certain things so I'll try get out of that :+1:


training using celeba, testing using custom dataset

if I using the model trained by celeba to test my custom images, will it get good results?

if I using the model trained by celeba to test my custom images, will it get good results?

I should remind that this model is trained by the aligned CelebA dataset. The results on your custom images may look weird on attributes such as Mouth_Slightly_Open, Mustache, etc., but should be okay on attributes like Hair_Color, Pale_Skin if the face is the main part of your image.
Maybe your can try training the model on the unaligned CelebA dataset.

thank you for your reply, if I aligned my custom dataset, may it will get better results? and more, if the methods of gan can not work well out of training  data?

@maliho0803 First, you should align your dataset as the CelebA manner. Second, you should provide accurate attributes of your dataset. It is inconvenient for users to do these and therefore a drawback of this project. I will improve it when I have a free time.

@LynnHo when testing, needed images labeled attributes?

@LynnHo when testing, needed images labeled attributes?

Yes.

@LynnHo how do you labeled LFW datasets?

@LynnHo how do you labeled LFW datasets?

I use an attribute predictor trained on CelebA.

@LynnHo Could you share the predictor trained on CelebA?Thank you for any help!

Maybe you can find what you want in #11

@huxianer Yes, as @CastellanLiu said, you may refer to #11. Or here is an attribute classifier from STGAN which has the same protocol of our AttGAN.

Thanks!

hey @maliho0803 , did you try this on your custom dataset? If yes, then were the results satisfying? Also, can you share your the modified files?


Add option to delete files on upload/download

Currently, if we upload a local hierarchy to Drive, delete a file locally, and then re-upload, the copy of the file on Drive isn't deleted. We should add an option to delete the copy on Drive (and to do the converse when downloading, if the file was deleted on Drive).

I second that this would be very useful. If a source file or folder had been deleted, allow one to force it's deletion, on the destination side.
-similar to rsync --delete or --delete-after

+1
I like this tool pretty much but without an rsync --delete-like option it is completely useless for backup purposes.

I wouldn't say it's "completely useless for backup", because of this. I mean . . . snapshotting is a way to allow recovery of files you accidentally deleted. Here, they (the ones not clobbered with updated version) are never deleted in the first place. ;-)
But lack of this option is a bit of a deal-breaker, for one-way mirroring.
I'm new to golang, but looking through the code, I can see where/how mappings are created/used between Drive and local paths. It's not as trivial as adding some code to existing loops, because you need to deal with items no longer being mapped (because they're not there). But it looks like an os.___ module method might/must be available to recursively retrieve all the local paths under a directory. With that, you need to just process any items in one mapping/group, which are not in the other. The current mapping I see in download.go (logically) uses the Drive file ID as the keys. It seems we might want to reverse/convert such a map so that the values become the keys, so as to make the checking not have to rely on (slow) string matching. I was thinking about forking and creating a removeDeleted() function, which could would be called from the upload and download modules, if a -remove-deleted flag was set. -then create a pull request. But I'm not sure I'll have the time, and Matt might have a better, cleaner, more logical way in mind to incorporate such functionality into his code. :-)

I've always been wary of adding this, since a bug in the deletion code
could have fairly catistrophic effects. I'm happy to give it my best try to
do as carefully as possible if there's demand for this (as there seems to
be), but also always happy to receive pull requests :-)
I haven't thought carefully about how best to implement this, but don't
think it'll be too complicated. I'm just about done with some changes to
cache information about the files stored on Drive that makes most
operations much faster, but am happy to dig into this once that lands...
Thanks,
Matt
On Wednesday, April 1, 2015, bdklahn<EMAIL_ADDRESS>wrote:

I wouldn't say it's "completely useless for backup", because of this. I
mean . . . snapshotting is a way to allow recovery of files you
accidentally deleted. Here, they (the ones not clobbered with updated
version) are never deleted in the first place. ;-)
But lack of this option is a bit of a deal-breaker, for one-way mirroring.
I'm new to golang, but looking through the code, I can see where/how
mappings are created/used between Drive and local paths. It's not as
trivial as adding some code to existing loops, because you need to deal
with items no longer being mapped (because they're not there). But it looks
like an os.___ module method might/must be available to recursively
retrieve all the local paths under a directory. With that, you need to just
process any items in one mapping/group, which are not in the other. The
current mapping I see in download.go (logically) uses the Drive file ID as
the keys. It seems we might want to reverse/convert such a map so that the
values become the keys, so as to make the checking not have to rely on
(slow) string matching. I was thinking about forking and creating a
removeDeleted() function, which could would be called from the upload and
download modules, if a -remove-deleted flag was set. -then create a pull
request. But I'm not sure I'll have the time, and Matt mi ght have a
better, cleaner, more logical way in mind to incorporate such functionality
into his code. :-)
—
Reply to this email directly or view it on GitHub
https://github.com/google/skicka/issues/4#issuecomment-88635414.

Thinking about local vs remote path differences, makes me think about Python sets. -loading each collection of paths into a set, then taking the set difference, to get the ones to delete. I came across these:
https://godoc.org/github.com/juju/utils/set
https://github.com/deckarep/golang-set
I'm not sure if these are overkill, or if it is worth adding another dependency, but . . .
I guess the result of a potential bug, at least on uploads, might be mitigated by sending to the GDrive "Trash" folder, as long as the person notices, and retrieves the file, before its Trash lifetime expires. Otherwise one could create/use a special .skickaTrash folder (either end), and maybe have something like a "-trash-removed-files" as well as a "-delete-removed-files" option. . . . Then (haha), I suppose an "-empty-trash" option might be useful. :-)
I'm guessing your cache update, stores local hashes of local files. Anyway, significant speedups are always welcomed, when it comes to file transfer. skicka was already doing pretty good, compared to grive, gsync, etc. -maybe just because it is a compiled language.
Best,
Brian


[WIP] tizen library

First steps to bring tizen-library work into our master branch
Leaving alone tangram-library branch, since we might need that for pre-multiple instances work, until we finalize tizen plugin work for that.

[ ] Some cleanup required of the generic gl header. We still might have to stick around with the redefinition of gl methods to use evas_gl_api.

Thoughts on merging this branch to master.
Someone should give this a look and merge to master. Its getting really complicated to get tizen feature work done on tangram without creating multiple branches and keeping a track of it. Also causes confusion amongst others who are building tangram code for some tizen work.
Currently I have created an old-rb-tizen-library branch which reflects the one currently on gerrit top. There should not be any other "tizen-library" branch sitting around in remote origin.

Ah yes, this is a much more sensible way to redefine the GL functions. +1

This branch has been sitting around for long enough and been tested enough through the tizen maps plugin that we should consider merging it.
The only serious concern I still have is the GL abstraction layer; it seems regrettably verbose and error-prone, especially if we expand the set of GL symbols that we use (note that we will certainly need to do this in the near future, e.g. for framebuffers).

Agreed, also as previously stated :D.
I would wait on getting the curl stuff in with this PR.

Will spend some time today to prune some of the gl headers here.

Rebased this with master. Tested this build with tizen emulator and device.
@hjanetzek can you also confirm this? Once done we can merge this.


Update README.md

I made some grammatical corrections.

Thank you. Documentation will be updated in the next version.


i want install php 8 but i get error

brew config output
HOMEBREW_VERSION: 3.5.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3748bed378401ed75abdf32bcb3d2674d854a6f9
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: d34f256c875a95d03d4d5fda9c54e14c1a52446c
Core tap last commit: 17 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: octa-core 64-bit sandybridge
Clang: 10.0.0 build 1000
Git: 2.37.2 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.13.6-x86_64
CLT: <IP_ADDRESS>.1.1539992718
Xcode: N/A

brew doctor output
.
  .
  .
Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

Verification

[X] I ran brew update and am still able to reproduce my issue.
[X] I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?
i want install php 8 because my php version is 7 and i want install laravel9
What happened (include all command output)?
every thing was good but in end i get this error:
curl: (22) The requested URL returned error: 403
Error: webp: Failed to download resource "webp"
Download failed: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz
What did you expect to happen?
I expected PHP 8 to be installed
Step-by-step reproduction instructions (by running brew commands)
brew install<EMAIL_ADDRESS>

You've already posted about this same error less than a day ago: https://github.com/Homebrew/discussions/discussions/3552
Posting in multiple places under the same organization, while ignoring suggestions that have already been given, won't get your problem solved any faster. Why don't you actually try @carlocab's suggestions in the other thread, and follow up there instead?


chore: Run ITs on diffs between latest and the branching commit

Tries to fix: https://github.com/googleapis/google-cloud-java/issues/8640
This should help speed up the ITs. The original logic would find the diffs between the TARGET_BRANCH (generally main) and the latest commit in PR branch. If the TARGET_BRANCH has been updated and progressed, the ITs will add in those changes as diffs even if it's not related to the changes done in the PR branch.

I think you also need to fix the root pom logic. The root pom is now in google-cloud-jar-parent.

I think you also need to fix the root pom logic. The root pom is now in google-cloud-jar-parent.

Ah nice catch! I'll update that.

google-cloud-pop-parent too probably.

google-cloud-pop-parent too probably.

Ah yep, I see that shared-config is in pom-parent and not jar-parent. Adding in now.

Does this take care of native image test?

Does this take care of native image test?

Presubmit native tests only run AI Platform or Compute. The nightly job runs all modules and doesn't use the existing diff logic.

Does this take care of native image test?

Presubmit native tests only run AI Platform or Compute. The nightly job runs all modules and doesn't use the existing diff logic.

I guess @suztomo is asking whether these would be skipped unless there are changes to the parent poms or compute/aiplatform.

Does this take care of native image test?

Presubmit native tests only run AI Platform or Compute. The nightly job runs all modules and doesn't use the existing diff logic.

I guess @suztomo is asking whether these would be skipped unless there are changes to the parent poms or compute/aiplatform.

Ah I see, I was resolving a different issue with the diffs. I'll add in the diffs for native tests

Thanks. Yes, I feel most of the presubmit native image test run (java-compute and java-aiplatform) in most pull requests are unnecessary.

Thanks. Yes, I feel most of the presubmit native image test runs (java-compute and java-aiplatform) in most pull requests are unnecessary (#8640).

Yeah, I agree that the module specific native checks don't need to be run on every PR, especially ones that don't affect Compute/ AI-Platform. With this change in, we should pay more attention to the nightly builds.


Serve Failure on MacOS

Problem description
Unable to serve, fails on TypeError: networkUtils.qualityFromDB is not a function.
Environment

Tabris.js version: nightly (3.0.0-beta2-dev.20190228)
OS: macOS Sierra 10.12.6

Console Output
News-MacBook-Pro:Documents developer$ git clone https://github.com/raphaelpreston/TabrisExample.git
Cloning into 'TabrisExample'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 23 (delta 5), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (23/23), done.
News-MacBook-Pro:Documents developer$ cd TabrisExample/
News-MacBook-Pro:TabrisExample developer$ ls
cordova		package.json	src
News-MacBook-Pro:TabrisExample developer$ npm install
npm WARN deprecated<EMAIL_ADDRESS>CircularJSON is in maintenance only, flatted is its successor.
npm notice created a lockfile as package-lock.json. You should commit this file.
added 131 packages from 139 contributors and audited 203 packages in 4.901s
found 0 vulnerabilities

News-MacBook-Pro:TabrisExample developer$ tabris --version
3.0.0-beta2-dev.20190227
News-MacBook-Pro:TabrisExample developer$ tabris serve
[/Users/developer/Documents/TabrisExample] npm run --if-present build
/usr/local/lib/node_modules/tabris-cli/node_modules/node-wifi/src/mac-current-connections.js:14
            connection.quality = networkUtils.qualityFromDB(parseInt(line.match(/[ ]*agrCtlRSSI: (.*)/)[1]));
                                              ^

TypeError: networkUtils.qualityFromDB is not a function
    at /usr/local/lib/node_modules/tabris-cli/node_modules/node-wifi/src/mac-current-connections.js:14:47
    at Array.forEach (<anonymous>)
    at parseAirport (/usr/local/lib/node_modules/tabris-cli/node_modules/node-wifi/src/mac-current-connections.js:11:11)
    at /usr/local/lib/node_modules/tabris-cli/node_modules/node-wifi/src/mac-current-connections.js:42:40
    at ChildProcess.exithandler (child_process.js:285:7)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:610:12)

This should be in https://github.com/eclipsesource/tabris-js-cli/
Looks like an issue with one of the dependencies: https://github.com/friedrith/node-wifi/issues/57
As a workaround you can modify the selectAddressForQRCode() function in  /usr/local/lib/node_modules/tabris-cli/src/services/ServerInfo.js so that it is just one line:
return Promise.resolve(this.externalAddresses[0]);

The QR code might not be pointing to the best address though.


where is the "ags" bar  in my "1200*1920" screen?

Is that dotfile config for 1920*1080?

Try
killall ags
ags

and post log


added example of configuring keycloak from scratch, WIP

Related to #42

Closing, moved to the new repo: https://github.com/defenseunicorns/pepr-capabilities/pull/8


Fix pg_regress tests on a cloud staging instance

Problem
pg_regress tests start failing due to unique ids added to Neon error messages
Summary of changes
Patches updated

Do you have a link to a PR/discussion about it?

Yes, https://github.com/neondatabase/cloud/pull/21501


Further Development

Hey @VincentDebug 👋🏻 Great to see exploration into this feature. Is it something you'd potentially like to collaborate on further?

Hey @VincentDebug 👋🏻 Great to see exploration into this feature. Is it something you'd potentially like to collaborate on further?

Hi, thanks for showing interest in my project! I'm definitely open to exploring further collaboration. Could you please let me know which aspects of the project or features you're interested in?

Cool 🙌🏻 Quite a few potential directions for developing this, maybe not best suited to GitHub - would it be possible to chat through those via discord or similar? Links in bio (we’re an early ord collection, so lots on the roadmap!)


Manual run. cannot import name ExtrensionManager

When I perform a manual run I get the below error:
shoppc@shoppc:~/Documents/sickbeard_mp4_automator$ sudo python manual.py -h
Traceback (most recent call last):
File "manual.py", line 5, in
import guessit
File "/usr/local/lib/python2.7/dist-packages/guessit/init.py", line 99, in
from guessit.plugins import transformers
File "/usr/local/lib/python2.7/dist-packages/guessit/plugins/transformers.py", line 27, in
from stevedore import ExtensionManager
ImportError: cannot import name ExtensionManager
This error occurs when I put a file path in the common also.
Can anyone point me in the right direction on this one?
Thanks

Need to install stevedore. It's one of the dependencies.
'pip install stevedore'
Sent from my iPhone

On Jan 25, 2016, at 21:30, Madseason41<EMAIL_ADDRESS>wrote:
When I perform a manual run I get the below error:
shoppc@shoppc:~/Documents/sickbeard_mp4_automator$ sudo python manualpy -h
Traceback (most recent call last):
File "manualpy", line 5, in
import guessit
File "/usr/local/lib/python27/dist-packages/guessit/__init__py", line 99, in
from guessitplugins import transformers
File "/usr/local/lib/python27/dist-packages/guessit/plugins/transformerspy", line 27, in
from stevedore import ExtensionManager
ImportError: cannot import name ExtensionManager
This error occurs when I put a file path in the common also
Can anyone point me in the right direction on this one?
Thanks
—
Reply to this email directly or view it on GitHub.

Sorry, should have specified....
Requirement already satisfied (use --upgrade to upgrade): stevedore in /usr/local/lib/python2.7/dist-packages

I have changed permissions of the entire dist-packages directory and still get hung up on the above line.
Any other ideas?

Make sure the python environment you've installed stevedore under is the same environment that the script is being executed from. Otherwise I would try uninstalling and reinstalling stevedore
Sent from my iPhone

On Jan 26, 2016, at 12:04, Madseason41<EMAIL_ADDRESS>wrote:
I have changed permissions of the entire dist-packages directory and still get hung up on the above line.
Any other ideas?
—
Reply to this email directly or view it on GitHub.

Likely a python environment error

unistall it and install it again.its worked for me


Request cursor position logic?

VDU 23,0,&82 is "request cursor position" - the code is hard-coded right now to return the text cursor position, however it's possible to swap the active cursor to the graphics cursor.
This should probably change to use activeCursor

Further thinking on this is that the current functionality is probably fine, as this returns a character position, not a pixel position.  The documentation is at fault in it's description.
If it's useful, adding a "request active cursor pixel position" call could be added.


Dockerized version of .travis.yml

Lets learn about the 3 Rs by implementing Docker with Travis.

Close


Closing streams to avoid testing issues

Stack from ghstack (oldest at bottom):

-> #6128

GC workaround is not working inside of test environments as they are keeping references to FH. So we have to close FH manually.

Rebased, would be nice to land to clean torchdata's dependency tests.

If we have reached consensus on everything, I can take over and implement it if you want me to.

@VitalyFedyunin In #6647 I redid this PR with all my suggested changes. We can take the discussion there if you want.

Superseded by #6647.


AzDO Rate Limiting Handling

Azure DevOps being a SAAS, rate limiting applies and for large amounts of work items (the reason a tool like this is handy :P) it will impact the ability of the tool to get all the way through the import step.
How to properly handle through AzDO response headers:

https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rate-limits?view=azure-devops
Responses give a nice way to adjust throttling in API workflow, the hard part is the M$ TFS libs encompass handling of responses.

Work Arounds and thoughts

Will add artificial throttling to my code when processing new items. (sleep waits)

AB#5328

This is above my knowledge, but perhaps @madkoo or @MOlausson can look into it?

I got around this by introducing a sleep between each item imported
https://github.com/solidify/jira-azuredevops-migrator/blob/master/src/WorkItemMigrator/WorkItemImport/ImportCommandLine.cs#L150

To do: add an option to induce a sleep() to artificially throttle the application. This should be controlled from the configuration.


ReferenceError: weakly-referenced object no longer exists

🐛 Bug

We have seen this error message but it goes off and on. I think it is related to https://github.com/pytorch/pytorch/issues/80594. I also think that there is a connection to the PyTorch's multi threading spawn
Some of the errors I got

 git:(main) ✗ python issue338.py
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/rasterio/__init__.py:220: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix be returned.
  s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pandas/core/frame.py:3607: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._set_item(key, value)
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pandas/core/indexing.py:1817: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._setitem_single_column(loc, value, pi)
There are 598 training crown annotations
There are 176 test crown annotations
Reading config file: deepforest_config.yml
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  warnings.warn(
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=RetinaNet_ResNet50_FPN_Weights.COCO_V1`. You can also use `weights=RetinaNet_ResNet50_FPN_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Model from DeepForest release https://github.com/weecology/DeepForest/releases/tag/1.0.0 was already downloaded. Loading model from file.
Loading pre-built model: https://github.com/weecology/DeepForest/releases/tag/1.0.0
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py:228: LightningDeprecationWarning: The `LightningModule.on_epoch_end` hook was deprecated in v1.6 and will be removed in v1.8. Please use `LightningModule.on_<train/validation/test>_epoch_end` instead.
  rank_zero_deprecation(

  | Name  | Type      | Params
------------------------------------
0 | model | RetinaNet | 32.1 M
------------------------------------
31.9 M    Trainable params
222 K     Non-trainable params
32.1 M    Total params
128.592   Total estimated model params size (MB)
Sanity Checking: 0it [00:00, ?it/s]/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:225: PossibleUserWarning: The dataloader, val_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 16 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/rasterio/__init__.py:220: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix be returned.
  s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pandas/core/frame.py:3607: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._set_item(key, value)
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pandas/core/indexing.py:1817: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  self._setitem_single_column(loc, value, pi)
There are 606 training crown annotations
There are 168 test crown annotations
Reading config file: deepforest_config.yml
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  warnings.warn(
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=RetinaNet_ResNet50_FPN_Weights.COCO_V1`. You can also use `weights=RetinaNet_ResNet50_FPN_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Model from DeepForest release https://github.com/weecology/DeepForest/releases/tag/1.0.0 was already downloaded. Loading model from file.
Loading pre-built model: https://github.com/weecology/DeepForest/releases/tag/1.0.0
/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/configuration_validator.py:228: LightningDeprecationWarning: The `LightningModule.on_epoch_end` hook was deprecated in v1.6 and will be removed in v1.8. Please use `LightningModule.on_<train/validation/test>_epoch_end` instead.
  rank_zero_deprecation(

  | Name  | Type      | Params
------------------------------------
0 | model | RetinaNet | 32.1 M
------------------------------------
31.9 M    Trainable params
222 K     Non-trainable params
32.1 M    Total params
128.592   Total estimated model params size (MB)
Sanity Checking: 0it [00:00, ?it/s]/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:225: PossibleUserWarning: The dataloader, val_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 16 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/runpy.py", line 265, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/henrysenyondo/Documents/GitHub/DeepForest/issue338.py", line 72, in <module>
    m.trainer.fit(m)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 696, in fit
    self._call_and_handle_interrupt(
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 650, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in _fit_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1166, in _run
    results = self._run_stage()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1252, in _run_stage
    return self._run_train()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1274, in _run_train
    self._run_sanity_check()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1343, in _run_sanity_check
    val_loop.run()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 200, in run
    self.advance(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 155, in advance
    dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 195, in run
    self.on_run_start(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 88, in on_run_start
    self._data_fetcher = iter(data_fetcher)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 178, in __iter__
    self.dataloader_iter = iter(self.dataloader)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 444, in __iter__
    return self._get_iterator()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 390, in _get_iterator
    return _MultiProcessingDataLoaderIter(self)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1077, in __init__
    w.start()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
Traceback (most recent call last):
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1163, in _try_get_data
    data = self._data_queue.get(timeout=timeout)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/queues.py", line 107, in get
    if not self._poll(timeout):
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/connection.py", line 257, in poll
    return self._poll(timeout)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/connection.py", line 424, in _poll
    r = wait([self], timeout)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/multiprocessing/connection.py", line 931, in wait
    ready = selector.select(timeout)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/selectors.py", line 415, in select
    fd_event_list = self._selector.poll(timeout)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/_utils/signal_handling.py", line 66, in handler
    _error_if_any_worker_fails()
RuntimeError: DataLoader worker (pid 35925) exited unexpectedly with exit code 1. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "issue338.py", line 72, in <module>
    m.trainer.fit(m)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 696, in fit
    self._call_and_handle_interrupt(
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 650, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in _fit_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1166, in _run
    results = self._run_stage()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1252, in _run_stage
    return self._run_train()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1274, in _run_train
    self._run_sanity_check()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1343, in _run_sanity_check
    val_loop.run()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 200, in run
    self.advance(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 155, in advance
    dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/loop.py", line 200, in run
    self.advance(*args, **kwargs)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 127, in advance
    batch = next(data_fetcher)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 184, in __next__
    return self.fetching_function()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 263, in fetching_function
    self._fetch_next_batch(self.dataloader_iter)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 277, in _fetch_next_batch
    batch = next(iterator)
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in __next__
    data = self._next_data()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1359, in _next_data
    idx, data = self._get_data()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1325, in _get_data
    success, data = self._try_get_data()
  File "/opt/miniconda3/envs/DeepForest_pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1176, in _try_get_data
    raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
RuntimeError: DataLoader worker (pid(s) 35925) exited unexpectedly

Using some other code I get something like

   m.trainer.fit(m)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 696, in fit
    self._call_and_handle_interrupt(
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 650, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in _fit_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1166, in _run
    results = self._run_stage()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1252, in _run_stage
    return self._run_train()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1274, in _run_train
    self._run_sanity_check()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1343, in _run_sanity_check
    val_loop.run()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/loops/loop.py", line 200, in run
    self.advance(*args, **kwargs)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 155, in advance
    dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/loops/loop.py", line 195, in run
    self.on_run_start(*args, **kwargs)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 88, in on_run_start
    self._data_fetcher = iter(data_fetcher)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/pytorch_lightning/utilities/fetching.py", line 178, in __iter__
Sanity Checking: 0it [00:00, ?it/s]    self.dataloader_iter = iter(self.dataloader)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 444, in __iter__
    return self._get_iterator()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 390, in _get_iterator
    return _MultiProcessingDataLoaderIter(self)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1077, in __init__
    w.start()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/opt/miniconda3/envs/py3.10/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

Process finished with exit code 0

To Reproduce

Expected behavior

Environment

Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
pytorch_lightning==1.7.3
torch==1.12.1
torchaudio==0.12.1
torchvision==0.13.1
PyTorch Lightning Version (e.g., 1.5.0):
Lightning App Version (e.g., 0.5.2):
PyTorch Version (e.g., 1.10):
Python version (e.g., 3.9): 3.10
OS (e.g., Linux): macOS Monterey
CUDA/cuDNN version:
GPU models and configuration:
How you installed PyTorch (conda, pip, source): pip
If compiling from source, the output of torch.__config__.show():
Running environment of LightningApp (e.g. local, cloud):
Any other relevant information:

Additional context

Hi

RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

Have you tried what it says here, wrapping your entry point with if __name__ == '__main__':?

def main():
    # your code goes here

if __name__ == '__main__':
    main()

@henrykironde Let me know if my previous answer solved your problem.

the same error,  pl==1.9.0, torch=2.0.1, and how can i solve it? @awaelchli Thanks a lot!
def train(self):
        train_data = self.load_data(self.args.train_data)
        dev_data = self.load_data(self.args.eval_data)
        test_data = self.load_data(self.args.test_data)
        data_model = ImageDataModel(
            train_data, dev_data, test_data, self.tokenizer, self.args)
        self.model = self.model.to(self.device)
        self.trainer.fit(self.model, data_model)```


Too many uncraftables

Suggest adding an option to hide all non-craftable items while in recipe mode.

But a lot of items without recipes are still used to make other things. Items without recipes OR usage, however...


Game crashes.

The game just crashes every time it's inyected. Is there any solution?

Yes code it urself and fix the problems


T8520 Lock disabled after fresh installation

Describe the bug
I performed a fresh install of the Integration. While my cameras, home base, and doorbell are working correctly, my T8520 lock is currently disabled. I see the device in HA, but the lock entity is only displayed under the "Diagnostic" section and is marked as disabled.
To reproduce
Steps to reproduce the behavior:

Fresh install Eufy integration
See that lock entity is disabled

Expected behavior
Lock entity should be enabled, report status, and able to be toggled.
Additional information

Home Assistant Installation Type (OS - Supvervised - Core): Home Assistant Container
Home Assistant Core Version: core-2024.12.0
Eufy Security Add-on Version: latest (sha256:8794ee5090675e7fe3a62ff021e7bec67dce5fdb2f8b18e6d100df1979726614)
Eufy Security Integration Version: Checked out from git repo master branch on 12/4/2024
Using go2rtc Add-on or webrtc custom integration with integrated go2rtc: go2rtc

Hardware Information;
Eufy Lock T8520

Debug Logs from Home Assistant:
Only Eufy related message is:

2024-12-04 13:19:19.533 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'station', 'event': 'disconnected', 'serialNumber': 'T8520Q2021370C9D'}}

Logs from Eufy Security Add-on (either from Add-ons page of Home Assistant or Docker output):

SECURITY WARNING: Reverting CVE-2023-46809: Marvin attack on PKCS#1 padding
2024-12-04 21:18:43.831 INFO    eufy-security-ws        Eufy Security server listening on host <IP_ADDRESS>, port 3000
2024-12-04 21:18:47.143 INFO    eufy-security-ws:eufy-security-client   [http] [Station.onConnect] Connected to station T8424N1021280BC5 on host <IP_ADDRESS> and port 17227
2024-12-04 21:18:47.405 INFO    eufy-security-ws:eufy-security-client   [http] [Station.onConnect] Connected to station T8010P13202729E9 on host <IP_ADDRESS> and port 15783
2024-12-04 21:18:48.744 INFO    eufy-security-ws:eufy-security-client   [main] Push notification connection successfully established
2024-12-04 21:18:49.266 INFO    eufy-security-ws:eufy-security-client   [http] [Station.onConnect] Connected to station T8520Q2021370C9D on host <IP_ADDRESS> and port 25826
2024-12-04 21:18:52.084 INFO    eufy-security-ws:eufy-security-client   [main] MQTT connection successfully established
2024-12-04 21:18:52.176 ERROR   eufy-security-ws:eufy-security-client   [mqtt] Subscribe error for lock T8520Q2021370C9D {
  error: {
    cause: undefined,
    message: 'Error: Subscribe error: Unspecified error',
    context: undefined,
    stacktrace: 'Error: Subscribe error: Unspecified error\n' +
      '    at handleAck (/usr/src/app/node_modules/mqtt/build/lib/handlers/ack.js:101:27)\n' +
      '    at handle (/usr/src/app/node_modules/mqtt/build/lib/handlers/index.js:36:31)\n' +
      '    at work (/usr/src/app/node_modules/mqtt/build/lib/client.js:227:40)\n' +
      '    at writable._write (/usr/src/app/node_modules/mqtt/build/lib/client.js:252:13)\n' +
      '    at writeOrBuffer (/usr/src/app/node_modules/readable-stream/lib/internal/streams/writable.js:334:12)\n' +
      '    at _write (/usr/src/app/node_modules/readable-stream/lib/internal/streams/writable.js:283:10)\n' +
      '    at Writable.write (/usr/src/app/node_modules/readable-stream/lib/internal/streams/writable.js:286:10)\n' +
      '    at TLSSocket.ondata (node:internal/streams/readable:1007:22)\n' +
      '    at TLSSocket.emit (node:events:519:28)\n' +
      '    at TLSSocket.emit (node:domain:488:12)'
  },
  deviceSN: 'T8520Q2021370C9D'
}
2024-12-04 21:18:52.179 INFO    eufy-security-ws:eufy-security-client   [mqtt] Successfully registered to MQTT notifications for lock T8520Q2021370C9D
2024-12-04 21:19:19.530 INFO    eufy-security-ws:eufy-security-client   [p2p] [Timeout._onTimeout] Initiated closing of connection to station T8520Q2021370C9D for saving battery.
2024-12-04 21:19:19.531 INFO    eufy-security-ws:eufy-security-client   [http] [Station.onDisconnect] Disconnected from station T8520Q2021370C9D

Would you share your device with me in case further debugging required? (Yes/No):
Yes

Additional context
I have been using this integration for quite some time without issue, albeit with a much older version. I am in the process of moving my HA installation to a new server and wanted to reinstall the latest integration with it and ran into this issue.

same issue for me, except for the T8502

Looks like I have the same issue with T8531 posted 1263
Does this integration need Home Base? I currently do not have a Home base


WFCORE-2968 add test for domain server auth with elytron configured and no legacy auth realms

retest this please

@bstansberry This one is good to go.


CSGO crashes on injection Ubuntu 22.04 on Parallels VM.

Just as said. I got the latest source, built with cmake on vscode and on injection it crashes CSGO. I will further test.

Ok So newest release of source crashes csgo on ubuntu regardless of VM type.

@danielkrupinski Could you "address" hints on how you find new patterns after the game gets updated?
Using the GDB debugger I don't know where to put the breakpoint(s) to display the corresponding pattern address.
Because I am struggling after each game update the same issue is being created again and again!

Fixed


consistent use of ods:AgentClass

Suggestion
The use of the ods:Agent class seems a bit inconsistent. Many classes have objectProperties pointing to it, but there are still many properties that just offer a single non repeatable text field for an agent name and a separate non repeatable text field for an agent it. These elements could be made more consistent, by replacing them with an object property to the agent class. This would also add the proper connection between the names and identifiers, in case of multiple agents.
These are the items we have identified as suitable for a replacement:

ods:CronometricAge - chrono:chronometricAgeDeterminedBy
ods:DigitalSpecimen - dwc:recordedBy

(there is already a hasAgent property, which could contain this information)

ods:DigitalSpecimen - dwc:recordedByID

as above

ods:EntityRelationship - dwc:relationshipAccordingTo

(in this case there is already the property ods:RelationshipAccordingToAgent, so this would contain duplicate information anyways)

ods:Event - ods:collectorName

(even if this will not be replaced by an hasAgent property, why was a dedicated term defined and not just dwc:recordedBy reused, as it is pretty much the same thing.

ods:Event - ods:collectorID

(even if this will not be replaced by an hasAgent property, why was a dedicated term defined and not just dwc:recordedByID reused, as it is pretty much the same thing.

ods:GeoReference - dwc:georeferencedBy
ods:Identification - dwc:identifiedBy

this is of particular importance as it would allow for multiple agents with different roles to be connected to the identification, which is useful to assign the initial identification and the later verification to different agents.

ods:Identification - dwc:identifiedByID

as above

ods:MaterialEntity- dwc:recordedBy

(there is already a hasAgent property, which could contain this information)

ods:MaterialEntity- dwc:recordedByID

as above

Yes, generally I agree with this idea and it has crossed my mind several times.
However, the dwc terms are widely recognised and used.
We could pull apart these names and put them in the agent (and we probably will do this anyway) but keeping it in the original dwc might significantly help with backwards compatibility/findability.
On the other hand, the vagueness of a dwc:recordedBy (is it the collector or the one the recorded/digitiser) and the issue with multiple agents makes me sway towards removing these fields and use agents only.
In the end it didn't hurt to keep these fields in (and duplicate some data), but it is a good point, and maybe we should reconsider.
The new ods fields for collector I will remove.
I will discuss with the team whether we see a major issue in removing these fields.


PBDKF2 on iPad4 (Air) very slow

When calling key derivation like this
asmCrypto.PBKDF2_HMAC_SHA256.base64(password, salt, it, 16);

with it: 100000, which lasts on a "normal" pc alway less than 2 seconds, my new iPad needs 18 (eighteen!) seconds. Is this the expected behaviour or is there something wrong?

Expected. Safari performance is terrible.

Maybe an upgrade to iOS8 helps.

Yes, indeed. I had iOS7. On iOS 8.1.2 ==> 3 sec :-)