Some problems arise when finetune large language models

Hello, I have recently been trying to progressively fine-tune a large language model.
First, I attempted to use the "lora on lora" fine-tuning mode, where after fine-tuning the model with lora, I merged the generated adapter parameters with the original model using merge_and_unload(). Then, I repeated lora process on the merged model. However, I encountered an issue where the GPU memory usage increased significantly during the second fine-tuning. The first time it used 16G, but the second time, the 24G GPU reported "out of memory",but the model size has not changed much compared to before.. The merged model can still perform inference normally ,and this work is based on Qwen. Is this a normal situation? Can you provide the reason and solution?
Also, can I merge the adapter parameters generated by Qlora with the original model and then perform Qlora again on the merged model? Will I encounter the same issue as with the above lora? If merging is possible, which functions should I use for merging?
If I want to fine-tune a large language model multiple times, do you have any other methods or relevant suggestions apart from the above approach?
Looking forward to your reply

First, I attempted to use the "lora on lora" fine-tuning mode, where after fine-tuning the model with lora, I merged the generated adapter parameters with the original model using merge_and_unload(). Then, I repeated lora process on the merged model. However, I encountered an issue where the GPU memory usage increased significantly during the second fine-tuning. The first time it used 16G, but the second time, the 24G GPU reported "out of memory",but the model size has not changed much compared to before.. The merged model can still perform inference normally ,and this work is based on Qwen. Is this a normal situation? Can you provide the reason and solution?

