Accelerate not working when setting subset of GPUs as visible CUDA devices

System Info
/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: '/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torchvision/image.so: undefined symbol: _ZN3c1017RegisterOperatorsD1Ev'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(

Copy-and-paste the text below in your GitHub issue

- `Accelerate` version: 0.27.0
- Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.35
- Python version: 3.11.6
- Numpy version: 1.26.4
- PyTorch version (GPU?): 2.2.0 (True)
- PyTorch XPU available: False
- PyTorch NPU available: False
- System RAM: 125.63 GB
- GPU type: NVIDIA GeForce RTX 4090
- `Accelerate` default config:
	- compute_environment: LOCAL_MACHINE
	- distributed_type: MULTI_GPU
	- mixed_precision: no
	- use_cpu: False
	- debug: False
	- num_processes: 2
	- machine_rank: 0
	- num_machines: 1
	- rdzv_backend: static
	- same_network: False
	- main_training_function: main
	- downcast_bf16: False
	- tpu_use_cluster: False
	- tpu_use_sudo: False

I hav 1 3090 , and 2 4090 GPUs

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
I have this loop
def train_ddp_accelerate(CFG, fold_id, train, output_path):
    accelerator = Accelerator(split_batches=True,mixed_precision='fp16')
   # accelerator = Accelerator(mixed_precision='fp16')
    set_seed(CFG.seed)

    device = accelerator.device #'cuda'#torch.device(CFG.device)

    train_path_label, val_path_label, _, _ = get_path_label(fold_id, train_all)
    train_transform, val_transform = get_transforms(CFG)

    train_dataset = HMSHBACSpecDataset(**train_path_label, transform=train_transform)
    val_dataset = HMSHBACSpecDataset(**val_path_label, transform=val_transform)

    train_loader = torch.utils.data.DataLoader(
        train_dataset, batch_size=CFG.batch_size,pin_memory=True, num_workers=4, shuffle=True, drop_last=True)
    val_loader = torch.utils.data.DataLoader(
        val_dataset, batch_size=CFG.batch_size,pin_memory=True, num_workers=4, shuffle=False, drop_last=False)

    model = HMSHBACSpecModel(
        model_name=CFG.model_name, pretrained=True, num_classes=6, in_channels=1)

   # model = torch.nn.parallel.DataParallel(model, device_ids=[0, 1, 2])

    optimizer = optim.AdamW(params=model.parameters(), lr=CFG.lr, weight_decay=CFG.weight_decay)
    scheduler = lr_scheduler.OneCycleLR(
        optimizer=optimizer, epochs=CFG.max_epoch,
        pct_start=0.0, steps_per_epoch=len(train_loader),
        max_lr=CFG.lr, div_factor=25, final_div_factor=4.0e-01
    )

    loss_func = KLDivLossWithLogits()
    loss_func.to(device)
  #  loss_func = torch.nn.parallel.DataParallel(loss_func, device_ids=[0, 1, 2])
    loss_func_val = KLDivLossWithLogits()
    loss_func_val.to(device)
  #  loss_func_val = torch.nn.parallel.DataParallel(loss_func_val, device_ids=[0, 1, 2])

    # Send everything through `accelerator.prepare`
    train_loader, val_loader, model, optimizer,scheduler = accelerator.prepare(
        train_loader, val_loader, model, optimizer,scheduler
    )

    best_val_loss = 1.0e+09
    best_epoch = 0
    train_loss = 0
    # Train for a single epoch

    for epoch in range(1, CFG.max_epoch + 1):
        epoch_start = time()

        model.train()
        for batch in train_loader:
            #batch = to_device(batch, device)
            x, t = batch["data"], batch["target"]

            optimizer.zero_grad()
            with accelerator.autocast():
                y = model(x)
                loss = loss_func(y, t)
            accelerator.backward(loss)
            optimizer.step()
            if not accelerator.optimizer_step_was_skipped:
                scheduler.step()
            train_loss += loss.detach()

        train_loss /= len(train_loader)

        # Evaluate
        model.eval()
        correct = 0
        val_loss=0
        with torch.no_grad():
            for batch in val_loader:
                x, t = batch["data"], batch["target"]
               # x = to_device(x, device)

                val_loss +=  loss_func_val(y, t).detach()

        val_loss /= len(val_loader)

        accelerator.wait_for_everyone()
        total_val_loss = accelerator.reduce(val_loss).cpu()
        total_train_loss = accelerator.reduce(train_loss).cpu()
        if val_loss < best_val_loss:

            best_epoch = epoch
            best_val_loss = val_loss
            # print("save model")

            if accelerator.is_main_process:
                accelerator.save_model(model, str(output_path) + f'snapshot_epoch_{epoch}')

        #reduced_tensor = accelerator.reduce(process_tensor, reduction="sum")

        elapsed_time = time() - epoch_start
        accelerator.wait_for_everyone()
        if accelerator.is_main_process:
            print(
                f"[epoch {epoch}] train loss: {total_train_loss: .6f}, val loss: {total_val_loss: .6f}, elapsed_time: {elapsed_time: .3f}")

        accelerator.wait_for_everyone()
        if epoch - best_epoch > CFG.es_patience:
            if accelerator.is_main_process:
                print("Early Stopping!")
            accelerator.wait_for_everyone()
            break

        train_loss = 0

    #print(f'Accuracy: {100. * correct / len(val_loader.dataset)}')
    accelerator.end_training()
    accelerator.clear()`

When running like this it runs as expected:

import os

os.environ["NCCL_P2P_DISABLE"]="1"

for fold_id in FOLDS[3:]:
    output_path = Path(f"fold{fold_id}")
    output_path.mkdir(exist_ok=True)
    print(f"[fold{fold_id}]")
    notebook_launcher(train_ddp_accelerate, args=(CFG, fold_id, train, output_path), num_processes=3,mixed_precision='fp16')

But when running like this
import os
os.environ['CUDA_DEVICE_ORDER']="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "1,2"
os.environ["NCCL_P2P_DISABLE"]="1"

for fold_id in FOLDS[3:]:
    output_path = Path(f"fold{fold_id}")
    output_path.mkdir(exist_ok=True)
    print(f"[fold{fold_id}]")
    notebook_launcher(train_ddp_accelerate, args=(CFG, fold_id, train, output_path), num_processes=2,mixed_precision='fp16')

I get
> ---------------------------------------------------------------------------
ProcessRaisedException                    Traceback (most recent call last)
File [~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:200](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:200), in notebook_launcher(function, args, num_processes, mixed_precision, use_port, master_addr, node_rank, num_nodes)
    [199](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:199) try:
--> [200](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:200)     start_processes(launcher, args=args, nprocs=num_processes, start_method="fork")
    [201](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:201) except ProcessRaisedException as e:

File [~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:197](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:197), in start_processes(fn, args, nprocs, join, daemon, start_method)
    [196](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:196) # Loop on join until it returns True or raises an exception.
--> [197](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:197) while not context.join():
    [198](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:198)     pass

File [~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:158](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:158), in ProcessContext.join(self, timeout)
    [157](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:157) msg += original_trace
--> [158](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py:158) raise ProcessRaisedException(msg, error_index, failed_process.pid)

ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 315, in _lazy_init
    queued_call()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 183, in _check_capability
    capability = get_device_capability(d)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 439, in get_device_capability
    prop = get_device_properties(device)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 457, in get_device_properties
    return _get_device_properties(device)  # type: ignore[name-defined]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1704987288773/work/aten/src/ATen/cuda/CUDAContext.cpp":50, please report a bug to PyTorch. device=2, num_gpus=

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

Traceback (most recent call last):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 68, in _wrap
    fn(i, *args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/utils/launch.py", line 570, in __call__
    self.launcher(*args)
  File "/tmp/ipykernel_1310472/2664963675.py", line 3, in train_ddp_accelerate
    accelerator = Accelerator(mixed_precision='fp16')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/accelerator.py", line 378, in __init__
    self.state = AcceleratorState(
                 ^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/state.py", line 771, in __init__
    PartialState(cpu, **kwargs)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/state.py", line 236, in __init__
    torch.cuda.set_device(self.device)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 408, in set_device
    torch._C._cuda_setDevice(device)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 321, in _lazy_init
    raise DeferredCudaCallError(msg) from e
torch.cuda.DeferredCudaCallError: CUDA call failed lazily at initialization with error: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1704987288773/work/aten/src/ATen/cuda/CUDAContext.cpp":50, please report a bug to PyTorch. device=2, num_gpus=

CUDA call was originally invoked at:

  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 195, in start
    self.asyncio_loop.run_forever()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
    self._run_once()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
    handle._run()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 542, in dispatch_queue
    await self.process_one()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 531, in process_one
    await dispatch(*args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 359, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 775, in execute_request
    reply_content = await reply_content
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 446, in do_execute
    res = shell.run_cell(
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3051, in run_cell
    result = self._run_cell(
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3106, in _run_cell
    result = runner(coro)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3311, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3493, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_1310472/3735111654.py", line 18, in <module>
    import torch
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/__init__.py", line 1421, in <module>
    _C._initExtension(manager_path())
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 247, in <module>
    _lazy_call(_check_capability)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 244, in _lazy_call
    _queued_calls.append((callable, traceback.format_stack()))

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

RuntimeError                              Traceback (most recent call last)
Cell In[31], [line 6](vscode-notebook-cell:?execution_count=31&line=6)
      [4](vscode-notebook-cell:?execution_count=31&line=4) output_path.mkdir(exist_ok=True)
      [5](vscode-notebook-cell:?execution_count=31&line=5) print(f"[fold{fold_id}]")
----> [6](vscode-notebook-cell:?execution_count=31&line=6) notebook_launcher(train_ddp_accelerate, args=(CFG, fold_id, train, output_path), num_processes=2,mixed_precision='fp16')

File [~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:210](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:210), in notebook_launcher(function, args, num_processes, mixed_precision, use_port, master_addr, node_rank, num_nodes)
    [203](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:203)                 raise RuntimeError(
    [204](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:204)                     "CUDA has been initialized before the `notebook_launcher` could create a forked subprocess. "
    [205](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:205)                     "This likely stems from an outside import causing issues once the `notebook_launcher()` is called. "
    [206](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:206)                     "Please review your imports and test them when running the `notebook_launcher()` to identify "
    [207](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:207)                     "which one is problematic and causing CUDA to be initialized."
    [208](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:208)                 ) from e
    [209](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:209)             else:
--> [210](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:210)                 raise RuntimeError(f"An issue was found when launching the training: {e}") from e
    [212](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:212) else:
    [213](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:213)     # No need for a distributed launch otherwise as it's either CPU, GPU or MPS.
    [214](https://file+.vscode-resource.vscode-cdn.net/home/felipe/ssdpny0/hms-harmful-brain-activity-classification/code/~/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/launchers.py:214)     if is_mps_available():

RuntimeError: An issue was found when launching the training:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 315, in _lazy_init
    queued_call()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 183, in _check_capability
    capability = get_device_capability(d)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 439, in get_device_capability
    prop = get_device_properties(device)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 457, in get_device_properties
    return _get_device_properties(device)  # type: ignore[name-defined]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1704987288773/work/aten/src/ATen/cuda/CUDAContext.cpp":50, please report a bug to PyTorch. device=2, num_gpus=

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

Traceback (most recent call last):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 68, in _wrap
    fn(i, *args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/utils/launch.py", line 570, in __call__
    self.launcher(*args)
  File "/tmp/ipykernel_1310472/2664963675.py", line 3, in train_ddp_accelerate
    accelerator = Accelerator(mixed_precision='fp16')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/accelerator.py", line 378, in __init__
    self.state = AcceleratorState(
                 ^^^^^^^^^^^^^^^^^
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/state.py", line 771, in __init__
    PartialState(cpu, **kwargs)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/accelerate/state.py", line 236, in __init__
    torch.cuda.set_device(self.device)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 408, in set_device
    torch._C._cuda_setDevice(device)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 321, in _lazy_init
    raise DeferredCudaCallError(msg) from e
torch.cuda.DeferredCudaCallError: CUDA call failed lazily at initialization with error: device >= 0 && device < num_gpus INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1704987288773/work/aten/src/ATen/cuda/CUDAContext.cpp":50, please report a bug to PyTorch. device=2, num_gpus=

CUDA call was originally invoked at:

  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 195, in start
    self.asyncio_loop.run_forever()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
    self._run_once()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
    handle._run()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 542, in dispatch_queue
    await self.process_one()
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 531, in process_one
    await dispatch(*args)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 359, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 775, in execute_request
    reply_content = await reply_content
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 446, in do_execute
    res = shell.run_cell(
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3051, in run_cell
    result = self._run_cell(
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3106, in _run_cell
    result = runner(coro)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/async_helpers.py", line 129, in _pseudo_sync_runner
    coro.send(None)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3311, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3493, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_1310472/3735111654.py", line 18, in <module>
    import torch
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/__init__.py", line 1421, in <module>
    _C._initExtension(manager_path())
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 247, in <module>
    _lazy_call(_check_capability)
  File "/home/felipe/anaconda3/envs/cuda_12.1/lib/python3.11/site-packages/torch/cuda/__init__.py", line 244, in _lazy_call
    _queued_calls.append((callable, traceback.format_stack()))

Expected behavior
It runs with 2 GPUs as it does with 3 GPUs and 3 processes

Hi @MrRobot2211, could you try to run it without setting os.environ["CUDA_VISIBLE_DEVICES"] = "1,2". I want to check if this is the line that causes the issue. Thanks !

Hello, it does run to completion without setting CUDA visible devices ( it
runs on 3 GPUs). If you can point me to a code/tutorial that you are
confident should run identically both ways I am happy to try that.
On Fri, Feb 23, 2024, 11:51 Marc Sun @.***> wrote:

Hi @MrRobot2211 https://github.com/MrRobot2211, could you try to run it
without setting os.environ["CUDA_VISIBLE_DEVICES"] = "1,2". I want to
check if this is the line that causes the issue. Thanks !
—
Reply to this email directly, view it on GitHub
https://github.com/huggingface/accelerate/issues/2459#issuecomment-1961667118,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFTMVKELX64XJLTKIGIVBYDYVDCKBAVCNFSM6AAAAABDN2YQ62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRRGY3DOMJRHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@MrRobot2211 what happens if you set CUDA_VISIBLE_DEVICES before any import to torch/accelerate?
IIRC this is needed to happen because torch does some things on import


Support getting calibration by timestamp in Engine

cg.EngineClient.get_calibration accepts a timestamp for getting a specific calibration, but cg.engine.get_engine_calibration does not. We should update the latter to match the former.
On a related note, what is the recommended way to get calibrations? The tutorial uses an Engine object, which has no "get_calibration" method (only "run_calibration").

CC @dstrain115.

@verult Can you take care of this?  It should be a fairly straightforward change.  @wcourtney for visibility.

Bumping this - had an issue where one of our hardware team members wanted to get older calibrations and had to jump through some hoops because this method didn't support it.


Training problem

Hi, very nice work. I'm trying to reproduce the results on a new image dataset but I'm experiencing a blocking problem.
The problem's output is as follows:
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [64, 3, 3, 3], but got 5-dimensional input of size [16, 1, 3, 448, 448] instead
I find it on line 360 of the 'main.py' file when the function 'train_one_epoch()' is called.
Do you have any idea how I can solve it?
I'm pretty sure that [16] is about batch size, because I tried editing several times; while [448,448] is the image size.
Thank you

Thanks for your interest. The input size should be 4-dimensional tensor with [batch_size, 3, img_size, img_size]. So, just simply remove the additional dimension by using "squeeze(1)".

Thank you so much, it worked!

Sorry to bother, I encountered an additional error again at the same line you quote:
RuntimeError: The size of tensor a (37) must match the size of tensor b (197) at non-singleton dimension 0
Also I add some information, I am using as batch size 16, image size 200 and I am trying to classify the images into only 2 classes.
Do you have any advice for me regarding this error?

Sorry to bother you again but I am having another problem during the training phase.
I get this error on line 204 related to the validation_cluster function:
AttributeError: 'DataParallel' object has no attribute 'data_root'
in
File "main.py", line 204, in validation_cluster
ImageDataset(args.data_root, test_file, data_size=args.data_size), args.batch_size, shuffle=False,
I emphasize the fact that I had to change model from RN50x64 to RN50 due to limited GPU.
Do you have any advice for me? Thank you


Next endpoint with Path Param

Create an endpoint that will recieve a path param and will return
{"message": "Hello, <path_param>!"}

As reference https://fastapi.tiangolo.com/tutorial/path-params/


Remove PEX_HTTP_RETRIES and push into a flag for the pex tool

PEX_* environment variables are reserved for the PEX runtime.  Everything else should ideally be a flag to the pex tool or used via the API directly.

#726 grew PEX_HTTP_TIMEOUT which should be moved as well.

This is related to fixing #803.


Update supported installer platforms

These are the new installer platforms required for the April patches.
Remove ubuntu 17.04
Add ubuntu 17.10
Add ubuntu 18.04

@JunTaoLuo was there an issue tracking this? Changes look fine, but I didn't see if there was approval required.
cc @muratg

I'll create an issue. This was an ask from an email from @leecow. Apparently I was the only one on it so I'm not sure folks were aware.

https://github.com/aspnet/Universe/issues/971

@muratg The 2.1 installers are platform agnostic so there's no need to update them.


Add common abstraction for plugins

Add common abstraction for plugins, which helps to develop new one faster

What do you think about changing the GCS implementation to use this new classes right away? It might highlight potential flaws in their design.

@ivanyu I've done it. just split up PRs for simplicity ;-)

@ivanyu done


Issues with reproduction

I'm having some challenges reproducing the code on my local machine. The issue seems to be an error with torchtext but I honestly can't seem to figure out what exactly is causing it.
Here's a stacktrace.

To confirm it's not an environment issue, I tried running on google colab too but the same issue comes up, so it doesn't seem to be a versioning issue.

Do you have any idea what I might be missing?

It appears that I did not execute the environment check (the first cell) is the latest version of the Juptyer Notebook .  The first cell typically prints out the environment so we can eliminate that from debugging. I typically use python 3.6 (see below) and have tested the code on python 3.5 (David uses 3.5). I have NOT tested the code with 3.7:
 "3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) \n",
 "[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]\n"

I see from your first screencapture that you're using python3.7, but in the collab screencap is 3.6. So the problem is invariant to Python version 🤔  Okay, I suspect something is wrong with the model you have downloaded or your version of torch is incompatible/too-old since it's complaining it doesn't have an attribute that was added in October, 2018 (_split_tokenizer)

Can you please supply following output debug information:

$ python
Python 3.7.3 (default, Mar 27 2019, 16:54:48)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)

* From the top level directory, please do
`$ls -alrt ./models` so I can see the size of the model itself.

Output in the image below

okay, I'm back on my home machine now, I see that I'm using 1.0.0
$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.0.0
>>>

PyPI  states that 1.1 was just released April 30th, and this model was built and tested with 1.0.
Before I go debugging further, do you have a way to test it out with pytorch 1.0?. This will help me elminate pytorch versions from the list of suspects.
On my side, when I reach the office this afternoon, I have a more current environment there, I'll see if I can reproduce this issue.

Okay, I have eliminated pytorch  1.1 as the culprit. Going deeper, as you stated originally, the problem is with torchtext. My working system shows I'm using version 0.4.0
$ pip freeze | grep torchtext
torchtext==0.4.0

I will bet that your system says torchtext==0.3.1.
If you look at the requirements.txt in the top level of this repo, you have to do:
pip install git+https://github.com/pytorch/text.
I typically just do pip install -r requirements.txt to just collect all the the correct versions of dependencies. Unfortunately, pip install torchtext will only get you 0.3.1.
This is the issue that you have been running into:  https://github.com/pytorch/text/issues/517
To summarize:

keep your version pytorch1.1
do pip install git+https://github.com/pytorch/text
let me know the next errors 😬 😅

Updated the README to clarify dependencies. torchtext is a bit tricky since it does NOT follow the usual pip install torchtext formula (for now)


Fix compiler crash with object rest in catch binding

Fixes a crash when transforming the following to ES5:
try {} catch ({ a, ...b }) {}

~This also relocates some of our Debug code because we had some duplicative code across different files, which I discovered while adding some additional debug info while diagnosing the issue.~ (moving this to a separate PR)
Fixes #30627

I thought we did this in the es2015 transformer (see: https://github.com/microsoft/TypeScript/pull/11757 )?

Oh, ofc, object rest !== destructuring.

Object rest is destructuring, but wasn't introduced in es2015.


onDidChange does not report anything useful

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

VS Code Version: 1.64.0
OS Version: Win 11

I am creating an extension and I want to use git API. Basically I need to hook to events and find when the branch is changed. Here is my test.
const gitExtension = extensions.getExtension<GitExtension>("vscode.git")!.exports;
const git = gitExtension.getAPI(1);

const gitBaseExtension = extensions.getExtension<GitBaseExtension>("vscode.git-base")!.exports;
const gitbase = gitExtension.getAPI(1);

gitbase.onDidChangeState((e) => {
    if (e.toString().toLowerCase() === "initialized") {
        console.log(git.repositories);
        git.onDidChangeState((e) => {
            console.log("state", e);
        });
        git.repositories[0].state.onDidChange((e) => {
            console.log("repo", e);
        });
    }
    console.log("base", e);
});

Only this works when I change branch
git.repositories[0].state.onDidChange((e) => {
    console.log("repo", e);
});

But e is always undefined and I cannot get what happens either there was a commit, stage or new changed found. Is it a bug or a feature? Possible to get there type of event like I get e === 'initialized' on change state?

At the moment this is by design. The onDidChange event of the RepositoryState object is declared as Event<void> and it forwards the onDidRunGitStatus event of the Repository object. This is why the e argument is always undefined.
If your extension only implements functionality when the branch changes, you will have to listen to the onDidChange event and inspect the properties of the Repository object to see whether the branch has been changed.


Doesn't do anything.

VS Code version: 1.51.1
C# Extension v1.23.6
What I would like:
I would like it do do ANY of the things advertised in the extension, but it does literally NOTHING.
What happens:
A waste of time. I'm not sure whats supposed to happen, but whatever it is, doesn't work at all.

@DaMammoth Sorry you are having issue with the extension. Can you share the OmniSharp log from the Output pane of VS Code so that we can try to help resolve the issues you are seeing?

There was no log. The extension does nothing for me.

Also, I'm sorry if my issue came out as aggressive. I am having a really hard time with Visual Studio Code, and this problem hasn't helped.

Can you describe how you are using the extension? The extension works best when opening a folder that contains your .csproj or .sln files.

If you are new to using C# with VS Code, this tutorial and see if it works better https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code

Also, I'm sorry if my issue came out as aggressive. I am having a really hard time with Visual Studio Code, and this problem hasn't helped.

No worries. I think we've all been frustrated with technology before =)

Thanks so much, I'll make sure to check out the tutorial.


Organisation File related issues

[x] Error saving organisation data with too many budget related data

The issue has been fixed now.

[ ] Page has been unresponsive and keeps loading.


z history is pruned if a filesystem is not mounted

Issue: If I use z when a filesystem (like /home) is unmounted, all references to /home are instantly purged from the cd history.
This has caught me out enough times ( I have a 100TB zfs pool I unmount for maintenance occasionally ) that I use a patched z which tracks the mountpoint.
Missing paths are filtered as normal when deciding where to go, but paths are only deleted if they are missing AND the mountpoint is actually mounted.

not opposed to a way to deal with this, but not 100 sure how I'd go about it. If you want to share your patch maybe I'll get inspired :)

Hi
Unfortunately my code isn't a "patch" to your code, but more of a  reimplementation "inspired" by z which suits my needs.
The mountpoint stuff is also linux specific in that it reads /proc/self/mounts  rather than parsing the output of df, but I'm pretty sure they are very similar (make sure you use the -P flag on df if it is supported on the platform you are using.)
The logic was simple:

When "adding", check the mountpoint a path is under, and save that as a column

eg, /home/user/work/project/test -> saved as /home|/home/usr/work/project/test|...

When scanning the z history file, get awk to pre-load the list of mountpoints

eg. awk 'BEGIN{while("df -P" | getline ) { mount[$NF]=1 }}{...}'
When the first field (mountpoint) isnt in 'mounts', ignore it when picking a directory to go to, and avoid pruning it when adding (but age it out, in case it never comes back).

Regards

My ZSH-z plugin accomplishes this by having a ZSHZ_KEEP_DIRS array of directories that should never be removed and whose subdirectories should never be removed. Something similar could be done in the _z_dirs function.


System.Security.Cryptography.CryptographicException: The key {a429f209-7e38-40cd-81ec-c7d01317ef9e} was not found in the key ring

when i  deployed on iis ,update acton throwed the exception which  descripted as title,i donot wan to remove AntiforgeryValidation.How can i do ? i finded out serenity examples avoid to throw exception,when you throw a exception , the bellow exception was thrown.
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {a429f209-7e38-40cd-81ec-c7d01317ef9e} was not found in the key ring.

Closing due to inactivity.


Updated Python Extension description to add Jupyter Notebook support

For #

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[x] Title summarizes what is changing
[ ] Has a news entry file (remember to thank yourself!)
[ ] Appropriate comments and documentation strings in the code
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated
[ ] Test plan is updated as appropriate
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #8545 into master will decrease coverage by 58.7%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #8545       +/-   ##
==========================================
- Coverage    58.7%      0%   -58.71%
==========================================
  Files         511      59      -452
  Lines       23306     593    -22713
  Branches     3824      70     -3754
==========================================
- Hits        13682       0    -13682
+ Misses       8705     593     -8112
+ Partials      919       0      -919

Impacted Files
Coverage Δ

src/client/common/installer/serviceRegistry.ts
0% <0%> (-100%)
:arrow_down:

.../client/application/diagnostics/serviceRegistry.ts
0% <0%> (-100%)
:arrow_down:

src/client/debugger/extension/serviceRegistry.ts
0% <0%> (-100%)
:arrow_down:

src/client/common/serviceRegistry.ts
0% <0%> (-100%)
:arrow_down:

...ience/jupyter/jupyterDebuggerRemoteNotSupported.ts
0% <0%> (-100%)
:arrow_down:

src/client/interpreter/locators/services/conda.ts
0% <0%> (-100%)
:arrow_down:

src/client/common/utils/regexp.ts
0% <0%> (-100%)
:arrow_down:

src/client/common/utils/icons.ts
0% <0%> (-100%)
:arrow_down:

src/client/debugger/constants.ts
0% <0%> (-100%)
:arrow_down:

src/client/datascience/jupyter/jupyterUtils.ts
0% <0%> (-100%)
:arrow_down:

... and 480 more

Continue to review full report at Codecov.

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


Subscriptions api require importing wonka library

Note: this is not issue. More like opiniated discussion on how subscription API can evolve.

import { pipe, subscribe } from 'wonka';

const { unsubscribe } = pipe(
  client.subscription(MessageSub),
  subscribe(result => {
    console.log(result); // { data: ... }
  })
);

This API is kinda convoluted. I have seen numerous cases where this is being wrapped into
const { unsubscribe } = subscribeToUrql(result => {
    console.log(result); // { data: ... }
 })

Since wonka is being used internally it will be much better to see something like this:

client.subscribe(query, variables, (result) => {
    console.log(result); // { data: ... }
});

or even simpler
client.subscription(...).subscribe(..).unsubscribe(..);

Using some third party library helper (pipe) seems like antipattern.
https://formidable.com/open-source/urql/docs/advanced/subscriptions/#one-off-subscriptions

I've been giving this more and more serious thought over the last days and I believe that for the time being the API is still the way to go for multiple reasons.
It's true that we treat our exchanges and hence Wonka sources as an abstraction for extensibility. If we're being honest, this fully extends to subscription methods and other parts of the Client too.
All framework code eventually uses the Client'a public API, so from my perspective they should be using Wonka's sources as a point of extensibility.
This is a problem more unique to subscriptions. In an actual app you're likely to use promises with queries and mutations when you need to make one-off operations. Otherwise it's more common to refer to the framework bindings.
Hiding Wonka sources would be arbitrary and add a fixed code cost from Wonka (toObservable) that cannot be treeshaken away. Eventually it'll all turn back into the same thing so exposing a class with a toSource method (basically the reverse) would be arbitrary because we'd then treat Observables as the main streaming API. The biggest problem I see with that is that Observables in JS are still only a de-facto spec that a lot of libraries don't follow closely. Not only has it not been adopted or standardised, it's imho a poor spec that requires subscribe itself to be polymorphic, accepting both three optional separate functions (of which the error one is defunct in Wonka) or an observer object.
I think having clear docs on this and letting Wonka "seep through" consistently is much more valuable than hiding it away since ultimately that'll just increase complexity in what we'd add to our API. Having a single function (subscribe) from Wonka being used is after all more transferable than extending our API when compared to exchanges.
But I'm open to keep discussing this for a future major!

To add a separate RFC note here. I could imagine an abstraction that complies to the Observable spec like so:
import { subscribe, onEnd, pipe } from "wonka";

const noop = () => {};

const observableSymbol = typeof Symbol === 'function'
    ? Symbol.observable || (Symbol.observable = Symbol('observable'))
    : '@@observable'

class WonkaObservable {
  constructor(source) {
    this.source = source;
    this[observableSymbol] = () => this;
  }

  toSource() {
    return this.source;
  }

  subscribe(next, error, complete) {
    const onNext = (typeof next === 'object' ? next.next : next) || noop;
    const onComplete = (typeof next === 'object' ? next.complete : complete) || noop;
    return pipe(
      this.source,
      onEnd(onComplete),
      subscribe(onNext)
    );
  }
}

or pending a fix in Wonka for short:
import { toObservable } from "wonka";

const toWonkaObservable = source => {
  const observable = toObservable(source);
  observable.toSource = () => source;
  return observable;
};

Thank you so much for so detailed response! This is in fact much more complex problem than I initially thought. Fully agree and the proposal makes a lot of sense.

Closing due to inactivity for now; but I'll backreference this issue if anything similar comes up


OpenCV integration and licensing

I am considering about adding the IPPE method in OpenCV, to try to have a generic interface with:

2 solutions with IPPE flags and planar case
4 solutions with P3P and 3 points
1 solution otherwise
possibility to have the reprojection error?

Will you agree with an integration of your method into OpenCV?
It seems that the IPPE license is the 4-Clause BSD License which is not compatible with the OpenCV 3-Clause BSD License. I guess that the added code would need to be relicensed to comply with the 3-Clause BSD License if you agree for an integration? But I am not an expert in software licensing.
Thanks.

Hi, thanks for your suggestion. Integration of IPPE into OpenCV is a great objective and I would certainly support it and make a license change. I agree that the generic interface is needed. I have also been thinking of this myself. I would say that for a generic interface, when we call OpenCV's solvePnP with a particular method, we want to return a list of pose solutions together with their respective reprojection errors.
It's not possible to always say in advance how many pose solutions should be returned. For example, for P3P there is no guarantee that 4 solutions will be returned (4 is the maximal number, but there can be between 0 and 4 real-valued solutions).
It would also be good to have a mechanism to indicate whether the solution with lowest reprojection error is significantly better than the others, in which case we can assume the case has a unique solution. It is possible to do this using a likelihood ratio test threshold.

Thanks for your input.
I will report here when a first implementation draft will be available.

Sure, looking forward to it!

Thanks for your help!

Thank you for all your work to integrate it!


Identify bndbox coordinates by tag

Made s small change in xml_to_csv.py
Use the XML tags to identify "ymin, xmin, ymax, xmax", and not only by position.
I made this, because I ran in some trouble. Had XML files with another order of the box coordinates.

Would love it if this one would get merged, ran into this issue as well, took a few hours to hunt it down, mostly because of the vague error message:
assertion failed: [maximum box coordinate value is larger than 1.100000: ] [1.18155193]

@pixx1 can you say which order? I use a label tool, which generates me PASCAL VOC Format in XML files, but there is more information than for example using this tool (https://github.com/tzutalin/labelImg). Is this a problem for the script?


Buggy aliases routine

https://github.com/devitocodes/devito/blob/42d45b3171bb33fc0d9f28af346aba60a5027601/devito/passes/clusters/aliases.py#L441
This error if result of split is None.

MFE from slack:
from sympy import sqrt
from devito import Grid, Function, TimeFunction, Eq, Operator
space_order = 8
shape = (21, 21, 11)
grid = Grid(shape)
eps = Function(name='eps', grid=grid, space_order=space_order)
p0 = TimeFunction(name='p0', grid=grid, time_order=2, space_order=space_order)
update_p = ((1+sqrt(eps)) * p0.dy).dy + (p0.dz).dz
stencil_p = Eq(p0.forward, update_p)
op = Operator(stencil_p, name='mfe')


Refactor fluent API unit tests.

The so-called fluent API unit tests are intermingled with the notecard.py tests in test_notecard.py. This commit separates these tests out into their own individual test files, corresponding to their respective modules (e.g. the methods in card.py are tested by test_card.py). This commit also adds a conftest.py that defines fixtures for testing the fluent APIs, since they all follow a very similar pattern. Specifically, these fixtures test that

The fluent API calls the Notecard API correctly.
The fluent API requires a valid Notecard object.

@bsatrom I know coverage is ticking down with these recent PRs, but rest assured that I have more testing coming that will bring it back up.


fix: vpc_data output var in patterns vsi module does not give complete output on first apply.

Description
vpc_data: output var in patterns vsi module does not give complete output on first apply
https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone/issues/777
Release required?

[ ] No release
[ ] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content
fix for vpc_data: output var in patterns vsi module does not give complete output on first apply.
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

/run pipeline

@surajsbharadwaj we will have a discussion regarding the approach of this pr tomorrow. We don't want to disrupt any outputs.

/run pipeline

/run pipeline

vpc_data was as below
vpc_data = [
  {
    "cidr_blocks" = [
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
      "<IP_ADDRESS>/24",
    ]
    "custom_resolver_hub" = null
    "dns_endpoint_gateways_by_crn" = null
    "dns_endpoint_gateways_by_id" = null
    "network_acls" = [
      {
        "id" = "r010-fb0de8a1-0911-42c3-92dc-e71fc0728fc0"
        "shortname" = "management-t-acl"
      },
    ]
    "public_gateways" = {
      "zone-1" = null
      "zone-2" = null
      "zone-3" = null
    }
    "subnet_detail_list" = {
      "eu-de-1" = {
        "jordan-n-management-t-vpe-zone-1" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
          "id" = "02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
        }
        "jordan-n-management-t-vpn-zone-1" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
          "id" = "02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
        }
        "jordan-n-management-t-vsi-zone-1" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
          "id" = "02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
        }
      }
      "eu-de-2" = {
        "jordan-n-management-t-vpe-zone-2" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
          "id" = "02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
        }
        "jordan-n-management-t-vsi-zone-2" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-bee5791d-8655-4838-8947-25dda2776e1e"
          "id" = "02c7-bee5791d-8655-4838-8947-25dda2776e1e"
        }
      }
      "eu-de-3" = {
        "jordan-n-management-t-vpe-zone-3" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
          "id" = "02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
        }
        "jordan-n-management-t-vsi-zone-3" = {
          "cidr" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
          "id" = "02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
        }
      }
    }
    "subnet_detail_map" = {
      "zone-1" = [
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
          "id" = "02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
          "zone" = "eu-de-1"
        },
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
          "id" = "02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
          "zone" = "eu-de-1"
        },
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
          "id" = "02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
          "zone" = "eu-de-1"
        },
      ]
      "zone-2" = [
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
          "id" = "02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
          "zone" = "eu-de-2"
        },
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-bee5791d-8655-4838-8947-25dda2776e1e"
          "id" = "02c7-bee5791d-8655-4838-8947-25dda2776e1e"
          "zone" = "eu-de-2"
        },
      ]
      "zone-3" = [
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
          "id" = "02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
          "zone" = "eu-de-3"
        },
        {
          "cidr_block" = "<IP_ADDRESS>/24"
          "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
          "id" = "02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
          "zone" = "eu-de-3"
        },
      ]
    }
    "subnet_ids" = [
      "02b7-d46a3652-7c7c-4428-a631-6becbb04cb88",
      "02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59",
      "02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85",
      "02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41",
      "02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b",
      "02c7-bee5791d-8655-4838-8947-25dda2776e1e",
      "02d7-2cee76c9-0143-4056-8da2-77716cc297f3",
    ]
    "subnet_zone_list" = [
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
        "id" = "02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
        "name" = "jordan-n-management-t-vpe-zone-1"
        "zone" = "eu-de-1"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
        "id" = "02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
        "name" = "jordan-n-management-t-vpe-zone-2"
        "zone" = "eu-de-2"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
        "id" = "02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
        "name" = "jordan-n-management-t-vpe-zone-3"
        "zone" = "eu-de-3"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
        "id" = "02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
        "name" = "jordan-n-management-t-vpn-zone-1"
        "zone" = "eu-de-1"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-1:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
        "id" = "02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
        "name" = "jordan-n-management-t-vsi-zone-1"
        "zone" = "eu-de-1"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-2:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02c7-bee5791d-8655-4838-8947-25dda2776e1e"
        "id" = "02c7-bee5791d-8655-4838-8947-25dda2776e1e"
        "name" = "jordan-n-management-t-vsi-zone-2"
        "zone" = "eu-de-2"
      },
      {
        "cidr" = "<IP_ADDRESS>/24"
        "crn" = "crn:v1:bluemix:public:is:eu-de-3:a/abac0df06b644a9cabc6e44f55b3880e::subnet:02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
        "id" = "02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
        "name" = "jordan-n-management-t-vsi-zone-3"
        "zone" = "eu-de-3"
      },
    ]
    "vpc_crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::vpc:r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
    "vpc_data" = {
      "access_tags" = toset([])
      "classic_access" = false
      "crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::vpc:r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
      "cse_source_addresses" = tolist([
        {
          "address" = "<IP_ADDRESS>"
          "zone_name" = "eu-de-1"
        },
        {
          "address" = "<IP_ADDRESS>"
          "zone_name" = "eu-de-2"
        },
        {
          "address" = "<IP_ADDRESS>"
          "zone_name" = "eu-de-3"
        },
      ])
      "default_network_acl" = "r010-d0c808dc-6f91-457a-a074-d9dae3810bef"
      "default_network_acl_crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::network-acl:r010-d0c808dc-6f91-457a-a074-d9dae3810bef"
      "default_network_acl_name" = "python-antibody-jaws-tumble"
      "default_routing_table" = "r010-87531e84-3912-4812-b122-eb4bb931e76f"
      "default_routing_table_name" = "that-agreement-putdown-unfrosted"
      "default_security_group" = "r010-c7a1bf65-f738-4724-8fd7-075de2791e8e"
      "default_security_group_crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::security-group:r010-c7a1bf65-f738-4724-8fd7-075de2791e8e"
      "default_security_group_name" = "snowiness-deltoids-stubble-sloping"
      "dns" = tolist([
        {
          "enable_hub" = false
          "resolution_binding_count" = 0
          "resolver" = tolist([
            {
              "configuration" = "private_resolver"
              "manual_servers" = tolist([])
              "servers" = tolist([
                {
                  "address" = "<IP_ADDRESS>"
                  "zone_affinity" = ""
                },
                {
                  "address" = "<IP_ADDRESS>"
                  "zone_affinity" = ""
                },
              ])
              "type" = "system"
              "vpc" = tolist([])
            },
          ])
        },
      ])
      "health_reasons" = tolist([])
      "health_state" = "ok"
      "id" = "r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
      "identifier" = "r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
      "name" = "jordan-n-management-t-vpc"
      "resource_controller_url" = "https://cloud.ibm.com/vpc-ext/network/vpcs"
      "resource_crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::vpc:r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
      "resource_group" = "6a3ca6ab799848279aa46cac8b8710df"
      "resource_group_name" = "jordan-n-management-t-rg"
      "resource_name" = "jordan-n-management-t-vpc"
      "resource_status" = "available"
      "security_group" = tolist([
        {
          "group_id" = "r010-42c48293-2833-47fb-8043-5ce81e1d5fc1"
          "group_name" = "jordan-n-management-t"
          "rules" = tolist([
            {
              "code" = 0
              "direction" = "inbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/8"
              "rule_id" = "r010-5c0309ef-0c62-4ac0-9ea4-1ccc1a304a8d"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 53
              "port_min" = 53
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-6f1c2e4a-1ef5-454a-bec8-05cfda86b84f"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/8"
              "rule_id" = "r010-6c9f5d89-e84e-4724-ac10-a62e1efc6a34"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 443
              "port_min" = 443
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-2c052aae-eb26-49b3-b4ad-8af1626277ba"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "inbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-fb2a999e-1bb5-4b1d-814f-65f9db0ed9fc"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 80
              "port_min" = 80
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-9ad03946-d2f8-4fa2-ae96-6364e7619150"
              "type" = 0
            },
          ])
        },
        {
          "group_id" = "r010-8bab7f11-324e-4e18-a035-7625acada943"
          "group_name" = "management-t-vpe-sg"
          "rules" = tolist([
            {
              "code" = 0
              "direction" = "inbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/8"
              "rule_id" = "r010-3efd8b7b-268a-4138-bcd0-187c4e0cc35b"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 443
              "port_min" = 443
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-6f2bafa7-65f2-4536-b08b-bb240f4b4bfc"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/8"
              "rule_id" = "r010-bb07d829-8183-44e4-a2f8-d4084cdb824b"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 53
              "port_min" = 53
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-a3ea4f84-6647-429d-af22-1718b76438d5"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "outbound"
              "ip_version" = "ipv4"
              "port_max" = 80
              "port_min" = 80
              "protocol" = "tcp"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-3a4034bd-ca79-4e2c-840a-1d50a8b3c4df"
              "type" = 0
            },
            {
              "code" = 0
              "direction" = "inbound"
              "ip_version" = "ipv4"
              "port_max" = 0
              "port_min" = 0
              "protocol" = "all"
              "remote" = "<IP_ADDRESS>/16"
              "rule_id" = "r010-244e124d-d038-43f5-88f6-1099093aff22"
              "type" = 0
            },
          ])
        },
        {
          "group_id" = "r010-c7a1bf65-f738-4724-8fd7-075de2791e8e"
          "group_name" = "snowiness-deltoids-stubble-sloping"
          "rules" = tolist([])
        },
      ])
      "status" = "available"
      "subnets" = tolist([
        {
          "available_ipv4_address_count" = 250
          "id" = "02b7-d46a3652-7c7c-4428-a631-6becbb04cb88"
          "name" = "jordan-n-management-t-vpe-zone-1"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-1"
        },
        {
          "available_ipv4_address_count" = 250
          "id" = "02b7-22e6b2e9-0d17-4cf3-a1ed-eeb84954e56b"
          "name" = "jordan-n-management-t-vsi-zone-1"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-1"
        },
        {
          "available_ipv4_address_count" = 250
          "id" = "02d7-2cee76c9-0143-4056-8da2-77716cc297f3"
          "name" = "jordan-n-management-t-vsi-zone-3"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-3"
        },
        {
          "available_ipv4_address_count" = 250
          "id" = "02c7-bee5791d-8655-4838-8947-25dda2776e1e"
          "name" = "jordan-n-management-t-vsi-zone-2"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-2"
        },
        {
          "available_ipv4_address_count" = 249
          "id" = "02b7-d6f63b6b-4535-4adc-8ae1-0e73cded5c41"
          "name" = "jordan-n-management-t-vpn-zone-1"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-1"
        },
        {
          "available_ipv4_address_count" = 250
          "id" = "02d7-794f2fef-cf7f-43d3-8c41-570d08cdfc85"
          "name" = "jordan-n-management-t-vpe-zone-3"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-3"
        },
        {
          "available_ipv4_address_count" = 250
          "id" = "02c7-0be2d208-b7b0-4e1c-8c9e-b1fd1737ab59"
          "name" = "jordan-n-management-t-vpe-zone-2"
          "status" = "available"
          "total_ipv4_address_count" = 256
          "zone" = "eu-de-2"
        },
      ])
      "tags" = toset([])
    }
    "vpc_flow_logs" = tolist([
      {
        "crn" = "crn:v1:bluemix:public:is:eu-de:a/abac0df06b644a9cabc6e44f55b3880e::flow-log-collector:r010-9cee2279-1ecc-4dd1-9be1-ed2b7f341aae"
        "href" = "https://eu-de.iaas.cloud.ibm.com/v1/flow_log_collectors/r010-9cee2279-1ecc-4dd1-9be1-ed2b7f341aae"
        "id" = "r010-9cee2279-1ecc-4dd1-9be1-ed2b7f341aae"
        "name" = "jordan-n-management-t-logs"
        "state" = "stable"
      },
    ])
    "vpc_id" = "r010-a2ebac92-1963-4658-8d5d-e2ca604c6226"
    "vpc_name" = "jordan-n-management-t-vpc"
  },
]

/run pipeline

@toddgiguere could you merge if only fails are deletion ones pls? Can't check fails as I'm not at my laptop.

/run pipeline

/run pipeline

Last run failed on
 2024/05/17 16:58:36 Terraform init | Error: Error accessing remote module registry
 2024/05/17 16:58:36 Terraform init |
 2024/05/17 16:58:36 Terraform init |   on ../../bastion_host.tf line 43:
 2024/05/17 16:58:36 Terraform init |   43: module "bastion_host" {
 2024/05/17 16:58:36 Terraform init |
 2024/05/17 16:58:36 Terraform init | Failed to retrieve available versions for module "bastion_host"
 2024/05/17 16:58:36 Terraform init | (../../bastion_host.tf:43) from registry.terraform.io: failed to request
 2024/05/17 16:58:36 Terraform init | discovery document: Get
 2024/05/17 16:58:36 Terraform init | "https://registry.terraform.io/.well-known/terraform.json": dial tcp
 2024/05/17 16:58:36 Terraform init | [2600:9000:2646:ac00:16:1aa3:1440:93a1]:443: connect: network is unreachable.

Is this not a known issue? @ocofaigh said we will need to force merge as destroy is broken, not sure if this is the issue he mentioned.

@jor2 I ran it one more time to see if I can't get it to complete.
@ocofaigh if it is only the cluster destroy that fails, I don't know how to properly force-merge for a release?

@jor2 I ran it one more time to see if I can't get it to complete.
@ocofaigh if it is only the cluster destroy that fails, I don't know how to properly force-merge for a release?

@toddgiguere TestRunRoksPatternSchematics passed this time, but TestRunOverride failed for:
2024-05-17T19:27:15.2254684Z === NAME  TestRunOverride
2024-05-17T19:27:15.2255164Z     tests.go:827:
2024-05-17T19:27:15.2256190Z         	Error Trace:	/go/pkg/mod/github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper@v1.30.2/testhelper/tests.go:827
2024-05-17T19:27:15.2257440Z         	            				/go/pkg/mod/github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper@v1.30.2/testhelper/tests.go:760
2024-05-17T19:27:15.2258604Z         	            				/__w/terraform-ibm-landing-zone/terraform-ibm-landing-zone/tests/pr_test.go:340
2024-05-17T19:27:15.2259538Z         	Error:      	Expected nil, but got: retry.FatalError{Underlying:(*shell.ErrWithCmdOutput)(0xc0056c4630)}
2024-05-17T19:27:15.2260244Z         	Test:       	TestRunOverride
2024-05-17T19:27:15.2261157Z         	Messages:   	Failed%!(EXTRA retry.FatalError=FatalError{Underlying: error while running command: exit status 1; ╷
2024-05-17T19:27:15.2262292Z         	            	│ Error: cannot add more than 5 gateways to the selected region
2024-05-17T19:27:15.2263013Z         	            	│
2024-05-17T19:27:15.2264059Z         	            	│   with module.landing_zone.module.landing_zone.ibm_tg_gateway.transit_gateway[0],
2024-05-17T19:27:15.2265210Z         	            	│   on ../../transit_gateway.tf line 6, in resource "ibm_tg_gateway" "transit_gateway":
2024-05-17T19:27:15.2266328Z         	            	│    6: resource "ibm_tg_gateway" "transit_gateway" {
2024-05-17T19:27:15.2267013Z         	            	│
2024-05-17T19:27:15.2267426Z         	            	╵})

That test passed on last run, we just have too many tg's.

/run pipeline

Deleted some vpc's i previously provisioned

/run pipeline

:tada: This PR is included in version 5.22.1 :tada:
The release is available on:

GitHub release
v5.22.1

Your semantic-release bot :package::rocket:


Open custom container command

For integration with other plug-ins, it would be nice to add a command like /kci container open <containerName> <playerName>. (and a similar command to close containers).

This is going to be a bit more complicated than I initially expected:

the container name can contain spaces (a minor problem)
I would also need to specify at which location the player should open the container menu (and check if there is even a container instance at that location). This is in case it is about a placed custom container.
I would also need to specify a different way for pocket containers: players can have more than 1 pocket container in their inventory...
I will postpone this issue.

For now, I should only allow this command to be used on Ender containers, see #166
Maybe, I can also allow block-stationed containers in the future.
I don't think this command will ever work on pocket containers.


fix AttributeError: 'Node' object has no attribute 'parent'

Converting from ASTRA-sim-1.0 Text Files to Chakra format triggers the following attribute error.

This PR fixes the error.

Hello @Anchorrrr,
We appreciate your contribution. It seems that the text2chakra Converter is outdated. The schema has been updated to v0.0.4, and you can find the detailed description in the Chakra Schema v0.0.4 Release Notes. We need to update the text2chakra converter to reflect these changes, specifically by replacing the 'parent' field with the 'data_dep' field.

@Anchorrrr it would be great if you can update this PR given the feedback / pointers from @TaekyungHeo. Please let us know if you have additional questions. Thanks!

Hello, @Anchorrrr
Wish you have a good day! I might covered this in #78 by changing parents to data_deps, and also fixed some other bugs in the text converter. Could you please check out the PR and leave any comments if you like? Thanks!


kubo: default installation gives null API field instead of some unix domain socket

Describe the bug
We got theses reports of Kubo panicing on startup due to probably an empty API field https://github.com/ipfs/kubo/issues/10056. This is a bug in our software however I belive this is also a bug in:
https://github.com/NixOS/nixpkgs/blob/cf73a86c35a84de0e2f3ba494327cf6fb51c0dfd/nixos/modules/services/network-filesystems/kubo.nix#L186
Because a Kubo node without an API listener is borderline useless, your choice to change to a unix socket (https://github.com/NixOS/nixpkgs/commit/f2be3ae30d960b2f7f1c816d9cab43000556fd0a) makes sense however I think some default got lost and now it is set to Null.
Given I am not a Nix user myself I got help from @justinabrahms to fill in the template, thx :heart:.
Steps To Reproduce
Steps to reproduce the behavior:

Add services.kubo.enable = true to /etc/nixos/configuration.nix
sudo nixos-rebuild switch
systemctl status ipfs notice it's failing with a panic.

Expected behavior
After installation Kubo should start and the RPC should be usable by a permissioned user.
Notify maintainers
@Luflosi
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.38, NixOS, 23.05 (Stoat), 23.05.2064.53657afe297`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - channels(abrahms): `""`
 - channels(root): `"home-manager-23.05.tar.gz, nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

/cc @Luflosi (I forgot to fill it in the template and I don't belive GH pings peoples from edits)

Weird that it works on my machine and in the NixOS tests. One of the NixOS tests only has services.kubo.enable = true; and services.kubo.autoMount = true; options set. autoMount does quite a lot but I didn't see anything obvious why this should affect the API settings. But maybe it does make a difference and maybe I specified some additional option on my machine makes it also work there. I'll try to reproduce it with just the enable option set in the next couple days.
On one machine ipfs config show shows that the API field is set to null and yet Kubo starts without a problem and RPC API server listening on /unix/run/ipfs.sock can be seen in the log.
According to a comment at the top of, ipfs-api.socket, "Enabling this [socket file] will completely override any API listeners configured in your config.". NixOS enables this socket file and overrides ListenStream with %t/ipfs.sock (which is /run/ipfs.sock) plus whatever the user has set in services.kubo.settings.Addresses.API. What I don't know is how systemd communicates this information to Kubo but this seems to work.
So in conclusion, I would think that setting the API field to null in the Kubo config doesn't matter because ipfs-api.socket is enabled, which should override this and specify a socket for the API.

Thx I wasn't aware we even had this feature.
We have a simple incorrect listeners[0] assumption which is panicking since kubo is configured without listeners.
However this is fed by listeners, err := sockets.TakeListeners("io.ipfs.api") which tries to load something like ipfs-api.socket as you linked. So if you have a "API": null but use something like ipfs-api.socket it should work (AFAIT).
I can't test experimentally that feeding the API through systemd works right now, I'll report later, but it seems to me that the ipfs-api.socket like config is not applied somehow.

I was able to reproduce the problem. Maybe I just need to order the ipfs.service unit after the two socket units. I'll take a closer look in the following days when I have some more time.

This happened to me too on first installation, the reason was that systemd couldn’t bind port 8080 because it is already in use by another service, then started Kubo anyways. So my theory is that Kubo checks if there was a socket made available by systemd and if there was none falls back to trying to read the listen address from the config (which is then null) and then panics in the observed way.


Add e2e/integration-test dry-run report.

Signed-off-by: xuezhaojun<EMAIL_ADDRESS>https://github.com/stolostron/backlog/issues/25657

/hold

/close


Rooms Attribute isn't show on Xaiomi C1

Hi,
Firstly thanks for creating this Camera for HA.
I currently have a Xiaomi 1C robot vacuum running Hyperfer\Valetudo and have setup your camera as per the instructions and it is giving me the map data, which each room coloured appropriately. I have the areas named in the Valetudo software. I am using the lovelace-xiaomi-vacuum-map-card configured with your camera and it is displaying the map fine, however I can't figure out how to get Rooms working. When I go into the card the link for 'GENERATE ROOMS CONFIG' is greyed out and I can't click on it to auto generate the code for the rooms.
What am I missing ?
Originally posted by @duffmiester in https://github.com/sca075/valetudo_vacuum_camera/discussions/11#discussioncomment-7247125

@duffmiester I opened this issue to keep track.

Have sent you an email with the Debug ZIP. :-)

@duffmiester I just loaded your data in the development and test HA (it is a real PI4 where we test all).. I did get the rooms data from the camara logs..  Can you try to turn OFF and after a while ON again using the HA services? this should force the refresh..

That is really weird, I wonder why it isn't getting the room data for me.
I have even tried removing the Vacuum camera completely from Integrations and HACS, rebooting, reinstalling the Vacuum Camera in HACS and rebooting and still when I check in Developer tools I am missing the room section. I also tried installing version 1.4.4 of the Vacuum camera, but that was the same.
I wonder what other differences there are between our setups. I am running HA in a VM using the HA VMWare image, I am running latest version of HA. I am using MQTT integration in HA for the vacuum.

@duffmiester to be honest @rohankapoorcom had a similar issue with his S50 sometimes ago.. at that time it was just matter of time until the rooms attribute did show up (some magic probably).
In any case, whatever installation is indeed it must work.
I will add some debugging logs and release a new version at the end of this week. We do have check to remove this attribute (for vacuum not having segments) I need to double check, probably the issue is that C1 and S50 have either floor and segments and probably the camera is checking just once if there are rooms, if so I will add a retry to make sure the attribute is displayed  within 3 retries..
This is the reason why I thank you for reporting this situation.. it's clear that some HA environment isn't reactive as the test environment we use.

@duffmiester I just published the additional logging, now the state attribute will be update after the first frame. Can you please download from HACS the "main" version (this will download the fix I just published). I will wait for you to confirm before releasing officially this fix, I tested it and now also by suspending the frame basically it is forced to get the rooms attribute as soon available, this should solve your issue.
2023-10-12 19:25:43.284 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Crop and Trim image size: (2948, 2948)
2023-10-12 19:25:44.031 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Checking for rooms data..
2023-10-12 19:25:44.031 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Rooms data extracted!
2023-10-12 19:25:44.031 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Got Rooms Attributes.
2023-10-12 19:25:44.031 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] State attributes update: {'1': {'number': '1', 'outline': [(2340, 1625), (2745, 1625), (2745, 2185), (2340, 2185)], 'name': 'MasterBedroom', 'x': 2542, 'y': 1905}, '3': {'number': '3', 'outline': [(2420, 2525), (2700, 2525), (2700, 2720), (2420, 2720)], 'name': 'Office', 'x': 2560, 'y': 2622}, '4': {'number': '4', 'outline': [(2300, 2780), (2725, 2780), (2725, 3075), (2300, 3075)], 'name': 'GeorgeBedroom', 'x': 2512, 'y': 2927}, '5': {'number': '5', 'outline': [(2370, 3085), (2690, 3085), (2690, 3365), (2370, 3365)], 'name': 'SpareBedroom', 'x': 2530, 'y': 3225}, '8': {'number': '8', 'outline': [(2345, 2175), (2715, 2175), (2715, 2445), (2345, 2445)], 'name': 'Bathroom', 'x': 2530, 'y': 2310}, '9': {'number': '9', 'outline': [(2685, 1875), (3345, 1875), (3345, 3415), (2685, 3415)], 'name': 'Living', 'x': 3015, 'y': 2645}}
2023-10-12 19:25:44.031 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] Applied silenttepidstinkbug image rotation: {180}
2023-10-12 19:25:44.032 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] Suspended the camera data processing for: silenttepidstinkbug.
2023-10-12 19:25:44.036 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.connector] Saved image data from MQTT in mqtt_silenttepidstinkbug.raw!
2023-10-12 19:25:44.104 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Getting Calibrations points
2023-10-12 19:25:45.096 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] silenttepidstinkbug: Image update complete

I just installed the 'main' version and that fixed it straight away and the room info showed instantly in developer tools. The Generate Room code now works in the Vacuum Map card.

Thanks so much for all your help with this!!

Thanks @duffmiester this was a great request from your side. It helps us to improve this add on, please feel free to get in contact with us (team) at any time;)

Released v1.4.6 with the fix. This issue is closed.


x/net/idna: ToASCII() can spuriously modify NR-LDH labels

What version of Go are you using (go version)?

$ go version
go version go1.16.4 linux/amd64

Does this issue reproduce with the latest release?
Yes. Confirmed the issue with Go 1.19 at https://go.dev/play/.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1145048540=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Specifying idna.MapForLookup() or idna.ValidateForRegistration() for idna.Profile.New() and then call Profile.ToASCII() with a domain name that only consists of NR-LDH labels but with an upper case alphabet.
https://go.dev/play/p/7cAWHtgbm2u
What did you expect to see?
For both cases:

I would expect ToASCII() doesn't change the input domain name including the character case
I would also expect ToASCII() doesn't return an error

because the label in question is an NR-LDH label and the restrictions and validation rules for U-labels and A-labels shouldn't apply.
What did you see instead?
The upper case character was downcased. If idna.ValidateForRegistration() was specified, ToASCII() also returned an error.

CC @neild


Topbar work

Great, thanks for checking. Will need to fix that CI issues with rustfmt being installed..
Was hoping to do more with this patch set but it seems more and more likely that dumbly implementing the API is a better way to fix things. For example as it stand now if the output sizes changes a million errors are thrown from something unrelated. Everything is so interconnected it's probably best to hook everything up (mocked or otherwise) and then fix any problems that arise.
Bit of a shame, as smaller piecemeal success is more encouraging. Eg. getting the bar to sorta work. Though there are a few use cases that should be easy to set up (Sending all keyboard input to this client and using that to spawn programs, for example)

args, too late :-(

rip
I'm just going to target 4.3 (or whatever the highest stable version is at any time). I'm fine with accepting patches for those future changes though, as long they aren't backwards incompatible (since right now I just use the system installed Awesome libraries and I'd rather not make it harder to contribute by forcing the use of a bleeding-edge version)

as long they aren't backwards incompatible

Well, if I change the name of the CAPI method then add legacy support code in awful to "fix" existing user configs, then that is mildly backward/forward incompatible if way-cooler doesn't provide the renamed methods.
The change is a cleaner version of this ugly hack:

-- was called `:buttons()`

--TODO v6 remove this legacy ****
function client.get_buttons(self)
    return setmetatable(self:_buttons(), {__call = function(self, new_buttons)
        gears.debug.deprecated([[
            buttons is now a property, please stop calling it, it is not a method anymore,
            use `c.buttons = new_buttons` instead of `c:buttons(new_buttons)`
        ]])

        if new_buttons then self:_buttons(new_buttons) end

        return self:_buttons()
    end}
end

--TODO v6 remove this legacy ****
function client.set_buttons(self, new_buttons)
     self:_buttons(new_buttons)
end

From the end user point of view, it is fully backward compatible and they wont notice the change until the deprecation warning appears (after v5.0 release). But in any case, if someone uses Awesome libs from v4.4 on a way-cooler without the name change, it will break. The same is true with using the libs from v4.3 on a v4.4 core.
I mean, the public API doesn't break, but the private APIs mildly change in every release (and always has). At some point way-cooler will have to track AwesomeWM git-master Lua libs if we want to do a shared release (AwesomeWM 5.0 / Way-Cooler 1.0?) with Wayland support using Way-Cooler. I don't mind submitting patches on both side once it gets complete-ish enough so I can at least test them. Right now I am announcing my plan to move a lot of the existing core methods away from the public API and into the private one so I can fix some API bugs/inconsistencies in a (Lua) compatibility layer. Someone else is currently working on a framework to enforce the (Lua) API naming guidelines so this never regresses. The end result is hopefully a more consistent API with a lesser learning curve and a better documentation. This is a net win for way-cooler at the cost of having to coordinate better with "downstream" (ie, the AwesomeWM Lua libraries) developers (ie, me).
(as I side note, I started doing those mousegrabber tests I proposed in last week PR, but I am not done yet)


Merge openmetadata.yaml and openmetadata-server.yaml

Feature
Currently we keep non-secure configs in openmetadata.yaml and  secure configs openmetadata-server.yaml.
Our ./bin/openmetadata-server-start.sh uses conf/openmetadata.yaml as the default config
It not only confuses our users but also hard to make the docker to go from non-secure to secure setup.
Describe the task
Have all the secure configs in openmetadata.yaml with authenticationConfiguration and authorizerConfiguration along with environment variables to secure those.
By default these will have non-secure configs. This will allow any interested users to continue to test OpenMetadata without securing through google or okta

@Sachin-chaurasiya @darth-coder00 currently the UI tries to redirect the UI to auth provider if it sees authenticationConfiguration.
With this patch we want to support both secure/non-secure using environment variables.
Default configs you'll get
{
provider: "no-auth",
publicKey: "https://www.googleapis.com/oauth2/v3/certs",
authority: "https://accounts.google.com/",
clientId: "",
callbackUrl: ""
}

if you see no-auth do not redirect users to sign-in. This behavior should be same as when the user doesn't have any auth


Intermediate page with empty box

Is your suggestion related to an experience ? Please describe.
When there is no IDPs added, due to slowness, this intermediate state is obvious. But the empty box looks bad. Better to improve.

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Questions about the SelfCheckGPT-NLI and SelfCheckGPT-Prompt

Hi @potsawee, thank you for the impressive method and easy to use dataset. Two quick questions about the SelfCheckGPT-NLI and SelfCheckGPT-Prompt methods, which achieve quite impressive performance.

Regarding on the SelfCheckGPT-NLI method, I noticed that you use the "potsawee/deberta-v3-large-mnli" NLI model. Since in my previous practice I was using other NLI models, so I replace it with other NLI models including "microsoft/deberta-large-mnli" and "MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli". I also modify the contradiction probabilities following your suggestion by removing the probability of the class "neutral". However, the performance of the two NLI models seems a little weak. I test the AUC-PR on the "NonFact" setting with the first 20 passages in the dataset (around 400 sentences), and here is the performance:

potsawee/deberta-v3-large-mnli: leads to AUC-PR 92.5
microsoft/deberta-large-mnli: AUC-PR 89.7
MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli: 88.6
Does this phenomenon implies the SelfCheckGPT-NLI is relatively sensitive to the choices of the NLI model?

Regarding on the SelfCheckGPT-Prompt method, I see you have updated the code several hours ago. It seems the current code only support the open-sourced models instead of the gpt-3.5-turbo/Text-Davinci-003 used in the main paper (Table 2). Is there an estimated timeline to release the code for SelfCheckGPT-Prompt with gpt-3.5-turbo/Text-Davinci-003?

Thank you so much for your impressive work and effort!

Hi @hbr690188270, thanks for trying the selfcheckgpt package! regarding your questions

I agree that we'll observe some performance differences when using different NLI models. I haven't tried a different model yet. But from your results, I wouldn't be surprised to see that difference though as you tried it on 20 examples, which can result in some noise.

On this issue, I'd look at scatter plots of passage-level scores (i.e., average over sentences for each document) to see if there is a similar trend for different NLI models. I'll try this when I have more time.

Yes, I actually plan on implementing and testing LLM-Prompt with OpenAI this weekend.

I'll reply more this weekend when I have time to work on this!

@potsawee I also had the same question, previously in my usecase i used facebook/bart-large-mnli for NLI, did you do any study to arrive that potsawee/deberta-v3-large-mnli is best for this task. Sry new to the field, do we have any kind of comparisons between these models.

Sorry again for my late response.

SelfCheckGPT with LLM-Promting using OpenAI's API was implemented and merged into this selfcheckgpt package last month.

Regarding NLI models, I haven't had the chance to compare different NLI models yet. But I don't think there is anything special about  potsawee/deberta-v3-large-mnli. I chose to use my own model as deberta-v3 was a SOTA encoder-only model at the time of conducting this experiment and I couldn't find its variant fine-tuned to Multi-NLI, so I trained one by myself (using standard cross-entropy loss). I would expect all deberta-v3-mnli  models to have similar performance on this task and on the original MNLI tasks. If you have the results on other NLI model on MNLI testset, I'm happy to evaluate potsawee/deberta-v3-large-mnli again.

Best wishes
Potsawee


Element  is not allowed within

The strict XSD rejects a <DummyMessageLog> within a <SenderPipe>. See picture below.

This is due to the DummyMessageLog being deprecated

The DummyMessageLog is no longer required to display the messagelog informatie in the console.


Auth problems with GH Auth provider

I created a PR with the GH PR extension from a public branch in this repo. I get the following auth error:

Need to make sure that when changing the OAuth app we are back in a working state.

Should be fixed with https://github.com/microsoft/vscode/commit/b05b32bfd86de0ead6456e4b0cc4339cf124e3e2