text:
PSNR not working with multiple GPUs and dataparallel

🐛 Bug
(This is a sort of follow up to lightning issue #7257 and torchmetrics bugfix #214)
Hi folks,
I have a problem when using lightning, DataParallel and torchmetrics. When training a small denoising network on MNIST with 2 gpus using DP and torchmetrics to compute training and validation PSNR I get the following error:
RuntimeError: All input tensors must be on the same device. Received cuda:0 and cuda:1
Code for reproduction
import argparse
from typing import Optional
import torch
from torch import nn
from torchvision import transforms, datasets
from torch.utils.data import DataLoader, random_split
import pytorch_lightning as pl
from torchmetrics import PSNR

def add_gaussian_noise(cleanTensor, sigma=.1):
	# adds gausian noise of standard deviation sigma
	noiseTensor = torch.normal(mean=torch.zeros_like(cleanTensor), std=sigma)
	noisyTensor = cleanTensor + noiseTensor
	return noiseTensor, noisyTensor

class LitConvAE(pl.LightningModule):
	def __init__(self, hparams):
		super().__init__()
		# network architecture
		self.encoder = nn.Sequential(
			nn.Conv2d(in_channels=1, out_channels=8, kernel_size=3, stride=2, padding=1),
			nn.ReLU(True),
			nn.Conv2d(in_channels=8, out_channels=8, kernel_size=3, stride=1, padding=1))
		self.decoder = nn.Sequential(
			nn.ConvTranspose2d(in_channels=8, out_channels=8, kernel_size=3, stride=1, padding=1),
			nn.ConvTranspose2d(in_channels=8, out_channels=1, kernel_size=3, stride=2, padding=1, output_padding=1),
			nn.ReLU(True))
		# Model-specific parameters
		self.learning_rate = hparams.learning_rate
		self.noise_sigma = hparams.noise_sigma
		# save all hyperparameters to a .yaml file
		self.save_hyperparameters()
		# metrics from torchmetrics
		self.train_psnr = PSNR(data_range=1, dim=(-2, -1))
		self.val_psnr = PSNR(data_range=1, dim=(-2, -1))

	def forward(self, x):
		# typically defines inference behavior
		x = self.encoder(x)
		x = self.decoder(x)
		return x

	def training_step(self, batch, batch_idx):
		# training behavior can be different from that of inference
		clean_batch, _ = batch  # do not care about image class for denoising
		noise_batch, noisy_batch = add_gaussian_noise(clean_batch, self.noise_sigma)
		denoised_batch = self.decoder(self.encoder(noisy_batch))
		loss = nn.functional.mse_loss(denoised_batch, clean_batch, reduction='sum')  # squared l2 norm
		self.log('train_loss', loss)  # log at each step
		self.train_psnr(denoised_batch, clean_batch)
		self.log('train_psnr', self.train_psnr, on_step=False, on_epoch=True)  # log at each end of epoch
		return loss

	def validation_step(self, batch, batch_idx):
		# training behavior can be different from that of inference
		clean_batch, _ = batch  # do not care about image class for denoising
		noise_batch, noisy_batch = add_gaussian_noise(clean_batch, self.noise_sigma)
		denoised_batch = self.decoder(self.encoder(noisy_batch))
		self.val_psnr(denoised_batch, clean_batch)
		self.log('validation_psnr', self.val_psnr, on_step=False, on_epoch=True)

	def configure_optimizers(self):
		optimizer = torch.optim.Adam(self.parameters(), lr=self.learning_rate)
		return optimizer

	@staticmethod
	def add_model_specific_args(parent_parser):
		# Model-specific arguments
		parser = parent_parser.add_argument_group("LitConvAE")
		parser.add_argument('--noise_sigma', type=float, default=.2, help='noise standard deviation (between 0. and 1.)')
		parser.add_argument('--learning_rate', type=float, default=1e-3, help='learning rate')
		return parent_parser

class MNISTDataModule(pl.LightningDataModule):
	def __init__(self, batch_size=32, dataset_dir='./', data_transform=transforms.ToTensor(), num_workers=4):
		super().__init__()
		self.batch_size = batch_size
		self.dataset_dir = dataset_dir
		self.data_transform = data_transform
		self.num_workers = num_workers

	def prepare_data(self):
		# Use this method to do things that might write to disk
		# or that need to be done only from a single process in distributed settings.
		datasets.MNIST(root=self.dataset_dir, train=True, download=False)
		datasets.MNIST(root=self.dataset_dir, train=False, download=False)

	def setup(self, stage: Optional[str] = None):
		# data operations you might want to perform on every GPU
		if stage == 'fit' or stage is None:
			dataset_full = datasets.MNIST(self.dataset_dir, train=True, transform=self.data_transform)
			train_split = 11 * len(dataset_full) // 12
			print(f"\ntrain / val split: {[train_split, len(dataset_full) - train_split]} \n")
			self.dataset_train, self.dataset_val = random_split(dataset_full, [train_split, len(dataset_full) - train_split])

		# Assign test dataset for use in dataloader(s)
		if stage == 'test' or stage is None:
			self.dataset_test = datasets.MNIST(self.data_dir, train=False, transform=self.data_transform)

	def train_dataloader(self):
		return DataLoader(self.dataset_train, batch_size=self.batch_size, num_workers=self.num_workers)

	def val_dataloader(self):
		return DataLoader(self.dataset_val, batch_size=self.batch_size, num_workers=self.num_workers)

	def test_dataloader(self):
		return DataLoader(self.dataset_test, batch_size=self.batch_size, num_workers=self.num_workers)

if __name__ == "__main__":
	# Parse arguments
	parser = argparse.ArgumentParser(description="Denoise MNIST with a convolutional Autoencoder")
	# DataModule-specific arguments
	parser.add_argument('--batch_size', type=int, default=32, help='number of examples per batch')
	parser.add_argument('--num_workers', type=int, default=4, help='number of separate processes for the DataLoader (default: 4)')
	# Trainer arguments
	parser.add_argument('--gpus', type=int, default=2, help='how many gpus to select')
	parser.add_argument('--accelerator', type=str, default='dp', help="which multi-GPU backend you want to use (default: 'dp')")
	parser.add_argument('--max_epochs', type=int, default=10, help='number of epochs you want the model to train for')
	# Program-specific arguments
	parser.add_argument('--data_dir', type=str, default=r'path/to_mnist_dir', help='path to the parent directory of MNIST torchvision dataset')

	# add model specific args
	parser = LitConvAE.add_model_specific_args(parser)

	hyperparams = parser.parse_args()

	# initialize the neural network
	model = LitConvAE(hyperparams)

	dataModule = MNISTDataModule(batch_size=hyperparams.batch_size, dataset_dir=hyperparams.data_dir, data_transform=transforms.ToTensor())

	trainer = pl.Trainer.from_argparse_args(hyperparams)

	# the training and validation loops happen here
	trainer.fit(model, dataModule)

Expected behavior
Training should perform correctly.
Training and validation work fine when using a single GPU and DP (although there is not much point in doing that).
Environment

PyTorch Version (e.g., 1.0): 1.8.1
PyTorch Lightning Version (e.g., 1.0): 1.3.2
torchmetrics Version: 0.3.2
OS: Linux
How you installed PyTorch (conda, pip, source): installed everything using conda
Python version: 3.7.10
CUDA/cuDNN version: 11
GPU models and configuration: 2 Titan Xp

Here is the full traceback:
Traceback (most recent call last):
  File "lightning_dp_psnr_issue.py", line 139, in <module>
    trainer.fit(model, dataModule)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 458, in fit
    self._run(model)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 756, in _run
    self.dispatch()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 797, in dispatch
    self.accelerator.start_training(self)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/accelerators/accelerator.py", line 96, in start_training
    self.training_type_plugin.start_training(trainer)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 144, in start_training
    self._results = trainer.run_stage()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 807, in run_stage
    return self.run_train()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 869, in run_train
    self.train_loop.run_training_epoch()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 489, in run_training_epoch
    batch_output = self.run_training_batch(batch, batch_idx, dataloader_idx)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 729, in run_training_batch
    self.optimizer_step(optimizer, opt_idx, batch_idx, train_step_and_backward_closure)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 432, in optimizer_step
    using_lbfgs=is_lbfgs,
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/core/lightning.py", line 1403, in optimizer_step
    optimizer.step(closure=optimizer_closure)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/core/optimizer.py", line 214, in step
    self.__optimizer_step(*args, closure=closure, profiler_name=profiler_name, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/core/optimizer.py", line 134, in __optimizer_step
    trainer.accelerator.optimizer_step(optimizer, self._optimizer_idx, lambda_closure=closure, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/accelerators/accelerator.py", line 329, in optimizer_step
    self.run_optimizer_step(optimizer, opt_idx, lambda_closure, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/accelerators/accelerator.py", line 336, in run_optimizer_step
    self.training_type_plugin.optimizer_step(optimizer, lambda_closure=lambda_closure, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 193, in optimizer_step
    optimizer.step(closure=lambda_closure, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/optim/optimizer.py", line 89, in wrapper
    return func(*args, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/optim/adam.py", line 66, in step
    loss = closure()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 724, in train_step_and_backward_closure
    split_batch, batch_idx, opt_idx, optimizer, self.trainer.hiddens
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 812, in training_step_and_backward
    result = self.training_step(split_batch, batch_idx, opt_idx, hiddens)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 280, in training_step
    training_step_output = self.trainer.accelerator.training_step(args)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/accelerators/accelerator.py", line 204, in training_step
    return self.training_type_plugin.training_step(*args)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/plugins/training_type/dp.py", line 98, in training_step
    return self.model(*args, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 167, in forward
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 177, in parallel_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply
    output.reraise()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/_utils.py", line 429, in reraise
    raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 0 on device 0.
Original Traceback (most recent call last):
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
    output = module(*input, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/overrides/data_parallel.py", line 77, in forward
    output = super().forward(*inputs, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/pytorch_lightning/overrides/base.py", line 46, in forward
    output = self.module.training_step(*inputs, **kwargs)
  File "lightning_dp_psnr_issue.py", line 52, in training_step
    self.train_psnr(denoised_batch, clean_batch)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torchmetrics/metric.py", line 180, in forward
    self._forward_cache = self.compute()
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torchmetrics/metric.py", line 251, in wrapped_func
    self._computed = compute(*args, **kwargs)
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/torchmetrics/regression/psnr.py", line 147, in compute
    sum_squared_error = torch.cat([values.flatten() for values in self.sum_squared_error])
RuntimeError: All input tensors must be on the same device. Received cuda:1 and cuda:0

Exception ignored in: <function tqdm.__del__ at 0x7f4b657960e0>
Traceback (most recent call last):
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/tqdm/std.py", line 1145, in __del__
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/tqdm/std.py", line 1299, in close
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/tqdm/std.py", line 1492, in display
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/tqdm/std.py", line 1148, in __str__
  File "/home/amonod/miniconda/envs/pytorch181/lib/python3.7/site-packages/tqdm/std.py", line 1450, in format_dict
TypeError: cannot unpack non-iterable NoneType object

repo: PyTorchLightning/metrics


text:
Custom experiment name

🚀 Feature
now the experiment name is like:
./lightning_logs/version_0/**
Can I customize the name of my experiment？like:
./lightning_logs/object_detection_/
I think just add a default key like experiment_name=**.
Motivation
So I can clearly know what each experiment has done
Pitch

Alternatives

Additional context

It uses TensorBoardLogger by default. So I think you can pass a TensorBoardLogger with version parameter as "object_detection_".

source: gharchive/issue

repo: PyTorchLightning/pytorch-lightning

license_type: permissive

license_source: github-api


text:
Fix passing Accelerator objects to the accelerator flag with devices=x & resolve training type plugin

What does this PR do?

Fixes #10592
Fixes #10775
Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[ ] Did you list all the breaking changes introduced by this pull request?
[x] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃
cc @borda @tchaton @akihironitta

Closing it. As the issue has been resolved after the AcceleratorConnector refactor

source: gharchive/pull-request


text:
page: health and safety guidelines

create a new page for health and safety guidelines

Looks fine. Thanks

i see there was a failing CI...so i would suspect the pr had some errors
@Amanya-Brian what could have been the deploy logs https://app.netlify.com/sites/pyconug/deploys/645f7cb3c0273e0007b5a639

I suspect breaking characters such quotation marks in the text that cause these errors. NextJS is sensitive to them

But if there's any other cause, please point them out

have you tried accessing the page?
locally it appears

but what has been merged is

i suggest reverting the merge of the pull request so we fix the errors

But if there's any other cause, please point them out

@basiima the deploy logs have them all.... @Amanya-Brian could share a screenshot of the failing deploy logs

It's a build error

@basiima the change to make is  around there on line 14

somebody merged this @HassanBahati

Oh I guess I have to make the change

Alright, have fixed it. New PR in a few

authors: Amanya-Brian HassanBahati basiima

license: MIT


text:
Buffer is very laggy when backing FS is slow

This happens, for example, when using SSHFS mounts.
This is probably caused by some idle timer, or maybe (pre|post)-command-hook entry which is assumes the disk is fast.

Incredibly, this seems to be caused by https://github.com/mattfidler/auto-indent-mode.el.

repo: PythonNut/emacs-config


text:
Add underlying inst and update threading

Changes proposed in this pull request:

Add gettable underlying_instrument property to _BaseParameter
Override underlying_instrument property in DelegatePArameter
Move threading related functions to threading.py
Make _call_params_threaded a public function
Use underlying_instrument for threading

Todo:
[x] Add tests for new abstract property
[x] Add all the details to notebook
@astafan8 @jenshnielsen

@Akshita07
It looks good to me.
How about having a test for process_params_meas?

repo: QCoDeS/Qcodes


text:
Consider to_bytes for int checksumming

https://docs.python.org/3/library/stdtypes.html#int.to_bytes

Need to see if its a material performance improvement.

Appears to actually degrade performance, the logic to properly convert to the minimal set of bytes is more expensive then just calling repr in python.
There is a memory benefit but it is hard to justify compared to the ~5x worse performance.

repo: QCoding/qsum


text:
Browser Testing

Test sample of pages across numerous browsers. Perform searches on each.
Browsers to test;

Chrome
Firefox
Safari
IE
Edge
Opera
Android
OSx

TO BE FIXED - DEVICES TESTED
Note 4 - Chrome - Encore URL on results page overflow
- Too much padding on results card
- No burger menu at times
- Jumbotron too large
- Too much text in 'about' Jumbotron
- 'TOP' button has white background, needs fixed to dark colour
- Firefox - Too much padding in search results
- Samsung Internet - Same as above
- UC Browser - Above

Nexus 6 - Chrome - All issues same as Note 4
- Firefox - Padding as above
Moto G5 - Chrome - All issues same as Note 4
- Firefox - Padding
iPhone 6s - Safari - 'Top' button has white background
- Padding
- Chrome - 'Top' button no colour

Windows - Internet Explorer - 'Top button'
- Opera - No issues
- Chrome - No issues
MacOS - Safari - 'Top button'
Firefox - No issues

Close #11 before implementing these changes @atahir18 then re-visit

Done

repo: QUBLibSys/pic


text:
Update authors in CITATION.bib

I've removed the authors who contributed solely to forging and added a few authors who have contributed to circuit knitting.  I also updated the documentation to encourage users of forging to use an older version of the citation.
It's worth triple checking this to make sure there are no errors.
Closes #375.

Pull Request Test Coverage Report for Build 9005059753
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.493%

Totals

Change from base Build 8944137184:
0.0%

Covered Lines:
3496

Relevant Lines:
3661

💛  - Coveralls

authors: coveralls garrison


text:
annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead

Steps to reproduce the problem
Deploy serverless helm chart on k8s 1.28+
What is the current behavior?
Get warning: annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead
What is the expected behavior?
No warning

To fix, we need to replace the annotation with the spec. Here's the locations the annotation shows up as of the time of opening this issue:
https://github.com/search?q=repo%3AQiskit-Extensions%2Fquantum-serverless ingress.class&type=code

Hello! I would like to take a look at this issue, @psschwei can you assign this to me pls?
(btw, I'm new to the project)

Thanks @karlaspuldaro !

authors: karlaspuldaro psschwei

repo: Qiskit-Extensions/quantum-serverless


text:
Support retrieving interim results for runtime jobs

What is the expected behavior?
Qiskit Runtime now support persistent interim results for up to 2 days. We need an interface in qiskit-ibm for this.

merged in runtime repo https://github.com/Qiskit/qiskit-ibm-runtime/pull/15

repo: Qiskit-Partners/qiskit-ibm


text:
review/refactor Qiskit 1.0 tutorial

This tutorial was made by Matt Treinish for the IBM Quantum Summit. It would be great to refactor this into a tutorial that showcases some of the key highlights of Qiskit 1.0 and Primitives v2 and re-release as an open tutorial

[ ] move source file for this tutorial into this repo
[ ] refactor into patterns format
[ ] emphasise primitives v2
[ ] reupload to cms and update access controls to "open"

update: pedro is working on a notebook for the emea practitioners forum that is adapting matts original notebook, maybe that event notebook would be good starting point for this issue

repo: Qiskit/documentation


text:
Git funkiness

Something funky is going on with filenames and Git. This is an issue to remind me to investigate further.
Documents $ gh repo clone Qiskit/documentation
Cloning into 'documentation'...
remote: Enumerating objects: 17991, done.
remote: Counting objects: 100% (17991/17991), done.
remote: Compressing objects: 100% (4596/4596), done.
remote: Total 17991 (delta 13566), reused 16002 (delta 12986), pack-reused 0
Receiving objects: 100% (17991/17991), 50.80 MiB | 3.40 MiB/s, done.
Resolving deltas: 100% (13566/13566), done.
Updating files: 100% (30857/30857), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'docs/api/qiskit/0.36/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.36/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.36/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.36/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.36/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.36/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.37/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.38/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.39/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.40/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.41/qiskit.pulse.library.gaussian.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.Constant.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.constant.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.Drag.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.drag.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.Gaussian.md'
  'docs/api/qiskit/0.42/qiskit.pulse.library.gaussian.md'

I reproduce this. I think it has to do with macOS case sensitivity. For some reason, on my local machine, the file is lowercase even though Git says it's upper case.

Fixed in https://github.com/Qiskit/documentation/pull/438. Thanks!!

authors: Eric-Arellano frankharkins


text:
Update LOCALIZATION_CONTRIBUTORS

Changes

Implementation details

How to read this PR

Screenshots

Dear Ms. Shin,
Thank you for your quick response.
I'd like to enjoy the translation, and make some contribution for
the Qiskit community!
Sincerely,
Daisaku
2023年3月6日(月) 21:37 Soyoung Shin @.***>:

@.**** approved this pull request.
Thank you so much @daisaku-yokomatsu
https://github.com/daisaku-yokomatsu ! I confirmed that you signed CLA
and joined gitlocalize. Enjoy translation!
—
Reply to this email directly, view it on GitHub
https://github.com/Qiskit/platypus/pull/1964#pullrequestreview-1326130378,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGBFJXDDOJITRBXDCFLTZZDW2XLBJANCNFSM6AAAAAAVMY4XYI
.
You are receiving this because you were mentioned.Message ID:
@.***>

repo: Qiskit/platypus


text:
ci: propagate updates from qiskit-addon-utils

See the following PRs for more details:

https://github.com/Qiskit/qiskit-addon-utils/pull/18
https://github.com/Qiskit/qiskit-addon-utils/pull/19
https://github.com/Qiskit/qiskit-addon-utils/pull/20
https://github.com/Qiskit/qiskit-addon-utils/pull/27

Pull Request Test Coverage Report for Build 10833220639
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 10825461995:
0.0%

Covered Lines:
443

Relevant Lines:
443

💛  - Coveralls

authors: coveralls mrossinek

repo: Qiskit/qiskit-addon-obp


text:
Adjust tomography doc strings to automatic template

Summary
Addressing #254 and adjusting tomography to the automatic docstring template
Details and comments
I am not sure about the fitter options sections. the auto template assumes that the fitting is with curve fitting and therefore has fitting parameters, but here there are different fitting methods in the tomography.
@nkanazawa1989 - can you see if this is the way you intended the docs to be in such a case?

Thanks @dekelmeirom , I think the fit parameters section doesn't fit in with tomography analysis because it may have different parameters depending on the fitter function.
And you can also use
# section: note
# section: warning

Note that analysis options will be also generated from a superclass, so if there is a duplicated documentation in the subclass, you can move it to the superclass for maintainability.
Usually the overview is the place to explain general idea of the analysis. So you may want to explain how this analysis works like a method section of a paper, rather than just copy it from the original docstring.
I also notice we may need a custom label for the sections. If you want I'll update the autodoc to allow something like # section: Fitter Function, #section: PSD Rescaling.

@dekelmeirom Do you intend to complete this PR ?

I think that maybe it will be better if someone that wrote the base code or knows tomography better will complete it, and it might also be good to wait until the redesign - because the files (and documentation accordingly) might change (and I think that the auto doc of this experiment is not urgent)

authors: dekelmeirom nkanazawa1989 yaelbh

repo: Qiskit/qiskit-experiments


text:
Unable to sign in

Describe the bug
not able to sign-in to IBM site or access it's content. using Firefox browser. same issue on Microsoft Edge. Able to access Login page, input email, password, and verification code. Redirected to home page, but nothing shows. Shows as not signed in in the top right corner. Content on home page is loading. Not able to view any courses / catalog
Steps to reproduce
Expected behavior
being logged in and accessing catalog courses.
Suggested solutions
able to fix sign in..
Additional Information

qiskit-ibm-runtime version:
Python version:
Operating system: Windows

Hi @amdequit, please visit our support page https://docs.quantum.ibm.com/support if you are having trouble logging in.
This github repository is for the client side SDK qiskit-ibm-runtime - it's not related to https://quantum.ibm.com/

repo: Qiskit/qiskit-ibm-runtime


text:
Instantiate a Session with an existing session id

What is the expected feature or enhancement?
One should be able to instantiate a Session object with an existing session id str.
Acceptance criteria
Users should have the ability to instantiate a Session object with its private _session_id attribute set.
One implementation might look like:
session_id: str = ...
session = Session.from_id(session_id)

One use case / need for this is: A user is submitting consecutive jobs to the backend within a session, and their kernel crashes. They cannot easily instantiate a new Session object and resume their work before the timeout. They would need to use a different/more complicated interface (QiskitRuntimeService.run).
Another use case is: A user who has a Session instantiation inside a remote function. Provider is not serializable, so it is often difficult to pass Qiskit Runtime objects to cloud functions. It may require passing a QiskitRuntimeService and the Provider/Session be spun up inside the remote function.
In this case, a user may want to also submit a session_id to the remote function, so when they instantiate the new Session, they can easily get back to the front of the queue. The service.run interface is more difficult to deal with in my experience.


text:
Indention bug in else statement of torch connector.

Information

Qiskit Machine Learning version:
Python version:
Operating system:

What is the current behavior?
There is an indentation error on line 166 of the torch connector.
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

@nonhermitian What is wrong with indentation in this code? Looks good to me.

The issue originates from someone other than myself so I cannot say. However it seems that one of the statements is not nested at the correct level and causes issues when actually using the module.

Well, it is supposed to be an if - elif - else statement. So, it is unclear where indentation is wrong. Do you have any other details of the issue or know who originally raised this issue?

Sorry they reported it a bit further down.

I see, the selected part looks good to me either. So, are there any actual problems with the torch connector e.g. wrong results?

Please just close this issue. I will ask the original authors to post a new issue themselves.

OK, thanks.

authors: adekusar-drl nonhermitian

repo: Qiskit/qiskit-machine-learning


text:
Improving a sentence in getting_started.rst

Summary
Related https://github.com/Qiskit/qiskit-finance/pull/247
Details and comments

Pull Request Test Coverage Report for Build 4481253415

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 90.892%

Totals

Change from base Build 4480772936:
0.0%

Covered Lines:
3423

Relevant Lines:
3766

💛  - Coveralls

authors: SooluThomas coveralls


text:
ActiveSpaceTransformer fails when num_electrons is tuple

Environment

Qiskit Nature version: 0.2.2
Python version: 3.8
Operating system: Any

What is happening?

if sum(self._mo_occ_total[self._active_orbitals]) != self._num_electrons:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

How can we reproduce the issue?
es_problem = ElectronicStructureProblem(driver, transformers=[ActiveSpaceTransformer(num_electrons=(2, 2), num_molecular_orbitals=6, active_orbitals=[1,2,3,4,5,6])])

What should happen?
Should work with tuple as API states
Any suggestions?
This is the failing code that needs adjusting to accommodate num_electrons being passed in as tuple.
https://github.com/Qiskit/qiskit-nature/blob/0b57731283906cd3bfb43a6f6ff34346716dd1c5/qiskit_nature/transformers/active_space_transformer.py#L346-L350
Unit tests only seem to use an int hence use of tuple is not tested and should be added

This bug actually only occurs when the active_orbitals argument is used, too. I will open a PR to fix this in a second :+1:

authors: mrossinek woodsp-ibm

repo: Qiskit/qiskit-nature


text:
Weyl decomposition tests take a large amount of time

Information

Qiskit Terra version: master
Python version:
Operating system:

What is the current behavior?
The following 10 tests take ~10 minutes to run in Travis, more than doubling the previous test suite run time.
{0} test.python.quantum_info.test_synthesis.TestTwoQubitDecomposeExact.test_exact_two_qubit_cnot_decompose_random [13.819984s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_a00 [9.648405s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_aa0 [10.711048s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_aaa [12.353843s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_aac [71.911712s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_aama [11.885182s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_ab0 [106.573777s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_abb [69.877592s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_abc [187.354443s] ... ok
{0} test.python.quantum_info.test_synthesis.TestTwoQubitWeylDecomposition.test_two_qubit_weyl_decomposition_abmb [68.655977s] ... ok

Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

This is caused by #2496, so closing in favor of that.

repo: Qiskit/qiskit-terra


text:
Optimization levels not minimizing CX gates

Informations

Qiskit version: 0.27.0
Python version: 3.6
Operating system: macOS Big Sur version 11.4

What is the current behavior?
Untitled.md
(see notebook above)
I was playing around with the optimization levels, and I think I discovered a bug.  The optimizer is adding CX gates, e.g. from level 0 to level 3. (Increasing cost!)
Steps to reproduce the problem
(see earlier notebook attachment) Run the notebook and observe different outputs optimization levels, e.g. 0 to 3.
What is the expected behavior?
I need the initial_layout that uses the least number of CX gates.
Suggested solutions
I'm fairly certain a more optimal circuit can be outputted.  However, I do not have a specific suggestion on the exact answer.

Looking briefly, I'm not necessarily sure this is a bug. Running a few times at each optimization level, I get between 13-16 CX gates at optimization_level=0, and 14 at optimization_level>=1, which is not necessarily surprising given that transpilation utilizes several heuristics which are not guaranteed yield optimal circuits for any single metric.
For reference, here's an example 13-CX output at optimization_level=0

16-CX output at optimization_level=0:

14-CX output at optimization_level=1:

optimization_level=0 uses the TrivialLayout pass, and optimizaiton_level>=1 use DenseLayout by default. Suggestions to improve DenseLayout to help it find the better layout in this case would be very welcome. (It turns out, that there are even better layouts available not found by either pass. e.g. [1, 0, 2, 3, 4], that would yield a 10 CX circuit, and routing_method==layout_method=='sabre' finds a layout and routing with as few as 7 CX gates.)

authors: antetoko kdk


text:
ast_to_dag support for opaque gates

This PR is going towards recovering our QASM input in Qiskit, now that composite gates are working. (see #1566)
For fully supporting gate mygate(theta) q {...} I need to extend DAG with a binding mechanism for parameters. That might take longer, so I prefer to push this PR with support for opaque, that is easier.

This looks good. I think for a defined custom gate, we need to create a circuit that contains its definition, then append it using circuit.append(subcircuit.to_instruction).
Not sure what you mean by "extend DAG with a binding mechanism for parameters"?

Not sure what you mean by "extend DAG with a binding mechanism for parameters"?

gate mygate(theta) q {...} creates the instruction and mygate(3,q[2]) needs to bind theta. Right?


text:
Add test for graph state circuit

Summary
Fixes #4349
Details and comments
Added a test by computing the expected unitary from adjacency matrix and comparing that against the circuit produced by GraphState. The expected unitary is computed using Eq. (9) from this paper. The test is general and supports an adjacency matrix for any number of qubits. Due to that, the computation for CZ gates is slightly more involved, as it is generalized to any number qubits and control-target connections. That is done by checking whether the corresponding state has both the control and target in state |1> and assigning -1 to corresponding diagonal elements of an identity matrix.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hi @mantcep,
looking into this with @ajavadia we came up with a nice test, that does not require computing the exponentially large unitary and checks the graph state from another point-of-view than the circuit gates. In Section II.B of the paper, the graph state is defined via it's stabilizers (Eq. (7)). (These stabilizers exist because the graph's we're looking at are created with Clifford circuits.)
In Eq. (6) it is defined how to compute these stabilizers. We can also get them from the circuit using
from qiskit.quantum_info import Clifford
Clifford(circuit).stabilizers.pauli.to_label()

If that output matches the stabilizers from Eq. (6) the graph state is correct.
Here's a little snippet on how you could compute the stabilizers via Eq. (6):
from typing import List

def get_stabilizers(A: List[List[int]]) -> List[str]:
    """Returns the stabilizers of the graph state constructed by A.

    Args:
        A: The adjacency matrix of the graph.

    Returns:
        The stabilizers.
    """
    stabilizers = []  # keep track of all stabilizers
    num_vertices = len(A)
    for vertex_a in range(num_vertices):
        stabilizer = [None] * num_vertices  # Paulis must be put into right place
        for vertex_b in range(num_vertices):
            if vertex_a == vertex_b:   # self-connection --> 'X'
                stabilizer[vertex_a] = 'X'
            elif A[vertex_a][vertex_b] != 0:  # vertices connected --> 'Z'
                stabilizer[vertex_b] = 'Z'
            else:  # else --> 'I'
                stabilizer[vertex_b] = 'I'

        # need to reverse for Qiskit's tensoring order
        stabilizers.append(''.join(stabilizer)[::-1])

    return stabilizers

Then the stabilizers should be the same, e.g.
# A = [[1, 1], [1, 1]]
# A = [[1, 1, 1], [1, 1, 0], [1, 0, 1]]
A = [[0, 1, 0, 0, 1], [1, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 0, 1, 0, 1], [1, 0, 0, 1, 0]]
graph_state = GraphState(A)
stabilizers = Clifford(graph_state).stabilizer.pauli.to_labels()
ref_stabilizers = get_stabilizers(A)
print(stabilizers)
print(ref_stabilizers)

yields
['ZIIZX', 'IIZXZ', 'IZXZI', 'ZXZII', 'XZIIZ']
['ZIIZX', 'IIZXZ', 'IZXZI', 'ZXZII', 'XZIIZ']

I think it would be good if we could test the graph states with this, what do you think? If you have questions don't hesitate to ask!

Hi @Cryoris,
I must say, this is an elegant solution to say the least! I am sorry that I have not figured this out myself and you had to spend time looking into this. Thank you for the additional background on this topic, I will make sure to study at least the basics of quantum error correction, as I do not know much about stabilizers and Clifford groups.
As for implementing the test itself, would you like me to prepare the code for the test and submit a change to the pull request? If so, would it make sense to include the nice function that you have written into one of the classes?
Finally, I have one more question I am interested in and sorry if it sounds silly. Do you know what is the performance of computing the stabilizers from a circuit as compared to the exponentially large unitary based on the gates?
Thanks again for the guidance!

I must say, this is an elegant solution to say the least! I am sorry that I have not figured this out myself and you had to spend time looking into this. Thank you for the additional background on this topic, I will make sure to study at least the basics of quantum error correction, as I do not know much about stabilizers and Clifford groups.

Don't worry, we're all learning something new every day! I also didn't notice this when I opened this issue. 🙂

As for implementing the test itself, would you like me to prepare the code for the test and submit a change to the pull request? If so, would it make sense to include the nice function that you have written into one of the classes?

Yes you can just update your branch and then the PR will also be updated. I think you could include the code into the class, either as separate function or inside the assertGraphStateIsCorrect.

Finally, I have one more question I am interested in and sorry if it sounds silly. Do you know what is the performance of computing the stabilizers from a circuit as compared to the exponentially large unitary based on the gates?

I'm not quite sure @chriseclectic is the expert on this, but I think we can iterate over all gates and update the stabilizer table so the complexity should be of the order of gates in the Clifford circuit. Here's some more context on Clifford circuits and how they can be simulated efficiently: https://arxiv.org/pdf/quant-ph/0406196.pdf. This is also what's done in Qiskit.

Hi again!
I have updated the branch based on the code you have provided 🙂 Let me know if I should be changing something to make it nicer.
I was thinking that maybe it would make sense to include the function you have provided in the GraphState class to have a specific method for getting the stabilizers. In the end, however, I figured that is probably not necessary, since we can always get the stabilizers using the other method you have shown – Clifford(circuit).stabilizers.pauli.to_label(). So I included your code inside assertGraphStateIsCorrect, since that seemed to make most sense to me.
Thank you again for the valuable input!

Just one more comment I would like to add. In hidden_linear_function.py, there is the following piece of code that checks whether the adjacency matrix is symmetric:
https://github.com/Qiskit/qiskit-terra/blob/968000fd14d43935538fdebb3ef10194940633e1/qiskit/circuit/library/hidden_linear_function.py#L87-L89
I think it would make sense to add that to GraphState as well. Then another test could be added that checks whether this raises an error for a non-symmetric matrix, similar to the following test:
https://github.com/Qiskit/qiskit-terra/blob/968000fd14d43935538fdebb3ef10194940633e1/test/python/circuit/test_library.py#L182-L185
Let me know what you think about this, I would be more than glad to update my branch with this change as well 🙂

I was thinking that maybe it would make sense to include the function you have provided in the GraphState class to have a specific method for getting the stabilizers. In the end, however, I figured that is probably not necessary, since we can always get the stabilizers using the other method you have shown – Clifford(circuit).stabilizers.pauli.to_label()

Another way of getting this can be clifford.to_dict() which gives you a dictionary of stabalizers like:
{'stabilizer': ['+XX', '+ZZ'], 'destabilizer': ['+IZ', '+XI']}

Hi @ajavadia,
Thank you for the input, I will keep this in mind! For the purpose of testing the GraphState, though, I would assume that using Clifford(graph_state).stabilizer.pauli.to_labels() would be fine, right? Otherwise, is there any other input for my pull request or could we proceed with merging that?

@mantcep If you could add the symmetry test that would be great.
I think either way of getting the stabilizers is fine, though the to_dict method is a bit more elegant since it requires less code. I'd say it's up to you!

Hi @Cryoris,
Sure, I will add the check for symmetry and see which method works best for me to get the stabilizers! I think I can get that done quite quickly and will update the branch once it is ready.
Thank you again!

Hi again @Cryoris,
I have added the symmetry check and the corresponding test. Both of these are based on similar implementation in HiddenLinearFunction.
As for getting the stabilizers, I have not made any changes to that. I was not very sure about implementing the phase we get from using the to_dict() method, which, as I understand, corresponds to the phase p in the following:
https://github.com/Qiskit/qiskit-terra/blob/1425ebddce035edac2fc2f96dbde5f89c4da8ae5/qiskit/quantum_info/operators/symplectic/stabilizer_table.py#L31-L34
I hope you do not mind me taking this shortcut here for the purpose of this test.
Let me know what you think about this final commit and whether there are any other changes I should implement before we proceed with merging this 🙂
I am very thankful for your support on my very first contribution! I understand that this is time consuming for you, so I will try to be a lot more independent in the next one!

Thank you, @Cryoris! 🙂

authors: CLAassistant Cryoris ajavadia mantcep


text:
visualization of the Initialize instruction should not print the statevector

Environment

Qiskit Terra version: main
Python version:
Operating system:

What is happening?
The statevector is an exponentially growing object so it does not make sense to print the amplitudes. Similarly we don't print the contents of a unitary.

How can we reproduce the issue?
u = qi.random_unitary(4)
psi = qi.random_statevector(4)
circ = circ.initialize(psi, qubits)
circ = circ.compose(u, qubits)

What should happen?
the box should just print State Prep or \psi or something.
Any suggestions?
I tried doing this myself but couldn't find the right place to modify to not print params for a specific instruction (how is it done for unitary?)

This is where you can check if it's an Initialize instruction. It will remove the params for both the text and the mpl drawers. https://github.com/Qiskit/qiskit/blob/a9b388103c337e3cac5d2e291c8aa2ab20990851/qiskit/visualization/circuit/_utils.py#L136-L143

Thanks. So the issue seems to be that StatePreparation and Initialize don't store their state vector as one ndarray inside params[0], but expand it into the full list of params. This is in contrast to UnitaryGate, Isometry, etc. So I think that should be fixed.

Ali: it's not a perfect situation, but it's a valid representation of the data, and changing it would break all consumers of the Initialize and StatePreparation, such as the QPY transport layer and Aer (which supports the instruction natively).  I think it'll be cleaner to put a manual override into the visualisers, which are the only place that actually has the problem.

authors: ajavadia enavarro51 jakelishman

repo: Qiskit/qiskit


text:
Add Portuguese documentation

What is the expected behavior?
Quantum information is a subject that is found in English language literature more often than in Portuguese literature.
We in Brazil, and also from Portugal, want good references in Portuguese to educate people who are interested in learning more about quantum information.
Some terms, such as Gate, are translated incorrectly by translators. In addition, at universities, we learn terms like Gates in Portuguese. Moreover, today's translators misread these academic terms and made it harder to make analogy and idioms. Furthermore, for an initial learning, it becomes even more difficult to absorb knowledge. Finally, Qiskit does not have a Portuguese version.
I myself have been studying Qiskit in English for a year now. Imagine who has no experience in the subject?
I would like to propose a Portuguese translation of some sections and engage more portuguese learners and educators to help us with translation. For example:
Reference: https://quantum-computing.ibm.com/support/guides/introduction-to-quantum-circuits?page=5cae6f7735dafb4c01214bbe

"The Pauli operators
The simplest quantum gates are the Paulis:
X , Y and Z. Their action is to perform a half rotation of the Bloch sphere around the x, y and z axes. They therefore have effects similar to the classical NOT gate or bit-flip. Specifically, the action of the X gate on the states |0⟩ and |1⟩ is X|0⟩=|1⟩,X|1⟩=|0⟩."

Portuguese version:
"Operadores Pauli
Os operadores quânticos mais simples são as de Paulis: X, Y e Z.
Sua ação é realizar uma meia rotação da esfera Bloch em torno dos eixos x, y e z. Eles, portanto, têm efeitos semelhantes a porta clássica NOT ou bit-flip. Especificamente, a ação da porta X nos estados | 0 ⟩ e | 1 ⟩ é X|0⟩=|1⟩,X|1⟩=|0⟩."

Thank you very much for that guidance.


text:
Merged project-template v9.2.1

Updated to project-template v9.2.1.

Codecov Report

Merging #569 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #569   +/-   ##
=========================================
  Coverage     26.39%   26.39%
  Complexity      987      987
=========================================
  Files            88       88
  Lines          3289     3289
=========================================
  Hits            868      868
  Misses         2421     2421

Continue to review full report at Codecov.

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

authors: codecov-io mamchenkov

repo: QoboLtd/project-template-cakephp

license: mit

license_source: bigquery


text:
ToolBox changes

Moved ToolBox helper classes to the Engine DLL, so they can be used by external tools.
Fix issue in the DataWriter that generated the wrong zip file path.
Remove unnecesary MySQL reference in Engine.

Thanks for the PR @naicigam! Please keep submissions to one topic so make them as focused as possible, and avoid changes which affect lots of files but don't have much impact (code churn - e.g. renaming the Data writer to LeanDataWriter).
I'll close this for now but please submit a new PR for the MySQL reference.
Possibly we could move the LeanDataWriter class to Common, but it doesn't really belong in the engine.

Sorry about that. Just submitted both the MySQL reference and the LeanDataWriter fix.
I would be happy to move LeanDataWriter, since I am currently copy/pasting it into my VS project so I can use it. Should I move it to Common or should we consider another option?
Thanks!

authors: jaredbroad naicigam

repo: QuantConnect/Lean


text:
Fix Resolution.Tick TradeBar history request

Description

Based on @gsalaz98 findings exposed on issue https://github.com/QuantConnect/Lean/issues/4435:

Throw exception if requesting Resolution.Tick using the TradeBar
history request API
Adding unit tests, asserting current behavior

Related Issue

Closes https://github.com/QuantConnect/Lean/issues/4435
Motivation and Context

Improve API user experience
Requires Documentation Change

N/A
How Has This Been Tested?

Unit and regression tests
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[x] My code follows the code style of this project.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.
[x] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Also, I'm not sure this PR closes the issue #4435 since History<Tick>(...) is still only adding the TickType.Quote subscription rather than both TickType.Trade and TickType.Quote, compared to the History(Symbol[], ...) call. I've left a comment on the original issue detailing my findings 👍

Also, I'm not sure this PR closes the issue #4435 since History<Tick>(...) is still only adding the TickType.Quote subscription rather than both TickType.Trade and TickType.Quote, compared to the History(Symbol[], ...) call. I've left a comment on the original issue detailing my findings 👍

True, the difference is that History(Symbol[], ...) returns a Slice object 🤔. If we were to add both tick types in the result, it would change existing behavior and would end up as a mix of tick types, sometimes Trade, sometimes Quote, somewhat related to issue https://github.com/QuantConnect/Lean/issues/4196.
Another case I though of while reviewing is also related to 4196:
// Trades and quotes
var result = _algorithm.History(new [] { Symbols.SPY }, start.AddHours(9.8), start.AddHours(10), Resolution.Tick).ToList();
foreach (var slice in result)
{
    if (slice.Ticks.Any(pair => pair.Value.Any(tick => tick.TickType == TickType.Quote) &&
                                pair.Value.Any(tick => tick.TickType == TickType.Trade)))
    {
        // slice.Ticks has both Quote and Trade ticks, what will the following return?
        var ticks = slice.Get<Tick>();
    }
}

Let's keep issue #4435 open till we define the expected behavior 👍


text:
[2_multi_hyper]add.

Hi @jstac , this PR adds a . at the end of the following sentence in lecture multi_hyper:

The appropriate probability distribution is the one described here

Thanks @shlff

authors: jstac shlff

repo: QuantEcon/lecture-python


text:
New lecture money_inflation

This is a fascinating lecture and I imagine it's going to be very useful for undergraduate macro. I think it's suitable for the introductory lecture series, even though it's more advanced than most.
It highlights the almost magical way that the eigenvector decomposition can be used to decouple linear systems.
Minor suggestions:

[ ] After the sentence "But first it is instructive to describe a special type of equilibrium known as a steady state." it might be worth adding "A steady state is an equilibrium where all variables are constant over time."
[ ] In remark 2, "An equilibrium" -> "Equilibrium"

Once it's embedded in a lecture series, we should add links to related lectures.
@HumphreyYang I notice that you include plt.rcParams['figure.dpi'] = 300 or similar in some lectures, such as this one.  At the same time, there's nothing very special about the figures in this lecture.  That suggests to me that either we don't need this line (we should try to minimize distracting code at the start) or it should be embedded in the defaults and thus hidden from the reader.  @mmcky, perhaps you could sort this out with @HumphreyYang ?

I ll add a modified version of John s sentence. Not all variables are
constant though. The art is to spot which variables are invariant. This
relates to eigen functions.  Good suggestion John.
On Mon, Feb 19, 2024, 2:58 AM John Stachurski @.***>
wrote:

This is a fascinating lecture and I imagine it's going to be very useful
for undergraduate macro. I think it's suitable for the introductory lecture
series, even though it's more advanced than most.
It highlights the almost magical way that the eigenvector decomposition
can be used to decouple linear systems.
Minor suggestions:

After the sentence "But first it is instructive to describe a
special type of equilibrium known as a steady state." it might be worth
adding "A steady state is an equilibrium where all variables are constant
over time."
In remark 2, "An equilibrium" -> "Equilibrium"

Once it's embedded in a lecture series, we should add links to related
lectures.
@HumphreyYang
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_HumphreyYang&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hV4qLWg4zodvX-YQ-ETIbA&m=XnVGCaYw2fdybhT0u99Q3iYho7Bwqtoa2-ixfLB9sAH8S86j4ni22_MZWuppVaU3&s=k2RUMtH3K8ovCpCDGTaJsSkQ2WYjRB4og0AzF4panls&e=
I notice that you include plt.rcParams['figure.dpi'] = 300 or similar in
some lectures, such as this one. At the same time, there's nothing very
special about the figures in this lecture. That suggests to me that either
we don't need this line (we should try to minimize distracting code at the
start) or it should be embedded in the defaults and thus hidden from the
reader. @mmcky
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mmcky&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hV4qLWg4zodvX-YQ-ETIbA&m=XnVGCaYw2fdybhT0u99Q3iYho7Bwqtoa2-ixfLB9sAH8S86j4ni22_MZWuppVaU3&s=6zRyoB42ga_W-f_DTxvvfWRtUqK4aaKQ74TQAqSbv60&e=,
perhaps you could sort this out with @HumphreyYang
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_HumphreyYang&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hV4qLWg4zodvX-YQ-ETIbA&m=XnVGCaYw2fdybhT0u99Q3iYho7Bwqtoa2-ixfLB9sAH8S86j4ni22_MZWuppVaU3&s=k2RUMtH3K8ovCpCDGTaJsSkQ2WYjRB4og0AzF4panls&e=
?
—
Reply to this email directly, view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_QuantEcon_python-2Dlecture-2Dsandpit.myst_issues_17&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hV4qLWg4zodvX-YQ-ETIbA&m=XnVGCaYw2fdybhT0u99Q3iYho7Bwqtoa2-ixfLB9sAH8S86j4ni22_MZWuppVaU3&s=21zZuKHDQVf-DqBetPqUAkpeDm0nK1O0Av8J6UjvhU0&e=,
or unsubscribe
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AA63MTSAONX25PVLUHU6EYLYUJFLNAVCNFSM6AAAAABDOLW2N2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DCMJTG44TKMA&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hV4qLWg4zodvX-YQ-ETIbA&m=XnVGCaYw2fdybhT0u99Q3iYho7Bwqtoa2-ixfLB9sAH8S86j4ni22_MZWuppVaU3&s=X4Pllonglny-nqHHHCXL6SD88dI9ztmEqCmxp7lC1ks&e=
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Hi @jstac,
Many thanks for your feedback.

I notice that you include plt.rcParams['figure.dpi'] = 300

This line is trying to increase the pixel density of the plot. This will increase the sharpness of the plots to avoid blurry images under default dpi, especially when there are text annotations.
I think we might be able to include this as a global parameter like the image size in the config file.

This line increases the pixel density of the plot. This will increase the sharpness of the plots to avoid blurry images under default dpi, especially when there are text annotations.

Thanks @HumphreyYang , I understand that, and what you say is important.  I appreciate your attention to quality.
My point is there's nothing very special about these figures, which suggests that either it should be a global config or we shouldn't be using it.

I think we might be able to include this as a global parameter like the image size in the config file.

That's my preference too.  CC @mmcky

My point is there's nothing very special about these figures, which suggests that either it should be a global config or we shouldn't be using it.

If the default quality isn't good enough for some reason, the dpi setting can't be given to matplotlib in the global config (unless we use machine level config rc files for matplotlib).
What we have been doing to date (in the case where th quality needs to be posted is to use)
fig, ax = plt.subplots(dpi=200)

when setting up the figure.
I think that is a lot less confusing that the dreaded rcparams at the top -- I agree with @jstac.
Next steps would be:

remove the rcparams to see if the quality is good enough
for any figures that need a dpi boost then set it in the figure setup funtion.

Do you agree @jstac

authors: HumphreyYang jstac mmcky thomassargent30


text:
Allows (de)serialization of xexpressions in NumPy formatted strings and streams

Implements an overload of xt::dump_npy which returns a
NumPy-formatted file as a bytestring.
Implements an overload of xt::load_npy which returns an xexpression
from a NumPy-formatted input stream.
Adds tests for both above methods, which are implemented in terms of
existing methods in the xnpy.hpp file.

Support for reading and writing directly to C++ strings and/or streams
is useful for moving NumPy-formatted files around in memory or via
file-like objects other than a normal on-disk file (such as a pipe or
socket).

Thanks!

authors: JohanMabille bnaecker

repo: QuantStack/xtensor


text:
[Week 2] PACKING self review - Yunhyunjo

PACKING self review
1. 해결 시도 과정
일단 절박도를 최대화는 백준 배낭문제 처럼 똑같이 구현을 하였습니다. 그리고 짐의 목록과 개수를 출력해 주어야하기 때문에 추가적으로 저장할 배열을 선언한 뒤 계산해 주었습니다.
2. 작성한 코드와 설명
vector <pair <int, int>> v(n+1);
vector <string> s(n+1);
v.push_back({ 0,0 });
s.push_back("");
for (int i = 1; i <= n; i++) {
	cin >> s[i] >> v[i].first >> v[i].second;
}

일단은 s에는 짐을, v에는 무게와 절박도를 같이 입력받아야하기 때문에 pair로 선언을 해서 입력받았습니다.
vector <vector <int>> dp(n + 1, vector <int>(k + 1));
vector <vector <int>> ss(k + 1);
for (int i = 1; i <= n; i++) {
	for (int j = 1; j <= k; j++) {
		if (v[i].first > j) {
			dp[i][j] = dp[i - 1][j];
		}
		else {
			dp[i][j] = max(dp[i - 1][j - v[i].first] + v[i].second, dp[i - 1][j]);
			if (dp[i][j] != dp[i - 1][j]) {
				ss[j].clear();
				ss[j] = ss [j - v[i].first];
				ss[j].push_back(i);
			}
		}
	}
}

행은 짐, 열은 무게로 2차 배열 dp를 선언해 준 뒤, 계산을 해가면서 더 큰 절박도를 저장해 주었습니다.
짐의 목록과 개수도 출력해 줘야하기 때문에 어떠한 짐을 선택했는지도 저장해 주었습니다.
3. 막힌 점 및 개선 사항
절박도 계산은 정확하게 나오는데 짐을 계산하는 과정에서 잘못된 부분이 있었던 것 같습니다. 제 코드의 짐을 저장하는 방식을 다시 이해해 봐야할 것 같습니다.

코드 보니까 말씀하신대로 절박도 계산하는 부분은 문제가 없고, 답을 추적하는 과정의 로직이 잘못된 것 같습니다.
일단 절박도 구하는 도중에 추적을 하시면 안되고, 절박도 계산 다 끝난 상태에서 재귀함수로 추적 로직 작성해보세요.
(다른 코드 채점해서 AC 받으신것도 봤는데 그건 절박도 계산과 string DP를 같이 하는거라서 현조님 코드의 상황과 다릅니다.)
현조님 코드에 추적하는 부분만 재귀로 수정하니까 AC 나오더라고요!

authors: Queue-ri Yunhyunjo

repo: Queue-ri/Advanced-Algorithm-Study


text:
请问模型的并发能力

目前用8*4090跑qwen-72B-int4，每秒输出10个Token左右，但在两人同时使用时，速度明显下降一半都不止，已经使用了flash_attention，请问是否还有加速方案？

由于您提到了使用了flash_attention，您应该使用的是transformers加载的模型，transformers是缺少有效的并发管理的。建议您尝试采用FastChat+vLLM的方案，如果设备性能有并发的空间（比如显存仍有剩余），总吞吐量一般会有提升。

repo: QwenLM/Qwen


text:
您好，请问有针对图片大小的BenchMark吗？

显卡配置：A10
您好，我在本地使用vllm部署Qwen2-VL-2B-Instruct-AWQ，
分别测试150kb，500kb，800kb，1mb图片。
我发现800kb的图片的吞吐量最大。
所以请问有针对图片大小的BenchMark？我想看看这个规律是否真实存在。

显存占用跟分辨率大小比较有关


text:
[CON-1245] Add support for Intel reference PCCS

Changes

Fix bug that caused corrupted binary encoded CRLs/Certs.

Sorry to jump in here! This is all that was stopping us from supporting PCCS? Awesome!

Sorry to jump in here! This is all that was stopping us from supporting PCCS? Awesome!

Unfortunately not, there are differences in how some of the other collateral objects are structured. There's actually version number in the json that we should be switching on, but at the moment we're just ignoring it :man_shrugging:. So still a bit of work to do.

@shamsasari Two primary questions from me:

To get this to work, I had to adjust some code in QuoteVerifier.kt so that it would accept the v3 json. I'm pretty sure this is just a version check, but TCB_UNRECOGNIZED_STATUS isn't exactly a descriptive error message! PTAL at this change specifically.
In AttestationJsonTypes.kt, we still have epid ralted classes, not sure if those are still supposed to be there or not, so I've left them alone for now.

@JohnJoser3 Added to review the changes to dcap.md

@shamsasari Marked as draft temporarily to prevent merge. PTAL and let me know if you think it's ready.

Did you forget to push?

Sorry, can you update the PR description on the full set of changes. The fix to the JSON parsing is missing there.


text:
Deployment over 12 hours fails due to expired IdentityFile "no such identity"

Before submitting your issue, please make sure that you've checked all of the checkboxes below.

[x] You're running the latest release version of Deployer.
[x] Ensure that you're running at least PHP 7.0.8, you can check this by running php -v
[x] You've ran composer install --no-dev from the root of your installation.
[x] You've ran npm install --production from the root of your installation.
[x] You've ran rm -rf bootstrap/cache/* from the root of your installation.
[x] You have restarted the queue listener and node socket server.

Describe the bug
We have a command that runs about 14 hours and when it finishes the next command fails with this error:
no such identity: /var/www/deployer/storage/app/tmp/keyAC3Rrs: No such file or directory
Permission denied (publickey).

Other quick commands run one after each other without issues.
I've looked at the log file and looks like the IdentityFile expires if I understood it correctly.
Is there any way to make identity file expire time longer at least when deployment is still running?
Expected behaviour
Commands will continue to run after long command is finished.
Actual behaviour
Deployment fails after long command is finished.
Steps to reproduce
Run a command that takes longer than 12 hours to complete
Environment info
Visit /admin/sysinfo on your install and click the "Get System Report" button. Paste the report here, if you can't
please provide the following instead.

PHP Version: 7.1.20-1+ubuntu16.04.1+deb.sury.org+1
Server Software: nginx/1.10.3
Server OS: Linux deployer 4.4.0-1065-aws #75-Ubuntu SMP Fri Aug 10 11:14:32 UTC 2018 x86_64
Database: mysql 5.7.1

Logs (see storage/logs/) or other output that would be helpful
deployer-error.log

wow, I never thought it would be possible for a deploy to take this long.
The reason is that SSH keys are normally cleaned up when deploy is finished, but if something happens (say the worker crashes) it gets left on the server which isn't great so there is a cronjob to clean up keys older than 12 hours.
For now the simplest fix is to change app/Console/Commands/ClearOldkeys.php and increase the KEEP_FILES_FOR_HOURS constant. Maybe I should make it a config option?
Trying to figure out if the deploy which uses the key is still actually running because much more complicated, although it may be doable.

Hi Stephen, I can confirm that changing KEEP_FILES_FOR_HOURS constant in app/Console/Commands/ClearOldKeys.php to a longer period works and we were able successfully complete the deployment.
Thank you!

authors: REBELinBLUE dgpro

repo: REBELinBLUE/deployer


text:
🛑 RED7 Staff - Chat is down

In c927f73, RED7 Staff - Chat (https://chat.red7.ml) was down:

HTTP code: 0
Response time: 0 ms

Resolved: RED7 Staff - Chat is back up in cb70fff.


text:
Data viewer with Tabulator

Is your feature request related to a problem? Please describe.
Data viewer is using ag-grid.
The load with a lot of rows is slow

due to collecting and passing the content (dataframe) to ag-agrid?
or due to the rendering of ag-grid because it is not virtual on client-side?

Describe the solution you'd like
Anyone during software selection of ag-grid tried Tabulator lib?
https://tabulator.info/
Describe alternatives you've considered
It seems to me (if I am not wrong) it implements virtual dom on client side and may resolve the slowness if it is due to ag-grid rendering.
A few resources about virtual dom in Tabulator:

https://tabulator.info/docs/5.5/virtual-dom
https://tabulator.info/docs/5.5/layout#virtual-dom

Additional context
What do you think?
I was wondering because I don't want proposing a push request reinventing the wheel or just retrying an insuccess. ;)

I think the slow loading of data frames is due to the writing and reading of json files.
Perhaps using Arrow can speed up the process?
However, since the arrow package is a very large dependency, we may need to wait until the nanoarrow package supports reading and writing Arrow files.

I think the slow loading of data frames is due to the writing and reading of json files.

I was afraid wbout that ^, anyway I investigate it a bit
Also I put in my radar nanoarrow.
Thanks @eitsupi.

authors: albertosantini eitsupi

repo: REditorSupport/vscode-R


text:
Add finish progress step

Depended on #56
No error
https://user-images.githubusercontent.com/11807069/186199592-29d07436-d04c-4084-9866-0b2ba732c25b.mov
With error
https://user-images.githubusercontent.com/11807069/186199645-e02cfb48-8400-428e-8c4b-a2c4cebb5ef8.mov
This PR adds a progress screen after submission, developed according to  PF4 design recommendation: https://www.patternfly.org/v4/components/wizard/design-guidelines

[x] Add progress component
[x] Trigger public ssh key upload
[x] Trigger AWS reservation creation
[x] Render errors
[ ] Testing
[ ] Optional: create a polling for reservation status

@ezr-ondrej, rebased :)

repo: RHEnVision/provisioning-frontend


text:
Support riscos build service

This PR contains:

[x] bugfix
[x] feature
[ ] refactor
[ ] documentation
[ ] other

Are tests included?

[ ] no
[x] yes (bugfixes and features will not be merged without tests)

In the sense that we test that it will build, only.

Breaking Changes?

[x] no
[ ] yes (breaking changes will not be merged unless absolutely necessary – please provide motivation)

List any relevant issue numbers:

Description

This change introduces building through the RISC OS Build Service. It also reworks the code slightly to make it more likely to work with older compilers (it's C89 compatible), and fixes a socket leak. And fixes the header that never worked due to a poor compiler #ifndef check
The CI build is a rudimentary process right now - we just run the build and copy a few files around.
We don't yet handle the application, which can come a little later.
There are no explicit tests present right now, but then there weren't originally either.
Outstanding work

[ ] Replace custom Makefile with more regular makefile.
[ ] Add documentation build.
[ ] Add application release.
[ ] Fix Data filetypes
[ ] Determine what to do about the multiple LICENSE files.

Archive outputs
The archive contains the following structure (from the unzip tool), which isn't entirely nice:
charles@laputa ~/external/WakeOnLAN/src (support-riscos-build-service)> python -m rozipfile --list /tmp/built,a91
LICENSE/1                     WR/WR     Data       00:51:48 12-Dec-2022    1Kbytes
LICENSE/2                     WR/WR     Data       00:51:48 12-Dec-2022   11Kbytes
Tools                         DWR/WR    Directory  00:51:24 12-Dec-2022    0 bytes
Tools.Internet                DWR/WR    Directory  00:51:48 12-Dec-2022    0 bytes
Tools.Internet.Help           DWR/WR    Directory  00:51:48 12-Dec-2022    0 bytes
Tools.Internet.WakeOnLan      WR/WR     Absolute   00:51:49 12-Dec-2022    5Kbytes
Tools.Internet.Help.WakeOnLan WR/WR     Data       00:51:48 12-Dec-2022  254 bytes

I'm not sure why it hasn't triggered the CI run, but maybe it's because the twitter notify failed?

Hi Charles,Thanks a lot for the work and the info. Normally the twitter action works fine, but I believe the PR was made to merge directly to main, while normally we do PR to merge to develop, that may be why the action has failed.My apologies, I should have mentioned that. Let me see if I can disable the actions we already have and then I’ll resync develop from main.I am not home at the moment, so it will take a bit, sorry for making you wait.- PaoloOn 12 Dec 2022, at 11:04, Charles Ferguson @.***> wrote:
I'm not sure why it hasn't triggered the CI run, but maybe it's because the twitter notify failed?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hi again,
Ok so twitter sync workflow is disabled now, so you should not have any issue from it.
I also see that your’ workflow is still not it, which is probably why it did not trigger?
Again thank you so much for your help, cheers,

Paolo

On Dec 12, 2022, at 12:03 PM, P.Zaino @ ZFP @.***> wrote:
Hi Charles,
Thanks a lot for the work and the info. Normally the twitter action works fine, but I believe the PR was made to merge directly to main, while normally we do PR to merge to develop, that may be why the action has failed.
My apologies, I should have mentioned that. Let me see if I can disable the actions we already have and then I’ll resync develop from main.
I am not home at the moment, so it will take a bit, sorry for making you wait.

Paolo

On 12 Dec 2022, at 11:04, Charles Ferguson @.***> wrote:

I'm not sure why it hasn't triggered the CI run, but maybe it's because the twitter notify failed?
—
Reply to this email directly, view it on GitHub https://github.com/RISC-OS-Community/WakeOnLAN/pull/16#issuecomment-1346280251, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDKMEOZYEFQNLAMF3KZ6PTWM4BEVANCNFSM6AAAAAAS3K2YAA.
You are receiving this because you are subscribed to this thread.

Oh sorry, I'd not noticed it should have been against develop. I can rebase to go against develop instead if that's helpful. As for the pipeline... I'm pretty sure I /had/ included the workflow. I shall investigate.

Ah-ha... spotted it. It was because I had said it only triggers on pushes to branches, but of course a PR isn't a branch push (strictly), so I have to use the pull_request conditional. This is different to how I've done the jobs usually because for normal things I'm not using a fork. I think it should be able to work now - although it claims to be waiting for approval...

Not sure if that means that it's going to do that approval thing on every push though.

Ok approved and ran it (sorry couldn't wait!) looks like it worked!!! 😄

@gerph ,
quick question, is this one ready for merge?
Sorry, had a lot of things going on and lost track of this one, and this is a very useful feature to have.
Thanks,

I need to return to it and replace the makefiles that use my build system with a regular makefile so that it's not special for the build service, I think. Then it'll be ok. Sorry I got distracted with the videos and then doing my 2022 write up. Maybe next week I'll have some time for it.

[ ] Replace Makefile with standard (non-build system specific) makefile.

authors: gerph pzaino

repo: RISC-OS-Community/WakeOnLAN


text:
Period Range End of Month Incorrect

When a period is being parsed on the last day of the month, the endDate is being set to the first day of the same month as the startDate, which means the endDate comes before the startDate.  This change moves the endDate one month forward if this happens.

Merged via command line

authors: RISCfuture skajake

repo: RISCfuture/SwiftMETAR


text:
How to pass subdomains and domains

I'm trying to pass domains to Route53 like this:
  domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    sub_domain = "dev"
    hosted_zones = [
      {
        name = "dev.abc.ge"
      },
      {
        name = "www.dev.abc.ge"
      }
    ]
  }

but getting this error

Error: no matching Route53Zone found
│
│   with module.deploy.module.public_resources[0].data.aws_route53_zone.hosted_zone["www.dev.abc.ge-false"],
│   on terraform-aws-open-next/modules/tf-aws-open-next-public-resources/data.tf line 5, in data "aws_route53_zone" "hosted_zone":
│    5: data "aws_route53_zone" "hosted_zone" {

What is this -false? What am I doing wrong?

hi @Saba-Shavidze,
What is this -false?
This flag indicates whether the hosted zone is private (true) or public (false). This documentation  https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html provides more context on private hosted zones
It looks like the issue is with the "www.dev.abc.ge" hosted zone.
Are you trying to have the domain dev.abc.ge associated with the distribution?
If so, assuming you have a hosted zone called abc.ge, you would need to set the subdomain argument to be "dev"
If your hosted zone is called dev.abc.ge, then you can omit the subdomain

No, I just need to have two 2 records for this domain dev.abc.ge and www.dev.abc.ge

Hi @Saba-Shavidze, I just noticed a bit of a flaw in the module.
So you can add dev.abc.ge however I need to modify the module to support www.dev.abc.ge
If your hosted zone is set to dev.abc.ge you will need the following config
domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    hosted_zones = [
      {
        name = "dev.abc.ge"
      }
    ]
  }

If your hosted zone is set to abc.ge you will need the following config
domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    sub_domain = "dev"
    hosted_zones = [
      {
        name = "abc.ge"
      }
    ]
  }

to support www.dev.abc.ge
I am going to add another input argument (likely called include_www) to domain_config to allow this to be conditionally enabled. to prevent a change in behaviour the default of this will be false
So the terraform config would be
domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    include_www = true
    sub_domain = "dev"
    hosted_zones = [
      {
        name = "abc.ge"
      }
    ]
  }

Does that work for you?

I just need to write up some documentation. Hopefully, will have a patch out by the 7th March.

Yes, as soon as possible if u have a time, or give me some sugesstion how to do that.
Also, there is an error when trying to update the domain names:
creating Route 53 Record: InvalidChangeBatch: [Tried to create resource record set [name='dev.abc.ge.', type='A'] but it already exists]
│       status code: 400, request id: 346ebe8f-c80b-4bf8-a09c-12

Hey @Saba-Shavidze, I have pushed out v2.3.0 of the module, this should allow you to set the www subdomain and also configure the module to override the Route53 entries

You will need to update your terraform configuration to include the following
domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    include_www = true
    route53_record_allow_overwrite = true
    sub_domain = "dev"
    hosted_zones = [
      {
        name = "abc.ge"
      }
    ]
  }

The full documentation for the possible configuration options can be found at https://github.com/RJPearson94/terraform-aws-open-next/blob/main/docs/domain-config.md

Thanks, I will update it for tomorrow and update about my updates as well ❤😀

So I needed a new local variable to hold a value internally then conditionally apply another modification. The aliases local is set using the temp variable

I misread your message slightly. 2 new locals were introduced for route53_entries and aliases. to hold temporary values to apply subsequent changes conditionally.
Aliases before
aliases = var.domain_config != null ? formatlist(join(".", compact([var.domain_config.sub_domain, "%s"])), distinct([for hosted_zone in var.domain_config.hosted_zones : hosted_zone.name])) : []
Aliases after
temp_aliases = var.domain_config != null ? concat(formatlist(join(".", compact([var.domain_config.sub_domain, "%s"])), distinct([for hosted_zone in var.domain_config.hosted_zones : hosted_zone.name]))) : []
aliases      = try(var.domain_config.include_www, false) == true ? flatten([for alias in local.temp_aliases : [alias, "www.${alias}"]]...) : local.temp_aliases
Route 53 entries before
route53_entries = try(var.domain_config.create_route53_entries, false) == true ? { for hosted_zone in var.domain_config.hosted_zones : join("-", compact([hosted_zone.name, hosted_zone.id, hosted_zone.private_zone])) => {
name    = join(".", compact([var.domain_config.sub_domain, hosted_zone.name]))
zone_id = coalesce(hosted_zone.id, data.aws_route53_zone.hosted_zone[join("-", compact([hosted_zone.name, hosted_zone.private_zone]))].zone_id)
} } : {}
Route 53 entries after
temp_route53_entries = try(var.domain_config.create_route53_entries, false) == true ? { for hosted_zone in var.domain_config.hosted_zones : join("-", compact([hosted_zone.name, hosted_zone.id, hosted_zone.private_zone])) => {
name            = join(".", compact([var.domain_config.sub_domain, hosted_zone.name]))
zone_id         = coalesce(hosted_zone.id, data.aws_route53_zone.hosted_zone[join("-", compact([hosted_zone.name, hosted_zone.private_zone]))].zone_id)
allow_overwrite = var.domain_config.route53_record_allow_overwrite
} } : {}
route53_entries = try(var.domain_config.include_www, false) == true ? merge([for name, route53_details in local.temp_route53_entries : { "${name}" = route53_details, "www_${name}" = { name = "www.${route53_details.name}", zone_id = route53_details.zone_id, allow_overwrite = route53_details.allow_overwrite } }]...) : local.temp_route53_entries

Have you managed to resolve your issue?

@RJPearson94 I'll update you for Monday.

Hi again, It didn't add alternate domain name with www : www.dev.abc.ge

Are you able to share your terraform/ terragrunt config?

  domain_config = {
    viewer_certificate = {
      acm_certificate_arn = local.acm_certificate_arn
    }
    include_www = true
    route53_record_allow_overwrite = true
    hosted_zones = flatten([
      for name in keys(local.route53_zone_zone_id) : { name = name }
    ])
  }

Yes I'm using latest version v2.3.0.

Hi @Saba-Shavidze,
I have been unable to replicate this using Terraform or OpenTofu.
I have been able to deploy a website with www subdomain using the following terraform code
data "aws_caller_identity" "current" {}

locals {
    route53_zone_zone_id = { "abc.co.uk": "test" }
}

module "zone" {
  source = "RJPearson94/open-next/aws//modules/tf-aws-open-next-zone"
  version = "2.3.0"

  prefix = "open-next-sz-${data.aws_caller_identity.current.account_id}"
  folder_path = "./.open-next"
  s3_exclusion_regex = ".*\\.terragrunt*"

  continuous_deployment = {
    use = true
    deployment = "NONE"
    traffic_config = {
      header = {
        name = "aws-cf-cd-staging"
        value = "true"
      }
    }
  }

  website_bucket = {
    force_destroy = true
  }

  domain_config = {
    route53_record_allow_overwrite = true
    include_www = true
    hosted_zones = flatten([
      for name in keys(local.route53_zone_zone_id) : { name = name }
    ])

    viewer_certificate = {
        acm_certificate_arn = "arn:aws:acm:us-east-1:11111111111:certificate/abc1234"
    }
  }

  providers = {
    aws.server_function = aws.server_function
    aws.iam = aws.iam
    aws.dns = aws.dns
    aws.global = aws.global
  }
}

In CloudFront, this created the following

Note: I have changed the html to mask my account/ CloudFront details
I hope this helps, but if you require any further assistance, I would need access to your Terraform script to see if I can replicate the issue
Kind Regards
Rob

hmm, I will try again.

Error: creating Route 53 Record: InvalidChangeBatch: [RRSet of type A with DNS name www.dev.abc.ge. is not permitted because a conflicting RRSet of type CNAME with the same DNS name already exists in zone dev.abc.ge.]
│ 	status code: 400, request id: ab2200c6-e7a9-40ba-a3d8-03f7939b1f79
│
│   with module.deploy.module.public_resources[0].aws_route53_record.route53_a_record["www_dev.abc.ge-false"],
│   on terraform-aws-open-next/modules/tf-aws-open-next-public-resources/main.tf line 1342, in resource "aws_route53_record" "route53_a_record":
│ 1342: resource "aws_route53_record" "route53_a_record" {
│
╵
╷
│ Error: creating Route 53 Record: InvalidChangeBatch: [RRSet of type AAAA with DNS name www.dev.abc.ge. is not permitted because a conflicting RRSet of type CNAME with the same DNS name already exists in zone dev.abc.ge.]
│ 	status code: 400, request id: 6fe98c45-84d5-4968-873c-472dda137e2a
│
│   with module.deploy.module.public_resources[0].aws_route53_record.route53_aaaa_record["www_dev.abc.ge-false"],
│   on terraform-aws-open-next/modules/tf-aws-open-next-public-resources/main.tf line 1359, in resource "aws_route53_record" "route53_aaaa_record":
│ 1359: resource "aws_route53_record" "route53_aaaa_record" {

It actually created and add the www domain, but throw this error while deploying application

I resolved it, you can close the issue.
Thanks a lot for your help.

No problem, glad I could help

authors: RJPearson94 Saba-Shavidze shavidze


text:
🛑 Cleanse Drops Kidney is down

In 4c8cd12, Cleanse Drops Kidney (http://cleansedropskidney.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cleanse Drops Kidney is back up in be399be after 21 minutes.

repo: RJVCA/uptime


text:
🛑 CEOTR Home Page loads is down

In 4a0c1f4, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in c4a9d46 after 43 days, 19 hours.

repo: RKTowse/upptime


text:
🛑 CEOTR Home Page loads is down

In fbf8472, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in fc0e15d after 2 minutes.


text:
🛑 CEOTR Home Page loads is down

In 5228725, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in 9d82600 after 2 minutes.


text:
🛑 Sensor Tracker login is down

In 9b916dc, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in eb3cadf after 1 minute.


text:
🛑 CEOTR Home Page loads is down

In e5b69c3, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in a72fc43 after 2 minutes.


text:
🛑 Sensor Tracker login is down

In 89630a1, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 655884b after .


text:
🛑 Sensor Tracker login is down

In 313af97, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 8ebd8d6 after .


text:
🛑 CEOTR Home Page loads is down

In 4b6a105, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in b393074 after 2 minutes.


text:
🛑 Sensor Tracker login is down

In fdbab31, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 4033a1d after .


text:
🛑 Sensor Tracker login is down

In b041fa3, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in d71458e after .


text:
🛑 CEOTR Home Page loads is down

In 8cf2899, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in f5511f4 after 2 minutes.


text:
🛑 Sensor Tracker login is down

In 2eac1c6, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 502
Response time: 55 ms

Resolved: Sensor tracker login is back up in 633f1f5.


text:
🛑 CEOTR Home Page loads is down

In ffad21d, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in e929f02.


text:
🛑 Sensor Tracker login is down

In 727dcd1, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 242e37f after .


text:
🛑 Sensor Tracker login is down

In 0982096, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 780ba27 after .


text:
🛑 Sensor Tracker login is down

In 2d46722, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 502
Response time: 52 ms

Resolved: Sensor tracker login is back up in 3671020.


text:
🛑 Sensor Tracker login is down

In 399cb2e, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensor tracker login is back up in 3d1e049 after .


text:
🛑 CEOTR Home Page loads is down

In 39730b0, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in d51a47c after 2 minutes.


text:
🛑 CEOTR Home Page loads is down

In 8e33e2f, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in ef80aa9 after 2 minutes.


text:
🛑 CEOTR Home Page loads is down

In 22ab127, CEOTR Home Page loads (https://stg.ceotr.ca CEOTR Home) was down:

HTTP code: 0
Response time: 0 ms

Resolved: CEOTR Home Page loads is back up in 3f0a1a5 after 2 minutes.


text:
🛑 Sensor Tracker login is down

In 2060cf0, Sensor Tracker login (https://stg.ceotr.ca/sensor_tracker) was down:

HTTP code: 502
Response time: 119 ms

Resolved: Sensor tracker login is back up in bb47ad2 after 42 days, 11 hours, 55 minutes.


text:
New features, open source?

Hi there, I absolutely love the plugin.
First of all sorry for writing this here at the docs repo, but I didn't know where else to write it.
As this plugin is free, have you thought about sharing the source git project as well, so others can contribute to it?
It is already great, but it still kind of feels unfinished.
For example I would suggest to add the following nodes:
Random:

Byte
Boolean

Reverse:

Boolean
Byte
Text
Transform
Rotator
integer64

Extract

Boolean
Byte
Text
Transform
Rotator
integer64

Thank you for these suggestions, I will add them in the next update as soon as I can ! I will think about releasing the source code here

authors: RLoris brexGmbH

repo: RLoris/ArrayHelperDoc


text:
tutlebot_gazebo building error

OS: Ubuntu 20.04 Xfce
ROS-Version: ROS2 Foxy
Hello,
when trying to set up the turtlebot3 simulation following the e-manual I keep running into the same problem over and over again:

--- stderr: turtlebot3_gazebo
CMake Error in CMakeLists.txt:
Imported target "dart" includes non-existent path
"/include"
in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
The path was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and references files it does not
provide.

Installing the turtlebot3_simulations package as a source file also didn't work for me.
Does anyone have an idea how to fix this issue?
Thank you.
Sincerly Nik

Hi @nikboy111.
Thank you for your questions.
Your installation package seems to be faulty
Please refer to PC Setup in the Quick Start Guide and reinstall.
Thank you.

Hi @ashekim,
thank you for your answer. I resinstalled ROS as well as all the packages mentioned in the Guide and still get the same error.

Hello. @nikboy111.
The problem seems to be caused by the dart package.
I am attaching an issue with symptoms similar to yours.
https://github.com/dartsim/dart/issues/1428
thank you.

Same issue as @nikboy111 here on Ubuntu 20.04. Any help welcome

Hi @shrinivas96 @p79281 @nikboy111 , does anyone of you managed to solve the problem?


text:
Warnings caused by linker flags passed during compilation [unused-command-line-argument]

ROCm 3.7 hip-config file inserts link options on the compile line ( https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-3.7.x/hip-config.cmake.in#L213 )
  set_property(TARGET hip::device APPEND PROPERTY
    INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
  )

These looks to be causing the resulting compile time warnings
clang-11: warning: -lclang_rt.builtins-x86_64: 'linker' input unused [-Wunused-command-line-argument]
clang-11: warning: argument unused during compilation: '-L/opt/rocm-3.7.0/llvm/lib/clang/11.0.0/../lib/linux/' [-Wunused-command-line-argument]

Am I correct in presuming that this application of links flags for compiling is a mistake? If this is needed, I would like to know if we can get this warning removed as it currently breaks -Werror builds.

that is because that option is passed to device linking command but not used. we will fix that.

So to clarify is this link option is required when compiling, or just when doing linking when gpu-rdc is enabled?

this link option is required when compiling.

@yxsamliu Does hipcc also need to be updated ( https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-3.7.x/bin/hipcc#L845 ) as it only adds this when linking?

no. this will be fixed in clang driver.

sorry, this issue was actually due to hip-config.cmake.in.
Instead of
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
)
It should be
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_LINK_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
)
we will fix hip-config.cmake.in

Closing as this has been fixed in ROCm 4.0

Closing as this has been fixed in ROCm 4.0

authors: robertmaynard yxsamliu

repo: ROCm-Developer-Tools/HIP