This should indeed not happen, since, as you correctly observed, after merge_and_unload the model should be no different to the base model when it comes to size. Is it possible that you used different settings or different PEFT versions between the 1st and the 2nd step? Ideally, could you provide a script to reproduce the issue (training shouldn't be necessary to show this).

Also, can I merge the adapter parameters generated by Qlora with the original model and then perform Qlora again on the merged model?

Yes, that should work.

First, I attempted to use the "lora on lora" fine-tuning mode, where after fine-tuning the model with lora, I merged the generated adapter parameters with the original model using merge_and_unload(). Then, I repeated lora process on the merged model. However, I encountered an issue where the GPU memory usage increased significantly during the second fine-tuning. The first time it used 16G, but the second time, the 24G GPU reported "out of memory",but the model size has not changed much compared to before.. The merged model can still perform inference normally ,and this work is based on Qwen. Is this a normal situation? Can you provide the reason and solution?

This should indeed not happen, since, as you correctly observed, after merge_and_unload the model should be no different to the base model when it comes to size. Is it possible that you used different settings or different PEFT versions between the 1st and the 2nd step? Ideally, could you provide a script to reproduce the issue (training shouldn't be necessary to show this).

Also, can I merge the adapter parameters generated by Qlora with the original model and then perform Qlora again on the merged model?

Yes, that should work.

Thank you for your reply
I tried to fine-tune the model using the qlora on qlora method, but encountered an error when using the merge_and_unload() function to merge the models.Is it because I used the wrong method or it is impossible to merge the quantized models?
The following is the code that is run and the specific information about the error reported.
code：
model = AutoPeftModelForCausalLM.from_pretrained(
        "/root/zhengzh/Bert-TextClassification/Qwen/output_qwen", # path to the output directory
        device_map="auto",
        trust_remote_code=True
    ).eval()
    merged_model = model.merge_and_unload()
# max_shard_size and safe serialization are not necessary.
# They respectively work for sharding checkpoint and save the model to safetensors
    merged_model.save_pretrained("/root/zhengzh/Bert-TextClassification/Qwen/merged_model", max_shard_size="2048MB", safe_serialization=True)
    tokenizer = AutoTokenizer.from_pretrained(
        "/root/zhengzh/Bert-TextClassification/Qwen/output_qwen", # path to the output directory
        trust_remote_code=True
    )
    tokenizer.save_pretrained("/root/zhengzh/Bert-TextClassification/Qwen/merged_model")

error report：
 Traceback (most recent call last):
  File "/root/zhengzh/Bert-TextClassification/Qwen/dis_test.py", line 196, in <module>
    merged_model = model.merge_and_unload()
  File "/root/miniconda3/envs/berttc/lib/python3.10/site-packages/peft/tuners/lora/model.py", line 719, in merge_and_unload
    return self._unload_and_optionally_merge(
  File "/root/miniconda3/envs/berttc/lib/python3.10/site-packages/peft/tuners/lora/model.py", line 438, in _unload_and_optionally_merge
    raise ValueError("Cannot merge LORA layers when the model is gptq quantized")
ValueError: Cannot merge LORA layers when the model is gptq quantized

First, I attempted to use the "lora on lora" fine-tuning mode, where after fine-tuning the model with lora, I merged the generated adapter parameters with the original model using merge_and_unload(). Then, I repeated lora process on the merged model. However, I encountered an issue where the GPU memory usage increased significantly during the second fine-tuning. The first time it used 16G, but the second time, the 24G GPU reported "out of memory",but the model size has not changed much compared to before.. The merged model can still perform inference normally ,and this work is based on Qwen. Is this a normal situation? Can you provide the reason and solution?

This should indeed not happen, since, as you correctly observed, after merge_and_unload the model should be no different to the base model when it comes to size. Is it possible that you used different settings or different PEFT versions between the 1st and the 2nd step? Ideally, could you provide a script to reproduce the issue (training shouldn't be necessary to show this).

Also, can I merge the adapter parameters generated by Qlora with the original model and then perform Qlora again on the merged model?

Yes, that should work.

Regarding the problem of OOM when the lora on lora method is executed for the second time, the following is the relevant script
finetune.py
# This code is based on the revised code from fastchat based on tatsu-lab/stanford_alpaca.
import os
os.environ["CUDA_DEVICE_MAX_CONNECTIONS"] = "1"
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
from dataclasses import dataclass, field
import json
import math
import logging

from typing import Dict, Optional, List
import torch
from torch.utils.data import Dataset
from deepspeed import zero
from deepspeed.runtime.zero.partition_parameters import ZeroParamStatus
import transformers
from transformers import Trainer, GPTQConfig
from transformers.integrations import deepspeed
from transformers.trainer_pt_utils import LabelSmoother
from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training
from accelerate.utils import DistributedType
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer

IGNORE_TOKEN_ID = LabelSmoother.ignore_index

@dataclass
class ModelArguments:
    model_name_or_path: Optional[str] = field(default="Qwen/Qwen-7B")

@dataclass
class DataArguments:
    data_path: str = field(
        default=None, metadata={"help": "Path to the training data."}
    )
    eval_data_path: str = field(
        default=None, metadata={"help": "Path to the evaluation data."}
    )
    lazy_preprocess: bool = False

@dataclass
class TrainingArguments(transformers.TrainingArguments):
    cache_dir: Optional[str] = field(default=None)
    optim: str = field(default="adamw_torch")
    model_max_length: int = field(
        default=8192,
        metadata={
            "help": "Maximum sequence length. Sequences will be right padded (and possibly truncated)."
        },
    )
    use_lora: bool = False

@dataclass
class LoraArguments:
    lora_r: int = 64
    lora_alpha: int = 16
    lora_dropout: float = 0.05
    lora_target_modules: List[str] = field(
        default_factory=lambda: ["c_attn", "c_proj", "w1", "w2"]
    )
    lora_weight_path: str = ""
    lora_bias: str = "none"
    q_lora: bool = False

def maybe_zero_3(param):
    if hasattr(param, "ds_id"):
        assert param.ds_status == ZeroParamStatus.NOT_AVAILABLE
        with zero.GatheredParameters([param]):
            param = param.data.detach().cpu().clone()
    else:
        param = param.detach().cpu().clone()
    return param

# Borrowed from peft.utils.get_peft_model_state_dict
def get_peft_state_maybe_zero_3(named_params, bias):
    if bias == "none":
        to_return = {k: t for k, t in named_params if "lora_" in k}
    elif bias == "all":
        to_return = {k: t for k, t in named_params if "lora_" in k or "bias" in k}
    elif bias == "lora_only":
        to_return = {}
        maybe_lora_bias = {}
        lora_bias_names = set()
        for k, t in named_params:
            if "lora_" in k:
                to_return[k] = t
                bias_name = k.split("lora_")[0] + "bias"
                lora_bias_names.add(bias_name)
            elif "bias" in k:
                maybe_lora_bias[k] = t
        for k, t in maybe_lora_bias:
            if bias_name in lora_bias_names:
                to_return[bias_name] = t
    else:
        raise NotImplementedError
    to_return = {k: maybe_zero_3(v) for k, v in to_return.items()}
    return to_return

local_rank = None

def rank0_print(*args):
    if local_rank == 0:
        print(*args)

def safe_save_model_for_hf_trainer(trainer: transformers.Trainer, output_dir: str, bias="none"):
    """Collects the state dict and dump to disk."""
    # check if zero3 mode enabled
    if deepspeed.is_deepspeed_zero3_enabled():
        state_dict = trainer.model_wrapped._zero3_consolidated_16bit_state_dict()
    else:
        if trainer.args.use_lora:
            state_dict = get_peft_state_maybe_zero_3(
                trainer.model.named_parameters(), bias
            )
        else:
            state_dict = trainer.model.state_dict()
    if trainer.args.should_save and trainer.args.local_rank == 0:
        trainer._save(output_dir, state_dict=state_dict)

def preprocess(
    sources,
    tokenizer: transformers.PreTrainedTokenizer,
    max_len: int,
    system_message: str = "You are a helpful assistant."
) -> Dict:
    roles = {"user": "<|im_start|>user", "assistant": "<|im_start|>assistant"}

    im_start = tokenizer.im_start_id
    im_end = tokenizer.im_end_id
    nl_tokens = tokenizer('\n').input_ids
    _system = tokenizer('system').input_ids + nl_tokens
    _user = tokenizer('user').input_ids + nl_tokens
    _assistant = tokenizer('assistant').input_ids + nl_tokens

    # Apply prompt templates
    input_ids, targets = [], []
    for i, source in enumerate(sources):
        if roles[source[0]["from"]] != roles["user"]:
            source = source[1:]

        input_id, target = [], []
        system = [im_start] + _system + tokenizer(system_message).input_ids + [im_end] + nl_tokens
        input_id += system
        target += [im_start] + [IGNORE_TOKEN_ID] * (len(system)-3) + [im_end] + nl_tokens
        assert len(input_id) == len(target)
        for j, sentence in enumerate(source):
            role = roles[sentence["from"]]
            _input_id = tokenizer(role).input_ids + nl_tokens + \
                tokenizer(sentence["value"]).input_ids + [im_end] + nl_tokens
            input_id += _input_id
            if role == '<|im_start|>user':
                _target = [im_start] + [IGNORE_TOKEN_ID] * (len(_input_id)-3) + [im_end] + nl_tokens
            elif role == '<|im_start|>assistant':
                _target = [im_start] + [IGNORE_TOKEN_ID] * len(tokenizer(role).input_ids) + \
                    _input_id[len(tokenizer(role).input_ids)+1:-2] + [im_end] + nl_tokens
            else:
                raise NotImplementedError
            target += _target
        assert len(input_id) == len(target)
        input_id += [tokenizer.pad_token_id] * (max_len - len(input_id))
        target += [IGNORE_TOKEN_ID] * (max_len - len(target))
        input_ids.append(input_id[:max_len])
        targets.append(target[:max_len])
    input_ids = torch.tensor(input_ids, dtype=torch.int)
    targets = torch.tensor(targets, dtype=torch.int)

    return dict(
        input_ids=input_ids,
        labels=targets,
        attention_mask=input_ids.ne(tokenizer.pad_token_id),
    )

class SupervisedDataset(Dataset):
    """Dataset for supervised fine-tuning."""

    def __init__(self, raw_data, tokenizer: transformers.PreTrainedTokenizer, max_len: int):
        super(SupervisedDataset, self).__init__()

        rank0_print("Formatting inputs...")
        sources = [example["conversations"] for example in raw_data]
        data_dict = preprocess(sources, tokenizer, max_len)

        self.input_ids = data_dict["input_ids"]
        self.labels = data_dict["labels"]
        self.attention_mask = data_dict["attention_mask"]

    def __len__(self):
        return len(self.input_ids)

    def __getitem__(self, i) -> Dict[str, torch.Tensor]:
        return dict(
            input_ids=self.input_ids[i],
            labels=self.labels[i],
            attention_mask=self.attention_mask[i],
        )

class LazySupervisedDataset(Dataset):
    """Dataset for supervised fine-tuning."""

    def __init__(self, raw_data, tokenizer: transformers.PreTrainedTokenizer, max_len: int):
        super(LazySupervisedDataset, self).__init__()
        self.tokenizer = tokenizer
        self.max_len = max_len

        rank0_print("Formatting inputs...Skip in lazy mode")
        self.tokenizer = tokenizer
        self.raw_data = raw_data
        self.cached_data_dict = {}

    def __len__(self):
        return len(self.raw_data)

    def __getitem__(self, i) -> Dict[str, torch.Tensor]:
        if i in self.cached_data_dict:
            return self.cached_data_dict[i]

        ret = preprocess([self.raw_data[i]["conversations"]], self.tokenizer, self.max_len)
        ret = dict(
            input_ids=ret["input_ids"][0],
            labels=ret["labels"][0],
            attention_mask=ret["attention_mask"][0],
        )
        self.cached_data_dict[i] = ret

        return ret

def make_supervised_data_module(
    tokenizer: transformers.PreTrainedTokenizer, data_args, max_len,
) -> Dict:
    """Make dataset and collator for supervised fine-tuning."""
    dataset_cls = (
        LazySupervisedDataset if data_args.lazy_preprocess else SupervisedDataset
    )
    rank0_print("Loading data...")

    train_json = json.load(open(data_args.data_path, "r"))
    train_dataset = dataset_cls(train_json, tokenizer=tokenizer, max_len=max_len)
    #print("train_dataset")
    #n=0
    #for inputs in train_dataset:
    #        print(n)
    #        print(inputs)
    #        n=n+1
    #print("train_datasetend")

    if data_args.eval_data_path:
        eval_json = json.load(open(data_args.eval_data_path, "r"))
        eval_dataset = dataset_cls(eval_json, tokenizer=tokenizer, max_len=max_len)
    else:
        eval_dataset = None

    return dict(train_dataset=train_dataset, eval_dataset=eval_dataset)

def LLM_train(train_args,ready_loss,flag):
    global local_rank

    parser = transformers.HfArgumentParser(
        (ModelArguments, DataArguments, TrainingArguments, LoraArguments)
    )
    (
        model_args,
        data_args,
        training_args,
        lora_args,
    ) = parser.parse_args_into_dataclasses(list(train_args))

    # This serves for single-gpu qlora.
    if getattr(training_args, 'deepspeed', None) and int(os.environ.get("WORLD_SIZE", 1))==1:
        training_args.distributed_state.distributed_type = DistributedType.DEEPSPEED

    local_rank = training_args.local_rank

    device_map = None
    world_size = int(os.environ.get("WORLD_SIZE", 1))
    ddp = world_size != 1
    if lora_args.q_lora:
        device_map = {"": int(os.environ.get("LOCAL_RANK") or 0)} if ddp else "auto"
        if len(training_args.fsdp) > 0 or deepspeed.is_deepspeed_zero3_enabled():
            logging.warning(
                "FSDP or ZeRO3 are incompatible with QLoRA."
            )

    # Set RoPE scaling factor
    is_chat_model = 'chat' in model_args.model_name_or_path.lower()
    if (
            training_args.use_lora
            and not lora_args.q_lora
            and deepspeed.is_deepspeed_zero3_enabled()
            and not is_chat_model
    ):
        raise RuntimeError("ZeRO3 is incompatible with LoRA when finetuning on base model.")

    model_load_kwargs = {
        'low_cpu_mem_usage': not deepspeed.is_deepspeed_zero3_enabled(),
    }

    # Load model and tokenizer

    if flag==1:

        config = transformers.AutoConfig.from_pretrained(
            model_args.model_name_or_path,
            cache_dir=training_args.cache_dir,
            trust_remote_code=True,
        )
        config.use_cache = False

        model = transformers.AutoModelForCausalLM.from_pretrained(
            model_args.model_name_or_path,
            config=config,
            cache_dir=training_args.cache_dir,
            device_map=device_map,
            trust_remote_code=True,
            quantization_config=GPTQConfig(
                bits=4, disable_exllama=True
            )
            if training_args.use_lora and lora_args.q_lora
            else None,
        )
    else:
        #model_args.model_name_or_path=training_args.output_dir
        config = transformers.AutoConfig.from_pretrained(
            training_args.output_dir,
            cache_dir=training_args.cache_dir,
            trust_remote_code=True,
        )
        config.use_cache = False

        model = AutoPeftModelForCausalLM.from_pretrained(
                training_args.output_dir, # path to the output directory
                device_map=device_map,
                trust_remote_code=True
            ).eval()
    tokenizer = transformers.AutoTokenizer.from_pretrained(
        model_args.model_name_or_path,
        cache_dir=training_args.cache_dir,
        model_max_length=training_args.model_max_length,
        padding_side="right",
        use_fast=False,
        trust_remote_code=True,
    )
    tokenizer.pad_token_id = tokenizer.eod_id

    if training_args.use_lora:
        if lora_args.q_lora or 'chat' in model_args.model_name_or_path.lower():
            modules_to_save = None
        else:
            modules_to_save = ["wte", "lm_head"]
        lora_config = LoraConfig(
            r=lora_args.lora_r,
            lora_alpha=lora_args.lora_alpha,
            target_modules=lora_args.lora_target_modules,
            lora_dropout=lora_args.lora_dropout,
            bias=lora_args.lora_bias,
            task_type="CAUSAL_LM",
            modules_to_save=modules_to_save  # This argument serves for adding new tokens.
        )
        if lora_args.q_lora:
            model = prepare_model_for_kbit_training(
                model, use_gradient_checkpointing=training_args.gradient_checkpointing
            )

        model = get_peft_model(model, lora_config)

        # Print peft trainable params
        model.print_trainable_parameters()

        if training_args.gradient_checkpointing:
            model.enable_input_require_grads()

    # Load data
    data_module = make_supervised_data_module(
        tokenizer=tokenizer, data_args=data_args, max_len=training_args.model_max_length
    )

    # Start trainner
    trainer = Trainer(
        model=model, tokenizer=tokenizer, args=training_args, LLM_losses=ready_loss ,**data_module
    )

    trainer.train()
    trainer.save_state()

    safe_save_model_for_hf_trainer(trainer=trainer, output_dir=training_args.output_dir, bias=lora_args.lora_bias)
    print("training over")

if __name__ == "__main__":

    args = ("--model_name_or_path", "/root/zhengzh/Bert-TextClassification/Qwen/Qwen-7B-Chat","--data_path","/root/zhengzh/Bert-TextClassification/Qwen/finetune/traindata.json","--fp16","True","--output_dir","/root/zhengzh/Bert-TextClassification/Qwen/output_qwen","--num_train_epochs","5","--per_device_train_batch_size","1","--per_device_eval_batch_size","1","--gradient_accumulation_steps","1","--evaluation_strategy","no","--save_strategy","steps","--save_steps","1000","--save_total_limit","10","--learning_rate","3e-4","--weight_decay","0.1","--adam_beta2","0.95","--warmup_ratio","0.01","--lr_scheduler_type","cosine","--logging_steps","1","--report_to","none","--model_max_length","512","--lazy_preprocess","True","--gradient_checkpointing","True","--use_lora","True","--deepspeed","/root/zhengzh/Bert-TextClassification/Qwen/finetune/ds_config_zero2.json")

    testlist=[]
    testlist.append(torch.tensor(1.0, dtype=torch.float32))
    testlist.append(torch.tensor(2.0, dtype=torch.float32))
    testlist.append(torch.tensor(3.0, dtype=torch.float32))
    testlist.append(torch.tensor(4.0, dtype=torch.float32))
    testlist.append(torch.tensor(5.0, dtype=torch.float32))
    LLM_train(args,testlist,1)

main script that run
import json
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer

def run_cmd( cmd_str='', echo_print=1):

    from subprocess import run
    if echo_print == 1:
        print('\n cmd="{}"'.format(cmd_str))
    run(cmd_str, shell=True)

if __name__ == "__main__":
    run_cmd('python /root/zhengzh/Bert-TextClassification/Qwen/finetune.py')

    model = AutoPeftModelForCausalLM.from_pretrained(
        "/root/zhengzh/Bert-TextClassification/Qwen/output_qwen", # path to the output directory
        device_map="auto",
        trust_remote_code=True
    ).eval()
    merged_model = model.merge_and_unload()
# max_shard_size and safe serialization are not necessary.
# They respectively work for sharding checkpoint and save the model to safetensors
    merged_model.save_pretrained("/root/zhengzh/Bert-TextClassification/Qwen/merged_model", max_shard_size="2048MB", safe_serialization=True)
    tokenizer = AutoTokenizer.from_pretrained(
        "/root/zhengzh/Bert-TextClassification/Qwen/output_qwen", # path to the output directory
        trust_remote_code=True
    )
    tokenizer.save_pretrained("/root/zhengzh/Bert-TextClassification/Qwen/merged_model")

The first time I used lora to finetune the model, I ran the main script. The second time I used lora to finetune the model, I modified the model_name_or_path of the args variable in finetune.py to "/root/zhengzh/Bert-TextClassification/Qwen/merged_model ", and then an out of memory error was reported.

Regarding this error:

ValueError: Cannot merge LORA layers when the model is gptq quantized

As the message states, GPTQ does not support merging of LoRA weights. Could you please try bitsandbytes, which does support merging?
Regarding the other issue with running two fine-tuning steps in a row: This is a very big script and pinpointing where exactly the issue could be is very difficult.
I tried to condense the issue down to see if I can reproduce it. Here is the script:
# issue-1513.py
import sys
import torch
from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
from tqdm.auto import tqdm

def train(path):
    model = AutoModelForCausalLM.from_pretrained(
        path,
        quantization_config=BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4"),
    )
    model = prepare_model_for_kbit_training(model)

    config = LoraConfig(task_type="CAUSAL_LM", target_modules="all-linear")
    model = get_peft_model(model, config)

    optimizer = torch.optim.AdamW(model.parameters(), lr=1e-5)
    input_ids = torch.randint(0, 10000, (1, 192)).cuda()
    attention_mask = torch.randint(1, 2, (1, 192)).cuda()
    for _ in tqdm(range(100), total=100):
        res = model(input_ids=input_ids, attention_mask=attention_mask, labels=input_ids)
        res.loss.backward()
        optimizer.step()
        optimizer.zero_grad()

    model = model.merge_and_unload()
    save_path = path.replace("/", "-") + "-lora"
    model.save_pretrained(save_path)
    print(f"saved model in {save_path}")

if __name__ == '__main__':
    arg = sys.argv[1]
    train(arg)

This is a very simple training script for a small Qwen model with bnb 4 bit quantization.
The first time around, I call it using python issue-1513.py "Qwen/Qwen1.5-0.5B". This performs fine-tuning on the 4bit quantized Qwen1.5-0.5B model, merges the LoRA weights, and stores the whole checkpoint in the local folder Qwen-Qwen1.5-0.5B-lora/. During training, I observe 2959 MiB of GPU memory being used.
After this, I call the script python issue-1513.py Qwen-Qwen1.5-0.5B-lora/. This loads the local model and then applies the exact training steps. Again, I observe 2959 MiB of GPU memory. This means that in principle, this works exactly as expected. Could you please try my script and see if you can replicate? It should only take a few minutes.
I'm not sure what the difference between your script and mine is that causes the difference. Did you check that after the first run, GPU memory is completely cleared?

Regarding this error:

ValueError: Cannot merge LORA layers when the model is gptq quantized

As the message states, GPTQ does not support merging of LoRA weights. Could you please try bitsandbytes, which does support merging?
Regarding the other issue with running two fine-tuning steps in a row: This is a very big script and pinpointing where exactly the issue could be is very difficult.
I tried to condense the issue down to see if I can reproduce it. Here is the script:
# issue-1513.py
import sys
import torch
from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
from tqdm.auto import tqdm

def train(path):
    model = AutoModelForCausalLM.from_pretrained(
        path,
        quantization_config=BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4"),
    )
    model = prepare_model_for_kbit_training(model)

    config = LoraConfig(task_type="CAUSAL_LM", target_modules="all-linear")
    model = get_peft_model(model, config)

    optimizer = torch.optim.AdamW(model.parameters(), lr=1e-5)
    input_ids = torch.randint(0, 10000, (1, 192)).cuda()
    attention_mask = torch.randint(1, 2, (1, 192)).cuda()
    for _ in tqdm(range(100), total=100):
        res = model(input_ids=input_ids, attention_mask=attention_mask, labels=input_ids)
        res.loss.backward()
        optimizer.step()
        optimizer.zero_grad()

    model = model.merge_and_unload()
    save_path = path.replace("/", "-") + "-lora"
    model.save_pretrained(save_path)
    print(f"saved model in {save_path}")

if __name__ == '__main__':
    arg = sys.argv[1]
    train(arg)

This is a very simple training script for a small Qwen model with bnb 4 bit quantization.
The first time around, I call it using python issue-1513.py "Qwen/Qwen1.5-0.5B". This performs fine-tuning on the 4bit quantized Qwen1.5-0.5B model, merges the LoRA weights, and stores the whole checkpoint in the local folder Qwen-Qwen1.5-0.5B-lora/. During training, I observe 2959 MiB of GPU memory being used.
After this, I call the script python issue-1513.py Qwen-Qwen1.5-0.5B-lora/. This loads the local model and then applies the exact training steps. Again, I observe 2959 MiB of GPU memory. This means that in principle, this works exactly as expected. Could you please try my script and see if you can replicate? It should only take a few minutes.
I'm not sure what the difference between your script and mine is that causes the difference. Did you check that after the first run, GPU memory is completely cleared?

Thank you for your help. I will try according to your suggestions first. If I find any specific problems in the future, please allow me to ask further questions


Set an attribute value via Selene

Hey, I need to change and style property value of a slider element inside my HTML.

How can I do it via selene ? :)
Thanks a lot !

Hm.. how would you do it with selenium we driver?
I then prepare a receipt for Selene...
On Wed, Apr 27, 2022, 18:10 amitaz3354 @.***> wrote:

Hey, I need to change and style property value of a slider element inside
my HTML.

How can I do it via selene ? :)
Thanks a lot !
—
Reply to this email directly, view it on GitHub
https://github.com/yashaka/selene/issues/412, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAO6ZHSL32M3XGVTS6G2GHLVHFKHTANCNFSM5UPOZKAQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Look at this example:
from selene.api import browser, s

my_element = s('locator')
new_style_value = 'right: 100500%;'
browser.execute_script('arguments[0].setAttribute("style",arguments[1])', my_element(), new_style_value)

This will also work:
from selene.api import browser, s

new_style_value = 'right: 100500%;'
s('locator').execute_script('element.setAttribute("style",arguments[0])', new_style_value)

Maybe we also can add an extra command to allow user something like:
from selene.api import browser, s, command

s('locator').perform(command.js.set_style('right: 100500%;'))

Added:
from selene.api import browser, s, command

s('locator').perform(command.js.set_style_property('right', '100500%'))


Add version selection

At the minute the checkov version is tied to the Github action version, and there's no correlation in the tags so if you want to pin a specific checkov version it's quite awkward.
It would be nice to change this to an input in the action, similar to how this tflint action works: https://github.com/marketplace/actions/setup-tflint#tflint_version
This allows more configurable functionality, and also allows the Github action features to progress without forcing a checkov version update at the same time.

+1 on this.
It helps to lock the version when running it locally through other tools like task or pre-commit and then match the version on the CI/CD pipeline (GHA).

Is it possible to integrate Checkov with GitHub CI?
I can't find any documentation for the same.
Can someone help?


Out of Memory C++ Fatal Errors

Hey Chris, getting lost of fatal errors C++ out of memory and killing processes etc. Install takes over an hour to complete, (330mb internet connection )and I am missing the wifi in the taskbar, unable to adjust screen brightness on the laptop.
laptop has 8gb of ram but obviously some of that ill be allocated to the APU.
screenshot attached.

Fixed in latest update


Update the openebs operator(s) to place maya based deployments into tainted K8s Nodes

Is this a BUG REPORT or FEATURE REQUEST?
FEATURE REQUEST
Why is this required?

OpenEBS has a set of K8s Deployments which are typically control plane based services for OpenEBS
It will be good to place these (optionally, depends on customer environments/requirements) on control plane specific K8s Nodes.

This will ensure non-interference with data plane & application plane K8s Nodes

How to do this ?

Taint the K8s Nodes for controller plane services
Ensure this is an optional feature for the deployments where this is not applicable
Ensure this is an optional feature for the deployments where customer does not want this
Might want to build a Tool / Daemon / CLI that looks into existing K8s deployment, accepts/assumes admin entries, generates these yaml based operators & runs them as well.

Might want to break this into a series of smaller tasks/issues

Related Issues

Update the installation steps available at https://docs.openebs.io/docs/next/installation.html with information on how to configure Tolerations for the control plane pods.


Allow setting nzModalTitle via a directive (similar to nzModalFooter)

What problem does this feature solve?
It would be useful to be able to set a modal's title via a directive, similar to nzModalFooter: https://github.com/NG-ZORRO/ng-zorro-antd/pull/3036
What does the proposed API look like?
Similar to nzModalFooter directive:
<div *nzModalTitle>
  Modal Title
</div>

Need this


Removing ancient scsi experiment and obsolete spelling/dictionary tools

Signed-off-by: Álvaro Jurado<EMAIL_ADDRESS>

This leaves pending of being ported:
aquarela -> CIFS/Samba server
fax -> Fax receiver/sender fs
grap -> pic(1) preprocessor for drawing graphs (another one)
snap -> save/restore static process images fs
spin -> verification tool for models of concurrent systems (historic, maybe interesting)
tapefs -> tape storing system fs
tcs -> character set translator (classic unix program)
vac -> archival copy of trees for venti (harvey has venti)
vnc -> server/viewer remote frame buffer

ok?

Sorry for adding vnc, it was in the same branch. I pointed a doubt in sys/src/cmd/vnc/compat.c


Download actions/action-versions latest release on win/linux/mac and set ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE.

Description
New tool
Fetching latest release from https://github.com/actions/action-versions
The latest release contain all tar.gz or zip of all versions of the top 5 used first-party actions (ex: actions/checkout).
With these cached on the hosted runner image, the hosted runner won't need to reach out to codeload to download those same assets over and over again.
For new tools, please provide total size and installation time.
The asset is about 120MB for both Windows and non-Windows, the download and unzip normally is less than 10s.
Since the assets is an archive of other archive, we only need to unzip the outer layer, after unzip the total size on disk are pretty much the same.

Related issue:
https://github.com/github/actions-broker/issues/17
Check list

[ ] Related issue / work item is attached
[ ] Tests are written (if applicable)
[ ] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

Close since PR has created against upstream


Buster with kernel 5.1 or newer doesn't support USB Storage

Hi,
There appeared the problem with disk connected through USB-to-SATA adapter (JMicron from Pine Store) using the latest kernel images.
The last know working is 5.0.0-1105. There are a few newer and confirmed as being not working: 5.1.0-1114, 5.2.0-1116, 5.3.0-rc4-1118. The other weren't tested.
Steps:

Install Buster Minimal 0.9.8 for Rock64 on sd card and boot it
Upgrade kernel to affected one
Reboot system with the new kernel
Connect the disk with SATA adapter to USB3.

Current results:
LED on adapter should be green/red but is completely off
Disk is not visible in system even nothing in dmesg
Since these kernel versions, there is as could be expected, also no way to boot system completely installed on USB Storage

For me my USB3 to SATA cable (connected to mechanical HDD) worked. I just couldn't use USB flash drives, tried 2 different ones (one USB3 and one USB2) but they didn't work. I have no idea why the HDD works but the flash drive doesn't. Tried in different ports. For the record my HDD is connected with USB2 because USB3 HDD interferes with Wi-Fi on 2.4GHz, haven't tried the HDD on the USB3 port. I also didn't have get LED's on  with mainline.

I've also have the same problem. I've got a:
ID 152d:0567 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
And it won't be detected by any of the 5.* kernels i've tried (.1,.2,.3)
Works just fine with 4.4.XXX.

Same issue here 😞Only USB2.0 works.

This is supported as part of 0.10.x.


Add reusable workflow parts that can (optionally) be used by projects for luarocks deploy

This is basically a straight copy of what I have in moon-sand right now which was already the logic I like and should work as-is for what @mwild1 requested for luaexpat. As such it seems like a good place to start.
This isn't a complete workflow, it is just some reusable parts that can easily be assembled into a workflow using the new dispatcher features.

After this is approved I'll run some tests on my sandbox repo to make sure it works as expected being called from a different repository to make sure the luaexpat PR is sound.
(It would probably be useful for me to to have elevated privs on this repo too.)


Pagination for Collection Views

I am not sure this feature is already present, but it would be nice if there was a configuration for specifying pagination.
I would like to think there would be use cases where the collections would have significantly more objects.
Example is the ETD 2016 event [1].
Incidentally, I have zero experience with Perl so it will take a while before I can start making changes and submitting pull requests.
[1] http://docs.ndltd.org/metadata/etd2016/index.html

Pagination isn't really necessary and my goal is to avoid adding features that can be avoided.
I already added it to the search page, but that is easier because the entire page is generated by Javascript.  If I have time, I would like to undo the pagination there and put in a smarter endless scrolling (like FB) system.
Don't worry about Perl changes - I want to rewrite the Perl bits in Python before it gets much larger.


Add CVE-2022-29464 CVE Justification

Please note the subject.

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


Simplify Optional unwrap in OutlineMenu

Description
Simplify Optional unwrap in OutlineMenu
Checklist

[x] I read and understood the contributing guide as well as the code of conduct
[x] My changes generate no new warnings
[x] My code builds and runs on my machine
[x] I documented my code
[x] Review requested

@allcontributors add @richardtop for code.


Single Types Feature Enhancement

Allowing source plugin to accept Strapi Single Types. Have added a new array option in the gatsby-node for all single type items. Not sure if this is an 'ugly' solution or not. If so, please give me some advice on how to make it better. But, the solution does work! :)

Please check and merge this PR, it's a really hot feature.

Hi @meinvolk Can you please update your PR to support singleTypes as specific nodes with using a list for them ? It's a bit more work but would be a lot cleaner :)

@alexandrebodin
So the problem is when a Single Type is registered it will create a node in GraphQL that has "all" prepended on the type. For example, right now the plugin is creating allStrapiHomePage, and StrapiHomePage. We don't need allStrapiHomePage, since it is a single type and no collection is possible.
I have looked around the internet a ton for how to do this with no luck. I have emailed a Jason Lengstorf a Gatsby enthusiast and Netlify developer, and got the this response.

To the best of my knowledge Gatsby doesn't support this by default, but you may want to reach out to Mikhail Novikov, who leads the GraphQL efforts at Gatsby — he'll know for sure and can give you insight in the how and why of things

I posted in the Gatsby Discord channel and got responses like.

"complicating it to make all not happen in certain cases seems wasteful and possibly more confusing than conforming to the general case."

and

"in the two years of talking to gatsby users no one complained about that."

What do you all think? I thought it was a good idea, but I am not sure if it is possible.

Ugh yes 🔥🔥 I'm glad this is being addressed! I'm about to add this feature branch into my package if it's not released soon

Going to test today :)


Operation after trigger has incorrectly configured Run-After settings

Describe the Bug
When making a simple Request-Response workflow, the Response action does not recognize the Trigger for the Run After property.
This does not happen with the GA designer.
With this, when changing to CodeView and then back to the designer, it breaks and doesn’t load the workflow content properly, only recognizing the trigger.
Steps to Reproduce the Bug or Issue

Create workflow
Add Request trigger
Add response action
Save
Add other actions in between
Save

Workflow JSON
No response
Expected behavior
Users should be able to save the workflow after adding an operation after the trigger.
Screenshots or Videos

Platform And Browser
Chrome/Edge
Windows
Additional context
No response
AB#16932179

Fixed with #1575, it should be rolling out through the week of Feb. 6th.


Quickstart for sqlalchemy lite with wrong imports

see https://flask-security-too.readthedocs.io/en/stable/quickstart.html#basic-flask-sqlalchemy-lite-application
DeclarativeBase
and
FSQLALiteUserDatastore
missing

To get things working - be sure to change the tablename values to lower case "User"->"user" and "Role"->"role"


[Question]

Looks interesting, came across this while studying .xraw file format - what does VoxelFortress do?

It converts exported heightmaps from the game Dwarf Fortress into Xraw format for viewing the terrain.

It converts exported heightmaps from the game Dwarf Fortress into Xraw format for viewing the terrain.


V2 beta: Sprites in dialogue boxes have improper transparency

Describe the bug
Instead of having proper transparency to the background of the UI window, sprites displayed in a dialogue box use a white background color instead.
To Reproduce
Steps to reproduce the behavior:

Set the assets/ui/frame.png texture to the one provided at the bottom of the issue report.
Create a Text: Display Dialogue event, and set the sprite to any sprite containing the #65FF00 transparency color.
Launch the game and activate the display dialogue event.

Expected behavior
The sprite's transparency should be used properly, displaying the texture in the middle tile of the frame texture. If this is infeasible due to GBC limitations, it should be possible to select the background color for sprite transparency elsewhere.
Screenshots

Platform (please complete the following information):

OS: MacOS 11.2.1
App version: 2.0.0-beta5 (6e0abd36)

Additional context
Sprite in example screenshot is the radio sprite from the example project. UI frame texture:

Avatars are not sprites. They are made of tiles, meaning that they should use the same colors that backgrounds use (#071821, #306850, #86c06c, and #e0f8cf) which does not include the #65FF00 transparency color that sprites use.

...why does it only let you use sprites, then?,,,,,

There isn't an assets/avatars folder, and the sprites are also 16x16. There should probably be an assets/avatars folder though.

Requirements
Sprite PNGs must only contain the following four colors:
#071821
#86c06c
#e0f8cf
#65ff00

Is this just a docs issue, with nontransparent sprites for dialogue boxes being an undocumented feature?

It's a docs issue. It is wrong in saying that avatars are sprites.

Looks like you're right! There should still be a way to determine what color the transparent color turns into so that you don't have to have two sprite textures for sprites that both get used in-world and in a dialogue screen, so I'll rewrite the issue when I've got time.

actually since it's more of a feature request now I'm gonna close this one and open a new one.


fix(meta): fix query for running_fragment_parallelisms in postgres backend

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?

Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

#18672
#18740
#18743  👈
main

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

Join @BugenZhao and the rest of your teammates on  Graphite


Saving as different formats / Adding background colors

We have recently upgraded our app to use your component instead of an old, outdated javascript option. Thank you for the great component.
The one item we are missing is the ability to save to jpg or add a background to the png, the reason for this requirement I believe is quite specific to our use case; using the image in crystal reports which does not support transparent png.
Using the old component which has dissapeared off github we could achieve this by setting it up as follows:
var pad = new SignaturePad(canvas, { backgroundColor: "rgb(255,255,255)" });
When rendering the signatures in crystal reports from this component, they show with a black background

Is there a way to add a white background to the signature?

@clodewyks I've just published an update to the component now which allows you to set the background color. You can provide it within the SignaturePadOptions
You should be able to convert the base64 string to whatever format you'll need.

Thank you @MarvinKlein1508 , tested and deployed.
Thank you for the fast response


refactor  with  help of new getXMLDomainDefFromLibvirt(domain)

what change this PR:

1change) change name of xmlgetter with more clear one (https://github.com/dmacvicar/terraform-provider-libvirt/commit/a6cc257ec1674f1283af757953517225899c75a4)

2 change) introduce new  function for retrieve XMLDefinitionDomain from existing domain (https://github.com/dmacvicar/terraform-provider-libvirt/commit/4eb51f5e3df0885ff9845435793dab84608e7dd8)

3change) avoid error when doing Testacc with pts2 ( i get device not found). use pts0 instead.(https://github.com/dmacvicar/terraform-provider-libvirt/pull/393/commits/b199d2a899436a5b2f8f88575ac5c09d0fc78b43)

2refactoring)  starting from the new function getXMLDomainDefFromLibvirt https://github.com/dmacvicar/terraform-provider-libvirt/commit/4eb51f5e3df0885ff9845435793dab84608e7dd8
refactor duplicata code

Last step is still on WIP.

@dmacvicar  ok this new function is a more consistent pattern ( i think we had 5/6 copy paste in the domain_testacc)

ok, i am still hitting the pb with ` ibvirt_domain.acceptance-test-domain: Error creating libvirt domain: virError(Code=1, Domain=10, Message='internal error: Process exited prior to exec: libvirt: QEMU Driver error : Unable to stat /dev/pts/0: No such file or directory'``
i will remove that commit


Feat/account

Fixes #129

Maybe we should add it also in
fromMnemonics
and in
CreateWithMnemonics
in this same PR... what you think?
On Mon, Oct 5, 2015 at 3:33 PM, Ivan Socolsky<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/bitpay/bitcore-wallet-client/pull/154
Commit Summary

all test passing with account 0
support account arg when creating from external source
v0.7.0

File Changes

M lib/api.js
https://github.com/bitpay/bitcore-wallet-client/pull/154/files#diff-0
(2)
M lib/credentials.js
https://github.com/bitpay/bitcore-wallet-client/pull/154/files#diff-1
(17)
M package.json
https://github.com/bitpay/bitcore-wallet-client/pull/154/files#diff-2
(4)

Patch Links:

https://github.com/bitpay/bitcore-wallet-client/pull/154.patch
https://github.com/bitpay/bitcore-wallet-client/pull/154.diff

—
Reply to this email directly or view it on GitHub
https://github.com/bitpay/bitcore-wallet-client/pull/154.

--
BitPay.com

Done!
This needs careful review as it breaks compatibility in the BWC API.
The strategy was to not assume any value by default in credentials.js. All params are required and checked for validity.
BWC API had some inconsistencies with arguments, especially the network param. Assuming default values there should be ok.

Great job, we need to do https://github.com/bitpay/copay/issues/3311 for the next release of Copay.

hi all, are there any examples on how to use multiple accounts under one HD wallet? @isocolsky
even high-level steps will do.
I have looked through the BWC & BWS code but never managed to figure it out.
If, for example, I tried the seedFromExtendedPrivateKey method passing in an account index like 1, then I've seen that you get different copayer ID back than the default (i.e with account index 0). But then, I'd want to use the result to create addresses and get balances. It says that it's not authorised because BWS isn't aware of this copayer ID, isn't it?
Let me know advice you have.


feat: Cross-validation reporter with accessors (Guillaume's PR improvements)

UX changes
Suggestion to avoid asking the user to do "return_xxx", asking them to give X and y again, and to allow for adding scorings as the current feature does.
With this piece of code, suggested by Guillaume in a discussion this afternoon:
class CrossValidationReporter:
  def __init__(self, estimator, X, y):
    self.cv_results = sklearn.cross_validation(estimator, X, y)
    self.X = X
    self.y = y

We would have this change.

before
after

 from sklearn.model_selection import cross_validate  cv_results = cross_validate(classifier, X, y)
 from skore import CrossValidationReporter  reporter = CrossValidationReporter(classifier, X, y)  cv_results = reporter.cv_results_

And the second option offers all the functions listed in the top comment.
This would answer the need:

change quite simple for the user, although not transparent
possible for them to have exactly the same thing as before

Suggestion about the "put" and parameter "project".
I'm in favor of having both. Setting project = project wouldn't put actually, but it would make it appear in the activity feed. This way, we avoid overloading the items list. So far, our testers are a bit surprised to see something appear in the items sections while they didn't put it, while they just learned that they can make items appear by doing using the put function.
This will be tacled in next issues.
Two backends
For now, following a decision taken this morning with the design team (cf this notion page for probablers), we will keep only one backend, plotly, to keep it simple and easy to develop.
Current features
Some of the current features are not included in this rework and will need to be added back:

add scorings (value: avoid having to rerun everything when you notice that you didn't chose correctly the scoring)
aggregation: I think it cannot be included in the object CrossValidationReporter, it doesn't make sense. I think it would be more something like a new object, CrossValidationComparator.

Enabling to put CrossValidationReporter into an item will be done in a next issue too, once the UI is designed.
This will be done in next issues.
Originally posted by @MarieS-WiMLDS in https://github.com/probabl-ai/skore/issues/749#issuecomment-2494069151
Ready State Checklist

Specification complete and validated

[ ] Full description with validated functional requirements

Design deliverables

[ ] UI/UX mockups #802
[ ] Python: Function signatures and interfaces defined

See https://github.com/probabl-ai/skore/pull/749#issuecomment-2498613416

An idea came to mind while reading this PR code.
It might be interesting to save the arguments provided to the CrossValidationReporter. WDYT?
This would help the user track how the CV operation was originally defined.

Yes, I agree! All the more that it will be necessary to compute some part of the object that we do not want to compute at first (because too long). I have to list what we want to compute later and then list what is needed.

(It seems related to https://github.com/probabl-ai/skore/issues/557)

With #847 merged, it might be good to clean this issue/close it and open others for future improvements.

indeed Auguste! This will close with the integration of the cv item in front.


fix phpdoc that annoyed me

super simple doc fix!

Current coverage is 96.35% (diff: 100%)

Merging #10 into master will not change coverage

@@             master        #10   diff @@
==========================================
  Files             9          9
  Lines           274        274
  Methods          63         63
  Messages          0          0
  Branches          0          0
==========================================
  Hits            264        264
  Misses           10         10
  Partials          0          0

Powered by Codecov. Last update bd67e14...6f5fb12

Thank you


added new detection

this is base on previous work

looks like this has already been merged in: https://github.com/splunk/security_content/pull/1326/files

@miskoSplunk will close this one because your great feedback was addressed in the other PR


Very slippery things should still slip on lower speed thresholds

Description
It would be nice to have certain very slippery things such as space lube or omega soap to still be able to slip players who are slowed down by the following movement speed reducers: damage, hardsuits, hunger, dragging, etc.
Currently if your movement speed is lowered by any means you wont slip even if you are not using the walk key. This makes sense with things such as banana peels since your character is moving slower after all. Some things however (space lube, omega soap) should still slip you if your character is not being extra careful, i.e using the walk key.
Additional context
Not sure how it is currently coded but when you walk do you not slip because of your lowered move speed or because of the fact you are using the walk action?

you can just change the movement threshold on SlipperyComponent


devServer.public no longer exists in Vue CLI v5. Update documentation on that

Version
5.0.0-rc.1
Environment info
Environment Info:

  System:
    OS: Linux 4.19 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  Binaries:
    Node: 16.13.0 - /usr/local/bin/node
    Yarn: 1.22.15 - /usr/bin/yarn
    npm: 8.1.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 96.0.4664.45
    Firefox: Not Found
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.2.1
    @vue/babel-helper-vue-transform-on:  1.0.2
    @vue/babel-plugin-jsx:  1.1.1
    @vue/babel-plugin-transform-vue-jsx:  1.2.1
    @vue/babel-preset-app:  5.0.0-rc.1
    @vue/babel-preset-jsx:  1.2.4
    @vue/babel-sugar-composition-api-inject-h:  1.2.1
    @vue/babel-sugar-composition-api-render-instance:  1.2.4
    @vue/babel-sugar-functional-vue:  1.2.2
    @vue/babel-sugar-inject-h:  1.2.2
    @vue/babel-sugar-v-model:  1.2.3
    @vue/babel-sugar-v-on:  1.2.3
    @vue/cli-overlay:  5.0.0-rc.1
    @vue/cli-plugin-babel: ~5.0.0-0 => 5.0.0-rc.1
    @vue/cli-plugin-eslint: ~5.0.0-0 => 5.0.0-rc.1
    @vue/cli-plugin-router:  undefined (5.0.0-rc.1)
    @vue/cli-plugin-typescript: ~5.0.0-0 => 5.0.0-rc.1
    @vue/cli-plugin-unit-jest: ~5.0.0-0 => 5.0.0-rc.1
    @vue/cli-plugin-vuex:  undefined (5.0.0-rc.1)
    @vue/cli-service: ~5.0.0-0 => 5.0.0-rc.1
    @vue/cli-shared-utils:  5.0.0-rc.1
    @vue/component-compiler-utils:  3.3.0
    @vue/eslint-config-prettier: ^6.0.0 => 6.0.0
    @vue/eslint-config-typescript: ^9.1.0 => 9.1.0
    @vue/test-utils: ^1.3.0 => 1.3.0
    @vue/vue2-jest: ^27.0.0-alpha.3 => 27.0.0-alpha.3
    @vue/web-component-wrapper:  1.3.0
    eslint-plugin-vue: ^8.0.3 => 8.0.3
    jest-serializer-vue:  2.0.2
    typescript: ~4.1.5 => 4.1.6
    vue: ^2.6.11 => 2.6.14
    vue-class-component: ^7.2.3 => 7.2.6
    vue-cli-plugin-vuetify: ^2.4.3 => 2.4.3
    vue-eslint-parser:  8.0.1
    vue-hot-reload-api:  2.3.4
    vue-loader:  16.8.3 (15.9.8)
    vue-property-decorator: ^9.1.2 => 9.1.2
    vue-style-loader:  4.1.3
    vue-template-compiler: ^2.6.11 => 2.6.14
    vue-template-es2015-compiler:  1.9.1
    vuetify: ^2.4.0 => 2.6.0
    vuetify-loader: ^1.7.0 => 1.7.3
  npmGlobalPackages:
    @vue/cli: 5.0.0-rc.1

Steps to reproduce

Have a vue project with @vue/cli v5 dependencies run in a development container.
Set up a custom "publicPath" in vue.config.js.
Run "npm run serve"

What is expected?
If hot-reload needs additional config for a devServer running in a container, the proper way to fix it is given.
What is actually happening?
Hot-reload is not working, and we cannot set up devServer.public anymore. There should be an updated error message on how to fix it instead of the following, which we got:
It seems you are running Vue CLI inside a container.

  Since you are using a non-root publicPath, the hot-reload socket
  will not be able to infer the correct URL to connect. You should
  explicitly specify the URL via devServer.public.

  Access the dev server via http://localhost:<your container's external mapped port>

It seems that the update to webpack removed the devServer.public option that could have been used to fix the hot-reload issue. Please update the warning message to update on the proper way to fix the hot-reload issue.

I'm still facing this issue. Any further info?
Thanks in advance

I'm facing the same issue of hot-reload when run vue.js on Docker container.

WORKAROUND
So far there is no clear solution for this problem , so, for who have interest to solve the hot-reload issue when running<EMAIL_ADDRESS>or later versions on Docker container for develop Vue.js applications, you can install 'nodemon' package which is a tool that helps to automatically restarting the node application when file changes in the directory are detected.
So  the Dockerfile for Vue service would look like below:
Vue.Setup.Dockerfile
FROM node:17-alpine
EXPOSE 8080
WORKDIR /app/frontend
RUN npm --force install -g<EMAIL_ADDRESS>
# install 'nodemon' package.
RUN npm install nodemon

COPY /frontend /app/frontend
ENV PATH /app/frontend/node_modules/.bin:$PATH

# Execute the command to run development server of vue/cli using 'nodemon', after specify the files to track and to
# watch only, in my case only want 'src' file of vue application to watch, and track changes in files with:
# .js, .css or .vue extension.
CMD ["nodemon", "--ext", "js,css,vue", "--watch src", "--exec", "npm", "run", "serve" ]

NOTE
I know it's not an ideal solution but it's working fine and will take 2-3 seconds to restart your container and the other ones that depends on.

I'm facing same issue and hot-reload does not work stack overflow

https://cli.vuejs.org/migrations/migrate-from-v4.html#dev-server suggests setting devServer.client.webSocketURL instead of devServer.public. Doing so fixes the issue, but the correct webSocketURL must be set. I extracted this value manually by inspecting the ws requests in dev tools for the non-containerized version of the app. An automatic way to figure this out and inject it would be great.


Update RustPlayerManager.cs

Fixes NRE on covalence.Players.FindPlayer
Happens in edge-cases where IPlayer.Name is null for some reason.

Merged manually with support for ALL games. Not sure why it is null in the first place though, so if you figure that out please let us know.


feat: set default image resolution to 1024 in read_pdf

Before this PR, the image resolution was computed by default this way in read_pdf:
Find pdf dimension, scale by 72 DPI to obtain image dimension.
This raises 2 issues:

Different document sizes yield to different resolutions (constant DPI)
For A4 sizes (a huge amount of docs), this method was re-scaling to 840 x 595 pixels which is way to low for very dense docs.

Now we have a constant resolution of 1024 x 1024 by default.
Any feedback is welcome!
closes #232

I agree with your first comment, but not the second one: we need to have good quality images for recognition task, and default sizing for A4 pdf is 840 x 590 which is low to distinguish letters on small crops. If we want to preserve aspect ratio we can compute another sizing resolution but I think we can't leave this to 840 x 590.

Yes, a zoom x2 would be nice to apply for all A4 docs

Alright, let's reopen the issue until we make a PR for that then :ok_hand:


Chore: update BaseHook.sol license

Related Issue
BaseHook.sol will likely be a required import to any hook contracts or protocols that are built on top of v4. In talking to developers who are likely to build these types of contracts and protocols, the Uniswap Foundation has surfaced a common concern around the restrictions enforced by BaseHook.sol's GPL license.
Description of changes
This PR changes the SPDX License Identifier in BaseHook.sol to MIT. It also edits the License section of the README to note the new exceptions to the GPL that governs most of the repository.

hey team - I need to go back and sign these commits to get this merged i think.  Cursory research tells me that that identifier can be somewhat confusing (h/t to Atis).
Given that the readme says the repo is governed by GPL 2.0, would it make sense for me to change the UNLICENSED identifiers to GPL-2.0-or-later ? Could do that in this PR while i'm signing my commits.
cc @marktoda @snreynolds @willpote

Hi! Sorry for the delay we were focussing on v4-core for a while. I think best to do licensing separately so please can you just sign the commits for this PR :)


problem of plotting Cylinder

There are some problem of plotting cylinder in example5.py
Traceback (most recent call last):
  File "C:/Users/mike/Desktop/3DBP/3D-bin-packing-master/example5.py", line 71, in <module>
    painter.plotBoxAndItems()
  File "C:\Users\mike\Desktop\3DBP\3D-bin-packing-master\py3dbp\main.py", line 615, in plotBoxAndItems
    self._plotCylinder(axGlob, float(x), float(y), float(z), float(w),float(h),float(d),color=color,mode=2)
  File "C:\Users\mike\Desktop\3DBP\3D-bin-packing-master\py3dbp\main.py", line 596, in _plotCylinder
    ax.plot_surface(x_grid, y_grid, z_grid,shade=False,fc=color,ec='black',alpha=1,color=color)
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py", line 1736, in plot_surface
    polyc = art3d.Poly3DCollection(polys, *args, **kwargs)
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\mpl_toolkits\mplot3d\art3d.py", line 518, in __init__
    PolyCollection.__init__(self, verts, *args, **kwargs)
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\collections.py", line 961, in __init__
    Collection.__init__(self, **kwargs)
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\collections.py", line 170, in __init__
    self.update(kwargs)
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\artist.py", line 888, in update
    for k, v in props.items()]
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\artist.py", line 888, in <listcomp>
    for k, v in props.items()]
  File "C:\Users\mike\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\artist.py", line 881, in _update_property
    raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property fc

use Python 3.6 & pip install -r requirenments.txt

I can't reproduce this error, can you provide me the version number of the installed package and the OS used?

I am using windows 10, Python 3.6.5.   from above error log it's something wrong in main.py, specifically "_plotCylinder". I can run example 1-4 without any problem. for example 5 I think it's ploting Cylinder and this issue happened.

I'm sorry that i can't reproduce this error, maybe you can provide more info .
In my guess,the problem is with the matplotlib version,fc is the attribute in matplotlib 3.3.4, check your matplotlib version and re-execute.
Let me know if this solves your problem ,tks

I checked, it's  Version: 2.2.3.  is this version not working well? I cannot upgrade it because of other version dependency. Could you please take a look at plotly 3D mesh library which produce nicer interactive 3D graph: https://plotly.com/python/3d-mesh/#mesh-cube  If you can add such ploting capability of it that will be greate.

Another question, in your version of 3DBP, is the distribution function disabled? i.e. can we still input multiple boxes or containers to pack all items? it seems this version can only support one bin/container to calculate.

There is currently no plan to add a new plot library, maybe you can try to use virtualenv to solve the matplotlib version problem.

I checked, it's Version: 2.2.3. is this version not working well? I cannot upgrade it because of other version dependency. Could you please take a look at plotly 3D mesh library which produce nicer interactive 3D graph: https://plotly.com/python/3d-mesh/#mesh-cube If you can add such ploting capability of it that will be greate.

I checked, it's Version: 2.2.3. is this version not working well? I cannot upgrade it because of other version dependency. Could you please take a look at plotly 3D mesh library which produce nicer interactive 3D graph: https://plotly.com/python/3d-mesh/#mesh-cube If you can add such ploting capability of it that will be greate.

There is currently no plan to add a new plot library, maybe you can try to use virtualenv to solve the matplotlib version problem.

Another question, in your version of 3DBP, is the distribution function disabled? i.e. can we still input multiple boxes or containers to pack all items? it seems this version can only support one bin/container to calculate.

https://github.com/jerry800416/3D-bin-packing/issues/1#issuecomment-966911702 click

OK, I will try. I have one more question. Does the model really consider how to put cylindar items with other cube items seriously, to ensure the way of loading them are realistically sensible? e.g. avoiding putting cube  items on top of the cylindar items because it will fall down during transport. I saw in the main.py that only the drawing part distinguish the cylindar and cube items, which seems that before this procedure all items are actually treated as cube item for calculating the result? Please clarify this issue or any potential limitations in real business practice. thank you very much

The upside-down setting of the cylinder item is invalid, so no scrolling issues will occur, because packer will ensure that the upside is flat, you can check main.py -- line 29  self.updown = updown if typeof == ' cube' else False.
Cylinder items use the diameter as W and H, so it is essentially the same as a cube, but note that W must be equal to H when adding a cylinder.
ex. packer.addItem(Item(partno='Box-5' , name='test', typeof='cylinder', WHD=(1,1 , 5), weight=1, level=1,loadbear=100, updown=True, color='olive'))

so you mean the cylinder item can only be put upright and they cannot be laid down（lay flat）?

where can I remove the limitation? I prefer the model to determin if the cylinder item should be put upright or laid down. and if possible, how to add the constraint that any cube item cannot be put on top of a cylinder item. this will fit for majority of the scenario in real practice.

Sorry,there is no way to remove the limitation.
The cylinder only be upright, so the drawing function doesn't consider the situation of upside down.If the limitation is removed, it will cause an error in the drawing function.

Why does this model take so much time to compute a solution when the quanity of items is big. e.g. I have 3 types of boxes loading for a 40' container: 653326 (252 cartons); 844233 (222 cartons); 484838 (270 cartons); it took nearly 10 minutes to reach a solution. why does it become dramatically slower when the number of items (boxes) increased?

@Westlife1002 Because each new item that is being evaluated to be placed inside the bin is being checked against all items already placed in the bin in order to determine if it is a valid position. This makes calculation time far from linear. For example, see the loop at line 148 in main.py.

@Westlife1002 Because each new item that is being evaluated to be placed inside the bin is being checked against all items already placed in the bin in order to determine if it is a valid position. This makes calculation time far from linear. For example, see the loop at line 148 in main.py.

do u have any workaround on this issue? apparently the computing time is too slow to be useful in this case.

There are definitely ways to improve calculation time, but incorporating these concepts into the current implementation are not rudimentary. I sadly will not have the spare time to contribute to this repository. If you are interested in an implementation that can support fast-paced high-volume logistic operations, you can let me know how to contact you and I might be able to help you.

@moschd hi Moshchd, this is very import issue, as in real world a lot of shipments come with small cartons to fill a container. Please let me know how to contact you. thank you for your help.
@jerry800416 do you have any quick workaround? thanks

@Westlife1002 Hi, yes this is very true. Feel free to contact me on<EMAIL_ADDRESS>

@Westlife1002  If you need fast calculation, you need use algorithms such as GA , PSO or neural network. This is my goal to improve in the next stage, but I have not completed it yet , and it's not a free public project.
If @moschd  can help you, please contact him.

Hi Jerry ,
I know it's closed, but I got some question here.
If we apply WHD to xyz, and cylinder can only be put in a upright manner. I think the diameter of cylinder should be W and D? I know it's working correctly in current version , where W and H stand for diameter. I still got this question, could you point out what's wrong with my thoughts?  And if you think it's more convenient you can use Chinese cause I am from mainland.
Thanks

如果直徑設置為W和D，那確實是可以讓圓柱體以傾倒的狀態打包，但是如果開放這個功能，則會有更多的延伸問題，比如說

圓柱體傾倒放置後，因頂部非平面，那是否可以在上面堆疊物品?
圓柱體傾倒放置後，是否有滾動的可能，那在圓柱體滾動的情況下，如何確保堆疊在上面的物品不會因此產生翻覆的狀況?

另外，目前圓柱體打包方式實際上還是和立方體一樣的模式，兩者的差別只在畫圖上而已


webserver not starting up, no further info in the log why

Checklist

[x] I have read the FAQ
[x] I have checked if this issue already exists (both open and closed issues)
[x] I am using the most recent version of pogom from the master branch
[x] If this is an installation issue, I am posting my OS, OS version, python version, pip version
[x] I'm posting the complete log
[x] I'm using a descriptive title for this issue

My Issue
the webserver won't start listening after i run the script. there are no errors in the log that i may resolve.
[foo@bar]~/Downloads/pogom-master% python2.7 runserver.py -P 63436
2016-08-10 23:26:26,759 [     pgoapi] [   INFO] pgoapi v1.1.7 - Copyright (c) 2016 tjado <https://github.com/tejado>

(also adding -d debug or -d info flag, doesn't give me any information either)
the server is not reachable on that port:
[foo@bar Downloads]$ netstat -tulpen | grep 63436
[foo@bar Downloads]$

OS, OS version, python version, pip version:
Running CentOS 6.8 with no root priviledges.
[foo@bar Downloads]$ cat /etc/redhat-release
CentOS release 6.8 (Final)

[foo@bar Downloads]$ python2.7 --version
Python 2.7.10

[foo@bar Downloads]$ pip2.7 --version
pip 7.1.2 from /package/host/localhost/python-2.7.10/lib/python2.7/site-packages (python 2.7)

also stuff that i had to deal with during installation:

adding the --user argument to when installing requirements.txt with pip to install to userspace (because of being a non-root user)
installing GLIBC 2.14 parallel (because centOS 6.X apparently doesn't support >2.12) according to the second comment on this guide

run it with -H <IP_ADDRESS>
works for me =)

your comment isn't really helpful...
how is providing an alternate IP-adress supposed to resolve my problem?

Please do what @Sociopaat has recommended. If you read the setup instrutions you will notice that without providing an IP to bind to, the server is only accessible from <IP_ADDRESS>

i tried the -H argument, it doesn't help. did you mean <IP_ADDRESS> instead of <IP_ADDRESS>? im perfectly fine with my local IP being the one being listened to.
running a script with sudo is no option for me (sadly) and shouldn't be a reasonable fix on this honestly.

After starting the script try to curl <IP_ADDRESS>:port and see what happens

Your startup command should look like:
python2.7 runserver.py -H "<IP_ADDRESS>"-P 63436
sudo is not required

run the script with
python2.7 runserver.py -H "<IP_ADDRESS>" -P 63436
another shell for curl:
[foo@bar ~]$ curl <IP_ADDRESS>:63436
curl: (7) couldn't connect to host
[foo@bar ~]$ curl <IP_ADDRESS>:63436
curl: (7) couldn't connect to host

maybe i missed something. but why don't i get any info on what i messed up?

I had the exact same problem. (Similar system, also running on uberspace :) ).
I dug a little into it and found out where it freezes. It's when it loads the encrypt lib ( https://github.com/favll/pogom/blob/master/pogom/pgoapi/rpc_api.py#L85 ).
Since PokemonGo-Map works, I looked what they do different. They have an extra library file for centos, so you don't need the newer glibc.
So to get pogom running on CentOS you need to grap https://github.com/PokemonGoMap/PokemonGo-Map/blob/develop/pogom/libencrypt/libencrypt-centos-x86-64.so?raw=true , put in into the lib dir and edit utils.py so it loads the right lib:
diff --git a/pogom/utils.py b/pogom/utils.py
index 7afafaa..12bba78 100644
--- a/pogom/utils.py
+++ b/pogom/utils.py
@@ -63,7 +63,9 @@ def get_encryption_lib_path():
         lib_path = os.path.join(lib_folder_path, "libencrypt-linux-arm-32.so")

     elif sys.platform.startswith('linux'):
-        if platform.architecture()[0] == '64bit':
+        if platform.dist()[0] == "centos":
+            lib_path = os.path.join(lib_folder_path, "libencrypt-centos-x86-64.so")
+        elif platform.architecture()[0] == '64bit':
             lib_path = os.path.join(lib_folder_path, "libencrypt-linux-x86-64.so")
         else:

Maybe someone could put this in a PR.

You need to change -H to your local IP of the computer you are hosting it from.
ex. python2.7 runserver.py -H "<IP_ADDRESS>" -P 63436


Lighthouse improvements

I believe that these improvements are trivial to implement and can improve SEO.

Add a meta tag
Change the link color
Add button descriptions
"Links do not have descriptive text"
I believe this is low priority, but is important in the long run.

har har har h har har

These can wait until after #44 is completed, as it would be redundant to do them twice.


sync-content export taxonomy error

Brief bug description
When running sync-content export we are getting mapping error. The error happens only for some taxonomies. We couldn't identify the pattern. The error message below.
Error: Failed to map value of element 'taxonomy_codename' of type 'taxonomy'. Value: [{"id":"5b481c9d-8c4d-4a56-bfe6-f84c2b96a736"}]. Message: Cannot read properties of undefined (reading 'id')
at getValueToStoreFromElement (file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:96:19)
at file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:65:24
at Array.reduce ()
at getMigrationElements (file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:61:14)
at file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:25:31
at Array.map ()
at mapToMigrationItem (file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:23:43)
at file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:9:56
at Array.map ()
at getMigrationItems (file:///C:/Users/myusername/AppData/Local/npm-cache/_npx/05fa19e8fffd21ea/node_modules/@kontent-ai/migration-toolkit/dist/es2022/export/export-manager.js:9:36)
Test environment

Platform/OS: Win10
Version1.3.0

Hi @petrji , thank you for letting us know! There was indeed a problem with mapping of taxonomy elements. I've fixed that and released an update (v 1.4.0), but you might need to wait a bit until this is merged do the data-ops unless you want to use this library directly.


Turning off tab completions does not turn off the tab completions when editor.sugest.snippetsPreventQuickSuggestions setting to be true

#114427
I think this can be better user experience that only move cursor to next position when press tab . Insert suggestion when press enter.

Sorry but we cannot change this anymore. I do understand the frustration and confusion but you have to understand that there are many users that want the exact opposite of this, namely suggestions off. "On by default" breaks snippet interactions, like tab for next place holder, and therefore the default is off


Tenant object is not iterable

Environment

Python version: 3.6.6
NetBox version:  2.4.4

Steps to Reproduce

Post to /api/ipam/ip-addresses/
JSON:

{
	"family":4,
	"address":"<IP_ADDRESS>/21",
	"tenant": 1
}

Expected Behavior
I expected the IP to be created assigning the tenant correctly.
Observed Behavior
I received a server error:
The complete exception is provided below:
<class 'TypeError'>
'Tenant' object is not iterable

I'm not able to reproduce this behavior on v2.4.6; the IP address is created with the tenant assignment as expected. Please upgrade to v2.4.6 and try again.

I tried the POST again after updating to 2.4.6 and same behavior.  Am I submitting the right JSON to associate our Tenant to this IP?

That update worked!  Thanks for helping out.  I can now add the tenant to an IP.
Nate
From: Jeremy Stretch<EMAIL_ADDRESS>Sent: Friday, November 2, 2018 3:09 PM
To: digitalocean/netbox<EMAIL_ADDRESS>Cc: ntengler<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [digitalocean/netbox] Tenant object is not iterable (#2527)
It sounds like you might have an incorrect version of Django REST Framework installed. You can check by running pip freeze | grep djangorestframework; it should be 3.8.1.
You can install the supported versions of all dependencies by running pip install -r requirements.txt.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/digitalocean/netbox/issues/2527#issuecomment-435482731 , or mute the thread https://github.com/notifications/unsubscribe-auth/AqObrMI8Z7UWU-tNrpeK6b3CrO3rSjXTks5urKZogaJpZM4XvPSY .  https://github.com/notifications/beacon/AqObrG-rlmLXe6pTB75dHGmLOtU5DX96ks5urKZogaJpZM4XvPSY.gif

Just hit this as well, but with TypeError: 'Interface' object is not iterable
This comment is mostly for future searchers:  if you get any sort of "not iterable" error, there's a good chance you have the wrong djangorestframework, and it has to be precisely 3.8.1.  If you install 3.8.2, everything breaks.


Fix test failure due to typo in resource filename

onBuildDeeplink_whenNoNicknameOrAddressProvided_shouldNotHaveNicknameAndAddress test was failing in RequestDeeplinkTest class due to FileNotFoundException
All tests are running after renaming the no_nickname_or_Address filename to no_nickname_or_address

lgtm

@hzsweers @itstexter Does Uber accept contributions through GitHub? I see that all Uber GitHub repositories are very low on traffic regarding input from Uber developers.

Sorry for the delay on this! Totally lost track of it.
Thanks so much for the catch!  For some reason that test is passing for me, I'll have to be more careful on getting these passing in different environments.
@mnemonicflow if you could sign our Uber CLA I can go ahead and get this merged!

@itstexter I have signed the Uber CLA.
If you are on Windows and using the NTFS filesystem then the reason may be this: The filesystem is case sensitive due to POSIX compliance, but the operating system does not support file names that only differ by case sensitivity, however it is possible to create those files with lower level system calls
On UNIX systems (GNU/Linux, Mac OS, FreeBSD, etc.) the filesystems are usually case sensitive.
See http://superuser.com/a/364062
The file read by the test is referenced with an all lowercase name:
sdk/src/test/java/com/uber/sdk/android/rides/RequestDeeplinkTest.java
138:        String expectedUri = readUriResourceWithUserAgentParam("src/test/resources/deeplinkuris/no_nickname_or_address",

However on the filesystem the file is actually named with an uppercase "A": src/test/resources/deeplinkuris/no_nickname_or_Address , this means that on:

Windows: test will run successfully, because the JVM that runs the code and which internally makes Win32 syscalls to actually access the file doesn't differentiate between file's case sensitivity.
UNIX systems: test will fail

Thanks so much @mnemonicflow !


Fix jumping

If I pushed a view onto the navigation stack and popped back to the table view it would have the incorrect offset and need to scroll to adjust correctly.  Removing the bounds change didn't seem to negatively effect anything and fixed my issue.  I'm not 100% sure about all cases here but thought a PR to look at would at the very least be interesting.

Why did this commit is not merged to 1.1.0 release version?

@buithuyen it was closed by the author, so probably was missing some edge cases

Yup, hope that you will release it soon


Hinting stops after writing facebook message

In a normal facebook tab after I write (and send) a message to someone ctrl + f stops hinting.

Ok, sorry for the brief description. Facebook chat responds before vimari responds. I.e. after you send a message Vimari is expecting me to press esc, followed by ctrl+f to start hinting again. Meaning that first Facebook will intercept my esc, closing my chat tab, followed by vimari catching my esc. So if I want to do anything in Facebook (after I chat) I need to close the chat tab and press esc again.
It would be nice to have an option (in the preferences menu) where vimari could intercept the keys before the page does, or have ctrl + j mapped as global esc.
Please close this issue if it's not relevant.

Closing due to inactivity, re-open if you're still having these problems.


cKDTree not indexing properly for arrays with too many elements

Please forgive my limited understanding of cKDTree--I will articulate the issue as clearly as I can.
I've been having a problem using cKDTree.sparse_distance_matrix on large arrays of points. When my array contains ten points or less, cKDTree accurately indexes the nearest neighbors for every point. Using cKDTree.sparse_distance_matrix, then, produces an array with the distance between each pair of neighboring points AND the reciprocal pair (e.g. the distance from (1, 1) to (2, 2) AND the identical distance from (2, 2) to (1, 1) are both indexed). Thus, the distance matrix is the same as its transpose.
Input:
import numpy as np
from scipy.spatial import cKDTree

#Randomly generated array of points for demonstration
just_fine = np.array(np.random.randn(10, 2), dtype = int)

tree = cKDTree(just_fine)
D1 = tree.sparse_distance_matrix(tree, 3)

print np.array(D1.todense(), dtype = int)
print np.array(D1.todense().T, dtype = int)

#No difference between D1 and its transpose
print np.array(D1.todense() - D1.todense().T, dtype = int)

Output:
[[0 0 2 2 2 2 2 2 2 2]
 [0 0 1 1 1 1 1 1 1 1]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 2 2 2 0 1 2 2 2]
 [2 1 1 1 1 1 0 1 1 1]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]]

[[0 0 2 2 2 2 2 2 2 2]
 [0 0 1 1 1 1 1 1 1 1]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 2 2 2 0 1 2 2 2]
 [2 1 1 1 1 1 0 1 1 1]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]
 [2 1 0 0 0 2 1 0 0 0]]

[[0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0 0]]

However, when I augment the array so that it contains 11 or more points, reciprocal pairs are NOT always indexed. A distance matrix for the set of points, therefore, is NOT the same as its transpose.
Input:
too_many = np.array(np.random.randn(11, 2), dtype = int)

tree = cKDTree(too_many)
D2 = tree.sparse_distance_matrix(tree, 3)

print np.array(D2.todense(), dtype = int)
print np.array(D2.todense().T, dtype = int)

#Highlighting discrepancy between D2 and its transpose
print np.array(D2.todense() - D2.todense().T, dtype = int)

Output:
[[0 1 2 0 0 1 0 0 0 0 0]
 [1 0 2 1 0 1 1 0 1 1 1]
 [2 2 0 2 0 3 2 0 2 2 2]
 [0 1 2 0 0 1 0 0 0 0 0]
 [2 0 0 2 0 2 2 1 2 2 2]
 [1 1 3 1 0 0 1 0 1 1 1]
 [0 1 2 0 0 1 0 0 0 0 0]
 [1 2 2 1 1 1 1 0 1 1 1]
 [0 1 2 0 0 1 0 0 0 0 0]
 [0 1 2 0 0 1 0 0 0 0 0]
 [0 1 2 0 0 1 0 0 0 0 0]]

[[0 1 2 0 2 1 0 1 0 0 0]
 [1 0 2 1 0 1 1 2 1 1 1]
 [2 2 0 2 0 3 2 2 2 2 2]
 [0 1 2 0 2 1 0 1 0 0 0]
 [0 0 0 0 0 0 0 1 0 0 0]
 [1 1 3 1 2 0 1 1 1 1 1]
 [0 1 2 0 2 1 0 1 0 0 0]
 [0 0 0 0 1 0 0 0 0 0 0]
 [0 1 2 0 2 1 0 1 0 0 0]
 [0 1 2 0 2 1 0 1 0 0 0]
 [0 1 2 0 2 1 0 1 0 0 0]]

[[ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 0  0  0  0  0  0  0 -2  0  0  0]
 [ 0  0  0  0  0  0  0 -2  0  0  0]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 2  0  0  2  0  2  2  0  2  2  2]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 1  2  2  1  0  1  1  0  1  1  1]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]
 [ 0  0  0  0 -2  0  0 -1  0  0  0]]

I'm attributing the discrepancy to a bug in cKDTree. There doesn't seem to be any clear pattern to which reciprocal pairs are omitted in the indexing. The error does not occur when I substitute KDTree for cKDTree.

I can reproduce this with scipy 0.15.1, but it works fine with a build of a recent copy of master.  Does anyone recognize this problem, and perhaps know which change fixed it?

Not sure exactly, but probably fixed by one of @sturlamolden's PRs to rewrite cKDTree in C++.

Indeed fixed in master, so closing.

I guess we should add a regression test for this to the test suite so it does not accidentally show up again.

I am not sure why it appears fixed in master, I did not do anything to correct it, but please reopen. There is a severe logic error in Pat Varilly's Cython code causing this. I have not noticed it before now. It uses the logic from count_pairs, but it should not because sparse_distance_matrix works on two separate kd-trees. @aarchiba 's code in KDTree is the correct one. Compare with that. I will squash this bug promptly. Please tag it as a critical defect.

ping @rgommers

@sturlamolden: I haven't looked into the bug, but I'll take your word for it that the issue should be reopened.

It is an easy fix BTW. I will post a PR later today.

The bug is still in master but harder to tickle. You should be able to reproduce it if you construct the cKDTree object with keyword arguments balanced_tree=False and compact_nodes=False.

Oh yes, and I know where it it, why it happens and what to do about it, so it goes away very soon :)

And it went below the test suite's radar because it only happens when sparse_distance_matrix is called with the same cKDTree instance as argument.

This proves it is still present in master.
def test_against_logic_error_regression():
    # regression test for gh-5077 logic error
    np.random.seed(0)
    too_many = np.array(np.random.randn(18, 2), dtype=int)
    tree = cKDTree(too_many, balanced_tree=False, compact_nodes=False)
    d = tree.sparse_distance_matrix(tree, 3).todense()
    assert_array_almost_equal(d, d.T, decimal=14)

This code proves that the problem is still i master but fixed in the PR (added to the test suite).
np.random.seed(0)
too_many = np.array(np.random.randn(18, 2), dtype=int)
tree = cKDTree(too_many, balanced_tree=False, compact_nodes=False)
d = tree.sparse_distance_matrix(tree, 3).todense()
assert_array_almost_equal(d, d.T, decimal=14)

This issue can be closed when #5088 is pulled to master and 0.16.x.

fixed in gh-5088, closing


TOC sub level does not have link to page

Table of Contents:
only the first-level menu item actually has a hyperlink to the page, the sub-levels do not - is that a bug or by design?
If it's not possible to hyperlink the sub-sections, then I'm not sure it makes much sense to have them listed in the TOC at all - it takes up 3 pages of the manual, has no page numbers nor links, so maybe better to only have the top level in the TOC

In case its helpful to anyone in the interim:
mr-pdf appears to find and remove elements matching the --excludeSelectors flag after inserting the PDF table of contents. So, in the interim while awaiting or proposing a fix, you can provide selectors that remove the broken entries based on the pattern used to create those entries. You might need to crawl the source if it changes, but the class names are currently toc-item-1, toc-item-2, and toc-item-3 for h1, h2, and h3 respectively.
npx mr-pdf --initialDocURLs="http://my-site/my-first-doc-page" --excludeSelectors=".pdf--hidden,.toc-item-3"

https://github.com/kohheepeace/mr-pdf/blob/master/src/utils.ts#L235
if (header.match(/id( )*=( )*"\S*"/g)) {
   return header.replace(/id( )*=( )*"\S*"/g, `id="${headerId}"`);
}

这里改一下可以修复


fix: button: move three more button palettes to global css vars

SUMMARY:

Moves NeutralButton, SystemUIButton and TwoStateButton color palettes to global CSS variables
Moves split divider colors to global CSS variables

https://user-images.githubusercontent.com/99700808/231304214-996c0226-90f6-4ace-a0d6-451c427473fe.mp4
JIRA TASK (Eightfold Employees Only):
ENG-49421
CHANGE TYPE:

[X] Bugfix Pull Request
[ ] Feature Pull Request

TEST COVERAGE:

[X] Tests for this change already exist
[ ] I have added unittests for this change

TEST PLAN:
Pull the PR branch and run yarn and yarn storybook. Verify the Button stories behave as expected.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@32682a6). Click here to learn what that means.
Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #593   +/-   ##
=======================================
  Coverage        ?   84.90%
=======================================
  Files           ?      793
  Lines           ?    17193
  Branches        ?     6059
=======================================
  Hits            ?    14597
  Misses          ?     2530
  Partials        ?       66

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Unable to open the file 'This is  bolded' in blob container

Repro Steps:

Open one blob container and rename one blob as 'This is  bolded' in Storage Explorer.
Open the renamed blob in VS Code.

Expect:
The blob file can be opened successfully.
Actual:
Unable to open the blob.

Won't fix.  Use storage explorer.


generate 0 when encode Snowflake ids

https://github.com/sschiau/Particle.php
$id = nextId();
$hashids = new Hashids();
$numArr =  str_split((string)$id);
$nid = $hashids->encode($numArr);`

my mistake.
generate string

Is this a question? Please provide a more detailed description.

Closing due to inactivity.


[Feature Request]: Enhancing Plan a trip page

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
The tabs in the nav bar do not direct to the respective pages. I would like to make changes to make sure they are navigating to the correct pages.
Also in the trip suggestion section the cards move even if there are no further cards containing information. Changing them such that navigation stops after it reaches the last suggestion card would look good.
Use Case
Improves user experience and easy navigation through the application.
Benefits
No response
Add ScreenShots

Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[ ] I'm a VSOC'24 contributor
[X] I have starred the repository

Please add the tags: hacktoberfest-accepted, hacktoberfest, gssoc-ext

Kindly assign me this task under Hacktoberfest2024, Thanku.


RJ45 Pinout

Hi, thanks for your work! I own a Homevent FR251 with TopTronic E. Can you add the pinout of the RJ45 CAN connector to the readme? I am not sure if GND is on Pin 3, 7 or both. Thanks!

Hello,
the pinout of the  RJ45 CAN connector is the following:
1 - CAN-High
2 - CAN-Low
7 - GND
Hope this helps. In a few weaks I want to release a better tested and improved version of the CAN Gateway, there the README will be updated, too.
Have fun.


More human readable?

Possible today/tomorrow labels?

What exactly?

I think this is asking a new option to make the centered boxes show «Today» instead of «Sunday 19 Nov».


Flutter Web  And HTML 5

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Use case
I am currently using a comprehensive framework, one set of HTML5 code, one set of flutter web code, I want to take the data in HTML5, such as maybe a js object, can I pass it to my flutter web, how should I pass it, how should I receive it? I have read that there is officially a dart: js, but I was wondering if they support data communication between them
Proposal
I am currently using a comprehensive framework, one set of HTML5 code, one set of flutter web code, I want to take the data in HTML5, such as maybe a js object, can I pass it to my flutter web, how should I pass it, how should I receive it? I have read that there is officially a dart: js, but I was wondering if they support data communication between them

what should i do

Hi @CooolWolf.
Can you check out https://liewjuntung.medium.com/use-javascript-in-flutter-web-a6eed3efb9a0 to see if it helps?

Hi @CooolWolf. Can you check out https://liewjuntung.medium.com/use-javascript-in-flutter-web-a6eed3efb9a0 to see if it helps?

I know this approach, but what worries me more is, how should my flutter web project be integrated into H5, like npm way? flutter web bundling as a native file? Or another way, currently I start two web services, one H5, one Flutter web, and then I import Flutter web from H5 via iframe, which is essentially two services, can they become one service, or can I make H5 depend on my Flutter Web

Thanks for your response.
It seems your question is best suited for support channels like StackOverflow, please ask the same there for solutions if any. Please also see flutterhelp for resources as well and asking questions like this.
Closing from here as this is more of a how-to question rather than a bug or feature request.
If you are proposing a change, please use the appropriate new issue template and fill out the requested details so that we can address this issue properly.
Thank you!


400 (Bad Request) Error when adding custom background.

When I was making a Video, I wanted to add custom assets to it to make it better, But When I attempt to add more than 2 custom assets, It doesn't work and I cannot add it to the scene whereas I can only add these to 2 or 3 scenes about 25% of the time. Why is this happening? Is there a limit on how many custom assets I can add, or is this a bug with the file types? I can occasionally add more custom assets in which I can only add two more each day before the error comes back. This error occurs with png files , jpg files and gif files and looking deeper into the http requests, the upload request said invalid file type right off the bat when I looked at the requests on the network side of inspect element. I opened the link to the localhosts directory and this error ended up being a 404 Not Found Error because It Failed to upload the file to the directory with a valid file type being mistaken as invalid. I'm beyond frustrated. Any help will be appreciated.

I Got it to Work, It was Apparent that You cannot change the file extensions when importing the image to the scenes. For example if it's WEBP, you cannot change it to png, Because the platform will think that the request is corrupted and stop the upload. So I now realized that if the file is going to be an unsupported type to begin with, I cannot simply change the extension like I would with a photo Editor and I consider this to be resolved, but this should be updated to fix those errors with file extensions.

I Fixed it, it looks like I can't change the file extension on an image that's unsupported and thank god for some of my knowledge from coding classes in school. I was thinking about the extension being right but maybe the request was unable to be completed  due to changing the file extension on the image and that change being unable to be verified. I consider this issue to be resolved now that I know that bug that comes with this program.


Conflict with Chrome build-in datepicker

Since recent (I am using 20.0.1132.43 m),  chrome will have a build-in datepicker for . https://plus.google.com/102860501900098846931/posts/hTcMLVNKnec
However, it cause duplicated with "bootstrap-datepicker".
bootstrap-datepicker should auto-detect and disable either and keep one active.

Confirming the comment by SlashmanX. Of these suggestions, the use of Modernizr or changing the input element type to text are the ones that work. Merely suppressing the built-in style on Chrome doesn't fix the issue of the input conflict.

Is there any solution to this yet? I've tried setting the input to text and have also tried with Modernizr, but neither works... I even tried disabling the native chrome datepicker.
Firefox works fine, though!

On Sun, Aug 23, 2015 at 7:19 PM, Richard<EMAIL_ADDRESS>wrote:

Firefox works fine, though!

firefox doesn't support date as an input an falls back to type="text"

I am using type="text", but validation fails. It seems to default to the American date format, despite specifying a UK date format. Any ideas?