after_merge
stringlengths
28
79.6k
before_merge
stringlengths
20
79.6k
url
stringlengths
38
71
full_traceback
stringlengths
43
922k
traceback_type
stringclasses
555 values
def begin_epoch(self, epoch): """Called at the beginning of each epoch.""" logger.info("begin training epoch {}".format(epoch)) self.lr_step_begin_epoch(epoch) if self.quantizer is not None: self.quantizer.begin_epoch(epoch) # task specific setup per epoch self.task.begin_epoch(epoch,...
def begin_epoch(self, epoch): """Called at the beginning of each epoch.""" logger.info("begin training epoch {}".format(epoch)) if self.quantizer is not None: self.quantizer.begin_epoch(epoch) # task specific setup per epoch self.task.begin_epoch(epoch, self.get_model()) if self.tpu: ...
https://github.com/pytorch/fairseq/issues/2811
Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/torch/multiprocessing/spawn.py", line 20, in _wrap fn(i, *args) File "/workspace/fairseq/fairseq/distributed_utils.py", line 283, in distributed_main main(cfg, **kwargs) File "/workspace/fairseq/fairseq_cli/train.py", line 124, in main vali...
AttributeError
def zero_grad(self): """Clears the gradients of all optimized parameters.""" for p in self.fp16_params: p.grad = None if self.has_flat_params: if torch.is_tensor(self.fp32_params): self.fp32_params.grad.zero_() elif isinstance(self.fp32_params, dict): for fp32...
def zero_grad(self): """Clears the gradients of all optimized parameters.""" for p in self.fp16_params: p.grad = None if self.has_flat_params: if torch.is_tensor(self.fp32_params): self.fp32_params.grad.zero_() elif isinstance(self.fp32_params, dict): for fp32...
https://github.com/pytorch/fairseq/issues/2811
Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/torch/multiprocessing/spawn.py", line 20, in _wrap fn(i, *args) File "/workspace/fairseq/fairseq/distributed_utils.py", line 283, in distributed_main main(cfg, **kwargs) File "/workspace/fairseq/fairseq_cli/train.py", line 124, in main vali...
AttributeError
def main(): parser = argparse.ArgumentParser() parser.add_argument("tsv") parser.add_argument("--output-dir", required=True) parser.add_argument("--output-name", required=True) args = parser.parse_args() os.makedirs(args.output_dir, exist_ok=True) transcriptions = {} with ( op...
def main(): parser = argparse.ArgumentParser() parser.add_argument("tsv") parser.add_argument("--output-dir", required=True) parser.add_argument("--output-name", required=True) args = parser.parse_args() os.makedirs(args.output_dir, exist_ok=True) transcriptions = {} with ( op...
https://github.com/pytorch/fairseq/issues/2744
Traceback (most recent call last): File "libri_labels.py", line 56, in <module> main() File "libri_labels.py", line 37, in main trans_path = f"{parts[-2]}-{parts[-1]}.trans.txt" IndexError: list index out of range
IndexError
def forward( self, prev_output_tokens, encoder_out: Optional[EncoderOut] = None, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] = None, features_only: bool = False, full_context_alignment: bool = False, alignment_layer: Optional[int] = None, alignment_heads: Optional...
def forward( self, prev_output_tokens, encoder_out: Optional[EncoderOut] = None, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] = None, features_only: bool = False, alignment_layer: Optional[int] = None, alignment_heads: Optional[int] = None, src_lengths: Optional[An...
https://github.com/pytorch/fairseq/issues/2673
Traceback (most recent call last): File ".../bin/fairseq-train", line 11, in <module> load_entry_point('fairseq', 'console_scripts', 'fairseq-train')() File ".../fairseq_cli/train.py", line 351, in cli_main distributed_utils.call_main(args, main) File ".../fairseq/distributed_utils.py", line 254, in call_main main(args...
TypeError
def add_args(parser): # fmt: off super(TransformerAlignModel, TransformerAlignModel).add_args(parser) parser.add_argument('--alignment-heads', type=int, metavar='D', help='Number of cross attention heads per layer to supervised with alignments') parser.add_argument('--alignme...
def add_args(parser): # fmt: off super(TransformerAlignModel, TransformerAlignModel).add_args(parser) parser.add_argument('--alignment-heads', type=int, metavar='D', help='Number of cross attention heads per layer to supervised with alignments') parser.add_argument('--alignme...
https://github.com/pytorch/fairseq/issues/2673
Traceback (most recent call last): File ".../bin/fairseq-train", line 11, in <module> load_entry_point('fairseq', 'console_scripts', 'fairseq-train')() File ".../fairseq_cli/train.py", line 351, in cli_main distributed_utils.call_main(args, main) File ".../fairseq/distributed_utils.py", line 254, in call_main main(args...
TypeError
def forward_align(self, src_tokens, src_lengths, prev_output_tokens): avg_attn = None for model in self.models: decoder_out = model(src_tokens, src_lengths, prev_output_tokens) attn = decoder_out[1]["attn"][0] if avg_attn is None: avg_attn = attn else: avg...
def forward_align(self, src_tokens, src_lengths, prev_output_tokens): avg_attn = None for model in self.models: decoder_out = model(src_tokens, src_lengths, prev_output_tokens) attn = decoder_out[1]["attn"] if avg_attn is None: avg_attn = attn else: avg_at...
https://github.com/pytorch/fairseq/issues/2673
Traceback (most recent call last): File ".../bin/fairseq-train", line 11, in <module> load_entry_point('fairseq', 'console_scripts', 'fairseq-train')() File ".../fairseq_cli/train.py", line 351, in cli_main distributed_utils.call_main(args, main) File ".../fairseq/distributed_utils.py", line 254, in call_main main(args...
TypeError
def add_args(parser): """Add model-specific arguments to the parser.""" # fmt: off parser.add_argument('--activation-fn', choices=utils.get_available_activation_fns(), help='activation function to use') parser.add_argument('--dropout', type=float, ...
def add_args(parser): """Add model-specific arguments to the parser.""" # fmt: off parser.add_argument('--activation-fn', choices=utils.get_available_activation_fns(), help='activation function to use') parser.add_argument('--dropout', type=float, ...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def __init__(self, args, dictionary, embed_tokens): super().__init__(dictionary) self.register_buffer("version", torch.Tensor([3])) self.dropout = args.dropout self.encoder_layerdrop = args.encoder_layerdrop embed_dim = embed_tokens.embedding_dim self.padding_idx = embed_tokens.padding_idx ...
def __init__(self, args, dictionary, embed_tokens): super().__init__(dictionary) self.register_buffer("version", torch.Tensor([3])) self.dropout = args.dropout self.encoder_layerdrop = args.encoder_layerdrop embed_dim = embed_tokens.embedding_dim self.padding_idx = embed_tokens.padding_idx ...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def forward( self, src_tokens, src_lengths, cls_input: Optional[Tensor] = None, return_all_hiddens: bool = False, ): """ Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` src_lengths (torch.LongTensor): lengths of each source...
def forward( self, src_tokens, src_lengths, cls_input: Optional[Tensor] = None, return_all_hiddens: bool = False, ): """ Args: src_tokens (LongTensor): tokens in the source language of shape `(batch, src_len)` src_lengths (torch.LongTensor): lengths of each source...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def __init__(self, args, dictionary, embed_tokens, no_encoder_attn=False): self.args = args super().__init__(dictionary) self.register_buffer("version", torch.Tensor([3])) self._future_mask = torch.empty(0) self.dropout = args.dropout self.decoder_layerdrop = args.decoder_layerdrop self.sha...
def __init__(self, args, dictionary, embed_tokens, no_encoder_attn=False): self.args = args super().__init__(dictionary) self.register_buffer("version", torch.Tensor([3])) self._future_mask = torch.empty(0) self.dropout = args.dropout self.decoder_layerdrop = args.decoder_layerdrop self.sha...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def extract_features( self, prev_output_tokens, encoder_out: Optional[EncoderOut] = None, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] = None, full_context_alignment: bool = False, alignment_layer: Optional[int] = None, alignment_heads: Optional[int] = None, ): """...
def extract_features( self, prev_output_tokens, encoder_out: Optional[EncoderOut] = None, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] = None, full_context_alignment: bool = False, alignment_layer: Optional[int] = None, alignment_heads: Optional[int] = None, ): """...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def base_architecture(args): args.encoder_embed_path = getattr(args, "encoder_embed_path", None) args.encoder_embed_dim = getattr(args, "encoder_embed_dim", 512) args.encoder_ffn_embed_dim = getattr(args, "encoder_ffn_embed_dim", 2048) args.encoder_layers = getattr(args, "encoder_layers", 6) args.en...
def base_architecture(args): args.encoder_embed_path = getattr(args, "encoder_embed_path", None) args.encoder_embed_dim = getattr(args, "encoder_embed_dim", 512) args.encoder_ffn_embed_dim = getattr(args, "encoder_ffn_embed_dim", 2048) args.encoder_layers = getattr(args, "encoder_layers", 6) args.en...
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def build_model(cls, args, task): """Build a new model instance.""" # make sure all arguments are present in older models base_architecture(args) if args.encoder_layers_to_keep: args.encoder_layers = len(args.encoder_layers_to_keep.split(",")) if args.decoder_layers_to_keep: args.d...
def build_model(cls, args, task): # set any default arguments transformer_align(args) transformer_model = TransformerModel.build_model(args, task) return TransformerAlignModel( transformer_model.encoder, transformer_model.decoder, args )
https://github.com/pytorch/fairseq/issues/2079
bash train1.sh 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:14321 2020-04-29 21:50:54 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:14321 2020-04-29 21:50:55 | INFO | fairseq.distributed_utils | initialized host zixi-MS-7B79 as ran...
IndexError
def forward(self, x): with torch.cuda.device(x.device): return super().forward(x)
def forward(self, x): return super().forward(x)
https://github.com/pytorch/fairseq/issues/1860
Using cache found in /home/vlad/.cache/torch/hub/pytorch_fairseq_master Loading codes from /home/vlad/.cache/torch/pytorch_fairseq/0695ef328ddefcb8cbcfabc3196182f59c0e41e0468b10cc0db2ae9c91881fcc.bb1be17de4233e13870bd7d6065bfdb03fca0a51dd0f5d0b7edf5c188eda71f1/bpecodes ... Read 30000 codes from the codes file. Tracebac...
RuntimeError
def _append_prev_key_padding_mask( key_padding_mask: Optional[Tensor], prev_key_padding_mask: Optional[Tensor], batch_size: int, src_len: int, static_kv: bool, ) -> Optional[Tensor]: # saved key padding masks have shape (bsz, seq_len) if prev_key_padding_mask is not None and static_kv: ...
def _append_prev_key_padding_mask( key_padding_mask: Optional[Tensor], prev_key_padding_mask: Optional[Tensor], batch_size: int, src_len: int, static_kv: bool, ) -> Optional[Tensor]: # saved key padding masks have shape (bsz, seq_len) if prev_key_padding_mask is not None and static_kv: ...
https://github.com/pytorch/fairseq/issues/1860
Using cache found in /home/vlad/.cache/torch/hub/pytorch_fairseq_master Loading codes from /home/vlad/.cache/torch/pytorch_fairseq/0695ef328ddefcb8cbcfabc3196182f59c0e41e0468b10cc0db2ae9c91881fcc.bb1be17de4233e13870bd7d6065bfdb03fca0a51dd0f5d0b7edf5c188eda71f1/bpecodes ... Read 30000 codes from the codes file. Tracebac...
RuntimeError
def binarize_with_mask(self, txt, prefix, suffix, leading_space, trailing_space): toks = self.binarize( prefix + leading_space + txt + trailing_space + suffix, append_eos=True, ) mask = torch.zeros_like(toks, dtype=torch.bool) mask_start = len(self.binarize(prefix)) mask_size = len(s...
def binarize_with_mask(self, txt, prefix, suffix, leading_space, trailing_space): toks = self.binarize( prefix + leading_space + txt + trailing_space + suffix, append_eos=True, ) mask = torch.zeros_like(toks, dtype=torch.uint8) mask_start = len(self.binarize(prefix)) mask_size = len(...
https://github.com/pytorch/fairseq/issues/1866
2020-03-19 04:44:55 | INFO | fairseq.distributed_utils | distributed init (rank 0): tcp://localhost:11739 2020-03-19 04:44:55 | INFO | fairseq.distributed_utils | distributed init (rank 1): tcp://localhost:11739 2020-03-19 04:44:55 | INFO | fairseq.distributed_utils | distributed init (rank 2): tcp://localhost:11739 20...
NotImplementedError
def get_perplexity(loss, round=2, base=2): if loss is None: return 0.0 try: return safe_round(base**loss, round) except OverflowError: return float("inf")
def get_perplexity(loss, round=2, base=2): if loss is None: return 0.0 return safe_round(base**loss, round)
https://github.com/pytorch/fairseq/issues/1833
Traceback (most recent call last): File "/SFS/user/wp/prihodad/git/oas-training/data/examples/biophysical_properties/condaenv/bin/fairseq-train", line 11, in <module> load_entry_point('fairseq', 'console_scripts', 'fairseq-train')() File "/SFS/user/wp/prihodad/git/fairseq/fairseq_cli/train.py", line 321, in cli_main ma...
OverflowError
def __init__(self, task, classification_head_name, regression_target): super().__init__(task) self.classification_head_name = classification_head_name self.regression_target = regression_target
def __init__(self, task, classification_head_name): super().__init__(task) self.classification_head_name = classification_head_name
https://github.com/pytorch/fairseq/issues/1802
2020-03-08 13:40:11 | INFO | fairseq_cli.train | model roberta_large, criterion SentencePredictionCriterion 2020-03-08 13:40:11 | INFO | fairseq_cli.train | num. model params: 357499983 (num. trained: 357499983) 2020-03-08 13:40:11 | INFO | fairseq_cli.train | training on 1 GPUs 2020-03-08 13:40:11 | INFO | fairseq_cli...
AttributeError
def forward(self, model, sample, reduce=True): """Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as the denominator for the gradient 3) logging outputs to display while training """ assert ( hasattr(model, "c...
def forward(self, model, sample, reduce=True): """Compute the loss for the given sample. Returns a tuple with three elements: 1) the loss 2) the sample size, which is used as the denominator for the gradient 3) logging outputs to display while training """ assert ( hasattr(model, "c...
https://github.com/pytorch/fairseq/issues/1802
2020-03-08 13:40:11 | INFO | fairseq_cli.train | model roberta_large, criterion SentencePredictionCriterion 2020-03-08 13:40:11 | INFO | fairseq_cli.train | num. model params: 357499983 (num. trained: 357499983) 2020-03-08 13:40:11 | INFO | fairseq_cli.train | training on 1 GPUs 2020-03-08 13:40:11 | INFO | fairseq_cli...
AttributeError
def __init__(self, args, tgt_dict): super().__init__(args, tgt_dict) self.unit_lm = getattr(args, "unit_lm", False) self.lexicon = load_words(args.lexicon) if args.lexicon else None self.idx_to_wrd = {} checkpoint = torch.load(args.kenlm_model, map_location="cpu") if "cfg" in checkpoint and ...
def __init__(self, args, tgt_dict): super().__init__(args, tgt_dict) self.unit_lm = getattr(args, "unit_lm", False) self.lexicon = load_words(args.lexicon) if args.lexicon else None self.idx_to_wrd = {} checkpoint = torch.load(args.kenlm_model, map_location="cpu") if "cfg" in checkpoint and ...
https://github.com/pytorch/fairseq/issues/1617
Traceback (most recent call last): File "attention_layers.py", line 80, in <module> tokens = roberta.encode(' '.join(list(s))) File "/home/jmorton/software/fairseq/fairseq/models/roberta/hub_interface.py", line 57, in encode bpe_sentence = '<s> ' + self.bpe.encode(sentence) + ' </s>' File "/home/jmorton/software/fairse...
KeyError
def collater(self, samples): samples = self.dataset.collater(samples) if self.new_src_eos is not None: if self.dataset.left_pad_source: assert ( samples["net_input"]["src_tokens"][:, -1] != self.src_eos ).sum() == 0 samples["net_input"]["src_tokens"][...
def collater(self, samples): samples = self.dataset.collater(samples) # TODO: support different padding direction if self.new_src_eos is not None: assert (samples["net_input"]["src_tokens"][:, -1] != self.src_eos).sum() == 0 samples["net_input"]["src_tokens"][:, -1] = self.new_src_eos ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def load_state_dict(self, state_dict, strict=True, args=None): state_dict_subset = state_dict.copy() for k, _ in state_dict.items(): assert k.startswith("models.") lang_pair = k.split(".")[1] if lang_pair not in self.models: del state_dict_subset[k] super().load_state_dic...
def load_state_dict(self, state_dict, strict=True): state_dict_subset = state_dict.copy() for k, _ in state_dict.items(): assert k.startswith("models.") lang_pair = k.split(".")[1] if lang_pair not in self.models: del state_dict_subset[k] super().load_state_dict(state_dic...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def prepare(cls, args, **kargs): args.left_pad_source = options.eval_bool(args.left_pad_source) args.left_pad_target = options.eval_bool(args.left_pad_target) if args.lang_pairs is None: raise ValueError( "--lang-pairs is required. List all the language pairs in the training objective."...
def prepare(cls, args, **kargs): args.left_pad_source = options.eval_bool(args.left_pad_source) args.left_pad_target = options.eval_bool(args.left_pad_target) if args.lang_pairs is None: raise ValueError( "--lang-pairs is required. List all the language pairs in the training objective."...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def _match_types(arg1, arg2): """Convert the numerical argument to the same type as the other argument""" def upgrade(arg_number, arg_structure): if isinstance(arg_structure, tuple): return (arg_number, arg_number) elif isinstance(arg_structure, dict): arg = copy.deepcop...
def _match_types(arg1, arg2): if (isinstance(arg1, float) or isinstance(arg1, int)) and isinstance(arg2, tuple): arg1_tuple = (arg1, arg1) return arg1_tuple, arg2 if (isinstance(arg2, float) or isinstance(arg2, int)) and isinstance(arg1, tuple): arg2_tuple = (arg2, arg2) return a...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def hydra_init(cfg_name="config") -> None: cs = ConfigStore.instance() cs.store(name=cfg_name, node=FairseqConfig) for k in FairseqConfig.__dataclass_fields__: v = FairseqConfig.__dataclass_fields__[k].default try: cs.store(name=k, node=v) except BaseException: ...
def hydra_init() -> None: cs = ConfigStore.instance() for k in FairseqConfig.__dataclass_fields__: v = FairseqConfig.__dataclass_fields__[k].default try: cs.store(name=k, node=v) except BaseException: logger.error(f"{k} - {v}") raise register_mod...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def _override_attr( sub_node: str, data_class: Type[FairseqDataclass], args: Namespace ) -> List[str]: overrides = [] if not inspect.isclass(data_class) or not issubclass(data_class, FairseqDataclass): return overrides def get_default(f): if not isinstance(f.default_factory, _MISSING_T...
def _override_attr( sub_node: str, data_class: Type[FairseqDataclass], args: Namespace ) -> List[str]: overrides = [] def get_default(f): if not isinstance(f.default_factory, _MISSING_TYPE): return f.default_factory() return f.default for k, v in data_class.__dataclass_fiel...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def override_module_args(args: Namespace) -> Tuple[List[str], List[str]]: """use the field in args to overrides those in cfg""" overrides = [] deletes = [] for k in FairseqConfig.__dataclass_fields__.keys(): overrides.extend( _override_attr(k, FairseqConfig.__dataclass_fields__[k].t...
def override_module_args(args: Namespace) -> Tuple[List[str], List[str]]: """use the field in args to overrides those in cfg""" overrides = [] deletes = [] for k in FairseqConfig.__dataclass_fields__.keys(): overrides.extend( _override_attr(k, FairseqConfig.__dataclass_fields__[k].t...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def infer_init_method(cfg: DistributedTrainingConfig, force_distributed=False): if cfg.distributed_init_method is not None or cfg.tpu: return if cfg.pipeline_model_parallel: balance_exists = ( cfg.pipeline_balance is not None or cfg.pipeline_encoder_balance is not None ...
def infer_init_method(cfg: DistributedTrainingConfig, force_distributed=False): if cfg.distributed_init_method is not None or cfg.tpu: return if cfg.pipeline_model_parallel: balance_exists = ( cfg.pipeline_balance is not None or cfg.pipeline_encoder_balance is not None ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def build_model(cfg: DictConfig, task): model = None model_type = getattr(cfg, "_name", None) or getattr(cfg, "arch", None) if not model_type and len(cfg) == 1: # this is hit if config object is nested in directory that is named after model type model_type = next(iter(cfg)) if mode...
def build_model(cfg: DictConfig, task): if isinstance(cfg, DictConfig): return ARCH_MODEL_REGISTRY[cfg._name].build_model(cfg, task) return ARCH_MODEL_REGISTRY[cfg.arch].build_model(cfg, task)
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def zero_grad(self): """Clears the gradients of all optimized parameters.""" for p in self.fp16_params: p.grad = None if self.has_flat_params: if torch.is_tensor(self.fp32_params): self.fp32_params.grad.zero_() elif isinstance(self.fp32_params, dict): for fp32...
def zero_grad(self): """Clears the gradients of all optimized parameters.""" for p in self.fp16_params: p.grad = None if self.has_flat_params: if torch.is_tensor(self.fp32_params): self.fp32_params.grad.zero_() elif isinstance(self.fp32_params, dict): for fp32...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def __init__(self, cfg: DictConfig, fairseq_optimizer): super().__init__(cfg, fairseq_optimizer) if isinstance(cfg.lr, Collection) and len(cfg.lr) > 1: raise ValueError( "Cannot use a fixed learning rate schedule with cosine." f" Consider --lr-scheduler=fixed instead. ({cfg.lr})"...
def __init__(self, cfg: DictConfig, fairseq_optimizer): super().__init__(cfg, fairseq_optimizer) if isinstance(cfg.lr, Collection) and len(cfg.lr) > 1: raise ValueError( "Cannot use a fixed learning rate schedule with cosine." " Consider --lr-scheduler=fixed instead." ) ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def setup_registry(registry_name: str, base_class=None, default=None, required=False): assert registry_name.startswith("--") registry_name = registry_name[2:].replace("-", "_") REGISTRY = {} REGISTRY_CLASS_NAMES = set() DATACLASS_REGISTRY = {} # maintain a registry of all registries if reg...
def setup_registry(registry_name: str, base_class=None, default=None, required=False): assert registry_name.startswith("--") registry_name = registry_name[2:].replace("-", "_") REGISTRY = {} REGISTRY_CLASS_NAMES = set() DATACLASS_REGISTRY = {} # maintain a registry of all registries if reg...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def build_x(cfg: Union[DictConfig, str, Namespace], *extra_args, **extra_kwargs): if isinstance(cfg, DictConfig): choice = cfg._name if choice and choice in DATACLASS_REGISTRY: dc = DATACLASS_REGISTRY[choice] cfg = merge_with_parent(dc(), cfg) elif isinstance(cfg, str): ...
def build_x(cfg: Union[DictConfig, str, Namespace], *extra_args, **extra_kwargs): if isinstance(cfg, DictConfig): choice = cfg._name elif isinstance(cfg, str): choice = cfg if choice in DATACLASS_REGISTRY: cfg = DATACLASS_REGISTRY[choice]() else: choice = getattr(...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def setup_task(cfg: DictConfig, **kwargs): task = None task_name = getattr(cfg, "task", None) if isinstance(task_name, str): # legacy tasks task = TASK_REGISTRY[task_name] else: task_name = getattr(cfg, "_name", None) if task_name and task_name in TASK_DATACLASS_REGISTR...
def setup_task(cfg: DictConfig, **kwargs): if isinstance(cfg, DictConfig): return TASK_REGISTRY[cfg._name].setup_task(cfg, **kwargs) return TASK_REGISTRY[cfg.task].setup_task(cfg, **kwargs)
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def setup_task(cls, args, **kwargs): """Setup the task (e.g., load dictionaries). Args: args (argparse.Namespace): parsed command-line arguments """ dictionary, output_dictionary = cls.setup_dictionary(args, **kwargs) # upgrade old checkpoints if getattr(args, "exclude_self_target", Fa...
def setup_task(cls, args, **kwargs): """Setup the task (e.g., load dictionaries). Args: args (argparse.Namespace): parsed command-line arguments """ dictionary, output_dictionary = cls.setup_dictionary(args, **kwargs) # upgrade old checkpoints if hasattr(args, "exclude_self_target"): ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def main(cfg: DictConfig) -> None: if isinstance(cfg, argparse.Namespace): cfg = convert_namespace_to_omegaconf(cfg) utils.import_user_module(cfg.common) assert cfg.dataset.max_tokens is not None or cfg.dataset.batch_size is not None, ( "Must specify batch size either with --max-tokens or ...
def main(cfg: DictConfig) -> None: if isinstance(cfg, argparse.Namespace): cfg = convert_namespace_to_omegaconf(cfg) utils.import_user_module(cfg.common) assert cfg.dataset.max_tokens is not None or cfg.dataset.batch_size is not None, ( "Must specify batch size either with --max-tokens or ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def should_stop_early(cfg: DictConfig, valid_loss: float) -> bool: # skip check if no validation was done in the current epoch if valid_loss is None: return False if cfg.checkpoint.patience <= 0: return False def is_better(a, b): return a > b if cfg.checkpoint.maximize_best_chec...
def should_stop_early(cfg: DictConfig, valid_loss: float) -> bool: # skip check if no validation was done in the current epoch if valid_loss is None: return False if cfg.checkpoint.patience <= 0: return False def is_better(a, b): return a > b if cfg.checkpoint.maximize_best_chec...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def train( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr ) -> Tuple[List[Optional[float]], bool]: """Train the model for one epoch and return validation losses.""" # Initialize data iterator itr = epoch_itr.next_epoch_itr( fix_batches_to_gpus=cfg.distributed_training.fix_...
def train( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr ) -> Tuple[List[Optional[float]], bool]: """Train the model for one epoch and return validation losses.""" # Initialize data iterator itr = epoch_itr.next_epoch_itr( fix_batches_to_gpus=cfg.distributed_training.fix_...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def validate_and_save( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr, valid_subsets: List[str], end_of_epoch: bool, ) -> Tuple[List[Optional[float]], bool]: num_updates = trainer.get_num_updates() max_update = cfg.optimization.max_update or math.inf do_save = ...
def validate_and_save( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr, valid_subsets: List[str], end_of_epoch: bool, ) -> Tuple[List[Optional[float]], bool]: num_updates = trainer.get_num_updates() max_update = cfg.optimization.max_update or math.inf do_save = ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def validate( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr, subsets: List[str], ) -> List[Optional[float]]: """Evaluate the model on the validation set(s) and return the losses.""" if cfg.dataset.fixed_validation_seed is not None: # set fixed seed for every ...
def validate( cfg: DictConfig, trainer: Trainer, task: tasks.FairseqTask, epoch_itr, subsets: List[str], ) -> List[Optional[float]]: """Evaluate the model on the validation set(s) and return the losses.""" if cfg.dataset.fixed_validation_seed is not None: # set fixed seed for every ...
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def get_valid_stats( cfg: DictConfig, trainer: Trainer, stats: Dict[str, Any] ) -> Dict[str, Any]: stats["num_updates"] = trainer.get_num_updates() if hasattr(checkpoint_utils.save_checkpoint, "best"): key = "best_{0}".format(cfg.checkpoint.best_checkpoint_metric) best_function = max if cfg....
def get_valid_stats( cfg: DictConfig, trainer: Trainer, stats: Dict[str, Any] ) -> Dict[str, Any]: stats["num_updates"] = trainer.get_num_updates() if hasattr(checkpoint_utils.save_checkpoint, "best"): key = "best_{0}".format(cfg.checkpoint.best_checkpoint_metric) best_function = max if cfg....
https://github.com/pytorch/fairseq/issues/1393
/experiments/falva/tools/fairseq/fairseq/models/fairseq_model.py:280: UserWarning: FairseqModel is deprecated, please use FairseqEncoderDecoderModel or BaseFairseqModel instead for key in self.keys Traceback (most recent call last): File "/home/falva/anaconda3/envs/mtl4ts/bin/fairseq-generate", line 11, in <module> loa...
TypeError
def reset_parameters(self): if self.qkv_same_dim: # Empirically observed the convergence to be much better with # the scaled initialization nn.init.xavier_uniform_(self.k_proj.weight, gain=1 / math.sqrt(2)) nn.init.xavier_uniform_(self.v_proj.weight, gain=1 / math.sqrt(2)) nn...
def reset_parameters(self): if self.qkv_same_dim: # Empirically observed the convergence to be much better with # the scaled initialization nn.init.xavier_uniform_(self.k_proj.weight, gain=1 / math.sqrt(2)) nn.init.xavier_uniform_(self.v_proj.weight, gain=1 / math.sqrt(2)) nn...
https://github.com/pytorch/fairseq/issues/1527
Traceback (most recent call last): File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 56, in __init__ self.reset_parameters() File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 82, in reset_parameters nn.init.constant_(self.out_proj.bias, 0.) File "xxx/torch/nn/init.py", line 120, in constant_...
AttributeError
def DistributedFairseqModel(args, model, process_group): """ Wrap a *model* to support distributed data parallel training. This is similar to the built-in DistributedDataParallel, but allows additional configuration of the DistributedDataParallel class to use, and also provides easier access to the...
def DistributedFairseqModel(args, model, process_group): """ Wrap a *model* to support distributed data parallel training. This is similar to the built-in DistributedDataParallel, but allows additional configuration of the DistributedDataParallel class to use, and also provides easier access to the...
https://github.com/pytorch/fairseq/issues/1527
Traceback (most recent call last): File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 56, in __init__ self.reset_parameters() File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 82, in reset_parameters nn.init.constant_(self.out_proj.bias, 0.) File "xxx/torch/nn/init.py", line 120, in constant_...
AttributeError
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._heartbeat_timeout = heartbeat_timeout if self._heartbeat_timeout > 0: self._heartbeat = threading.Event() self._heartbeat_thread = threading.Thread( target=self._check_heartbeat, args=(os.get...
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)
https://github.com/pytorch/fairseq/issues/1527
Traceback (most recent call last): File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 56, in __init__ self.reset_parameters() File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 82, in reset_parameters nn.init.constant_(self.out_proj.bias, 0.) File "xxx/torch/nn/init.py", line 120, in constant_...
AttributeError
def forward(self, *args, **kwargs): if self._heartbeat is not None: self._heartbeat.set() return super().forward(*args, **kwargs)
def forward(self, *inputs, **kwargs): return self.module(*inputs, **kwargs)
https://github.com/pytorch/fairseq/issues/1527
Traceback (most recent call last): File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 56, in __init__ self.reset_parameters() File "xxx/fairseq/fairseq/modules/multihead_attention.py", line 82, in reset_parameters nn.init.constant_(self.out_proj.bias, 0.) File "xxx/torch/nn/init.py", line 120, in constant_...
AttributeError
def execute(self): try: logger.debug("Passive hunter is attempting to get server certificate") addr = (str(self.event.host), self.event.port) cert = ssl.get_server_certificate(addr) except ssl.SSLError: # If the server doesn't offer SSL on this port we won't get a certificate ...
def execute(self): try: logger.debug("Passive hunter is attempting to get server certificate") addr = (str(self.event.host), self.event.port) cert = ssl.get_server_certificate(addr) except ssl.SSLError: # If the server doesn't offer SSL on this port we won't get a certificate ...
https://github.com/aquasecurity/kube-hunter/issues/349
2020-04-29 15:18:23,356 DEBUG kube_hunter.core.events.handler expected bytes-like object, not str Traceback (most recent call last): File "/usr/lib/python3.6/base64.py", line 510, in _input_type_check m = memoryview(s) TypeError: memoryview: a bytes-like object is required, not 'str' The above exception was the direct...
TypeError
def extra_attributes(self): attributes = {} for listener in self.listeners: attributes.update(listener.extra_attributes) return attributes
def extra_attributes(self): attributes = {} for listener in self.listeners: attributes.update(listener) return attributes
https://github.com/agronholm/anyio/issues/157
import anyio listener = await anyio.create_tcp_listener(local_port=33333) listener.extra(anyio.abc.SocketAttribute.local_address) Traceback (most recent call last): File ".../lib/python3.8/concurrent/futures/_base.py", line 439, in result return self.__get_result() File ".../lib/python3.8/concurrent/futures/_base.py", ...
TypeError
def load_ldconfig_cache(): """ Create a cache of the `ldconfig`-output to call it only once. It contains thousands of libraries and running it on every dylib is expensive. """ global LDCONFIG_CACHE if LDCONFIG_CACHE is not None: return from distutils.spawn import find_executabl...
def load_ldconfig_cache(): """ Create a cache of the `ldconfig`-output to call it only once. It contains thousands of libraries and running it on every dylib is expensive. """ global LDCONFIG_CACHE if LDCONFIG_CACHE is not None: return from distutils.spawn import find_executabl...
https://github.com/pyinstaller/pyinstaller/issues/5540
Traceback (most recent call last): File "/somewhere_on_my_system/venv/bin/pyinstaller", line 8, in <module> sys.exit(run()) File "/somewhere_on_my_system/venv/lib/python3.9/site-packages/PyInstaller/__main__.py", line 114, in run run_build(pyi_config, spec_file, **vars(args)) File "/somewhere_on_my_system/venv/lib/pyth...
AttributeError
def __init__(self): if sys.stdin.isatty(): self.read_handle = GetStdHandle(STD_INPUT_HANDLE) self.read_handle.SetConsoleMode( ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT ) self.cur_event_length = 0 self.cur_keys_length = 0 self.captured_...
def __init__(self): self.read_handle = GetStdHandle(STD_INPUT_HANDLE) self.read_handle.SetConsoleMode( ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT ) self.cur_event_length = 0 self.cur_keys_length = 0 self.captured_chars = []
https://github.com/locustio/locust/issues/1654
[Locust_test] $ powershell.exe -NonInteractive -ExecutionPolicy Bypass -File C:\Users\locust\AppData\Local\Temp\jenkins11138277147510956709.ps1 [2020-12-10 19:13:09,846] robot-vm/INFO/locust.main: Run time limit set to 3 seconds [2020-12-10 19:13:09,847] robot-vm/INFO/locust.main: Starting Locust 1.4.1 [2020-12-10 19:1...
pywintypes.error
def stats_history(runner): """Save current stats info to history for charts of report.""" while True: stats = runner.stats if not stats.total.use_response_times_cache: break r = { "time": datetime.datetime.now().strftime("%H:%M:%S"), "current_rps": sta...
def stats_history(runner): """Save current stats info to history for charts of report.""" while True: stats = runner.stats r = { "time": datetime.datetime.now().strftime("%H:%M:%S"), "current_rps": stats.total.current_rps or 0, "current_fail_per_sec": stats.to...
https://github.com/locustio/locust/issues/1531
$ locust --worker --locustfile=main.py [2020-08-20 11:02:50,637] C02TD0F6GTDX/INFO/locust.main: Starting Locust 1.2 Traceback (most recent call last): File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run File "/usr/local/lib/python3.8/site-packages/locust/stats.py", line 766, in stats_histo...
ValueError
def fire(self, *, reverse=False, **kwargs): if reverse: handlers = reversed(self._handlers) else: handlers = self._handlers for handler in handlers: try: handler(**kwargs) except Exception as e: logging.error("Uncaught exception in event handler: %s", ...
def fire(self, *, reverse=False, **kwargs): if reverse: handlers = reversed(self._handlers) else: handlers = self._handlers for handler in handlers: handler(**kwargs)
https://github.com/locustio/locust/issues/1461
[2020-07-03 03:37:18,086] instance-1/INFO/locust.main: Time limit reached. Stopping Locust. Traceback (most recent call last): File "src/gevent/greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run File "/home/camilojimenez/locust/venv/lib/python3.7/site-packages/locust/main.py", line 231, in timelimit_stop ...
ZeroDivisionError
def __init__(self, *args, master_host, master_port, **kwargs): # Create a new RequestStats with use_response_times_cache set to False to save some memory # and CPU cycles. We need to create the new RequestStats before we call super() (since int's # used in the constructor of DistributedLocustRunner) sel...
def __init__(self, *args, master_host, master_port, **kwargs): super().__init__(*args, **kwargs) self.client_id = socket.gethostname() + "_" + uuid4().hex self.master_host = master_host self.master_port = master_port self.client = rpc.Client(master_host, master_port, self.client_id) self.greenle...
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def __init__(self, use_response_times_cache=True): """ The value of use_response_times_cache will be set for each StatsEntry() when they are created. Settings it to False saves some memory and CPU cycles which we can do on worker nodes where the response_times_cache is not needed. """ self.use_r...
def __init__(self): self.entries = {} self.errors = {} self.total = StatsEntry(self, "Aggregated", None, use_response_times_cache=True)
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def get(self, name, method): """ Retrieve a StatsEntry instance by name and method """ entry = self.entries.get((name, method)) if not entry: entry = StatsEntry( self, name, method, use_response_times_cache=self.use_response_times_cache ) self.entries[(name, metho...
def get(self, name, method): """ Retrieve a StatsEntry instance by name and method """ entry = self.entries.get((name, method)) if not entry: entry = StatsEntry(self, name, method, True) self.entries[(name, method)] = entry return entry
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def clear_all(self): """ Remove all stats entries and errors """ self.total = StatsEntry( self, "Aggregated", None, use_response_times_cache=self.use_response_times_cache ) self.entries = {} self.errors = {}
def clear_all(self): """ Remove all stats entries and errors """ self.total = StatsEntry(self, "Aggregated", None, use_response_times_cache=True) self.entries = {} self.errors = {}
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def extend(self, other): """ Extend the data from the current StatsEntry with the stats from another StatsEntry instance. """ # save the old last_request_timestamp, to see if we should store a new copy # of the response times in the response times cache old_last_request_timestamp = self.last...
def extend(self, other): """ Extend the data from the current StatsEntry with the stats from another StatsEntry instance. """ if ( self.last_request_timestamp is not None and other.last_request_timestamp is not None ): self.last_request_timestamp = max( self.l...
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def setup_distributed_stats_event_listeners(events, stats): def on_report_to_master(client_id, data): data["stats"] = stats.serialize_stats() data["stats_total"] = stats.total.get_stripped_report() data["errors"] = stats.serialize_errors() stats.errors = {} def on_worker_report(...
def setup_distributed_stats_event_listeners(events, stats): def on_report_to_master(client_id, data): data["stats"] = stats.serialize_stats() data["stats_total"] = stats.total.get_stripped_report() data["errors"] = stats.serialize_errors() stats.errors = {} def on_worker_report(...
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def on_worker_report(client_id, data): for stats_data in data["stats"]: entry = StatsEntry.unserialize(stats_data) request_key = (entry.name, entry.method) if not request_key in stats.entries: stats.entries[request_key] = StatsEntry( stats, entry.name, entry.metho...
def on_worker_report(client_id, data): for stats_data in data["stats"]: entry = StatsEntry.unserialize(stats_data) request_key = (entry.name, entry.method) if not request_key in stats.entries: stats.entries[request_key] = StatsEntry(stats, entry.name, entry.method) stats....
https://github.com/locustio/locust/issues/1315
[2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: Traceback (most recent call last): [2020-04-06 13:01:45,700] Jonatans-Air.localdomain/ERROR/stderr: File "/Users/heyman/virtualenvs/locust/bin/locust", line 11, in <module> [2020-04-06 13:01:45,702] Jonatans-Air.localdomain/ERROR/stderr: [2020-04-06 13:01...
ValueError
def start_hatching(self, locust_count=None, hatch_rate=None, wait=False): if hatch_rate > 100: logger.warning( "Your selected hatch rate is very high (>100), and this is known to sometimes cause issues. Do you really need to ramp up that fast?" ) self.hatching_greenlet = gevent.spawn...
def start_hatching(self, locust_count=None, hatch_rate=None, wait=False): self.hatching_greenlet = gevent.spawn( lambda: super(LocalLocustRunner, self).start_hatching( locust_count, hatch_rate, wait=wait ) ) self.greenlet = self.hatching_greenlet
https://github.com/locustio/locust/issues/1174
Traceback (most recent call last): File "gevent/pywsgi.py", line 964, in handle_one_response self.run_application() File "gevent/pywsgi.py", line 911, in run_application self.result = self.application(self.environ, self.start_response) File "flask/app.py", line 2463, in __call__ return self.wsgi_app(environ, start_resp...
RuntimeError
def start_hatching(self, locust_count, hatch_rate): num_slaves = ( len(self.clients.ready) + len(self.clients.running) + len(self.clients.hatching) ) if not num_slaves: logger.warning( "You are running in distributed mode but have no slave servers connected. " "Please...
def start_hatching(self, locust_count, hatch_rate): num_slaves = ( len(self.clients.ready) + len(self.clients.running) + len(self.clients.hatching) ) if not num_slaves: logger.warning( "You are running in distributed mode but have no slave servers connected. " "Please...
https://github.com/locustio/locust/issues/1174
Traceback (most recent call last): File "gevent/pywsgi.py", line 964, in handle_one_response self.run_application() File "gevent/pywsgi.py", line 911, in run_application self.result = self.application(self.environ, self.start_response) File "flask/app.py", line 2463, in __call__ return self.wsgi_app(environ, start_resp...
RuntimeError
def load_locustfile(path): """ Import given locustfile path and return (docstring, callables). Specifically, the locustfile's ``__doc__`` attribute (a string) and a dictionary of ``{'name': callable}`` containing all callables which pass the "is a Locust" test. """ def __import_locustfile_...
def load_locustfile(path): """ Import given locustfile path and return (docstring, callables). Specifically, the locustfile's ``__doc__`` attribute (a string) and a dictionary of ``{'name': callable}`` containing all callables which pass the "is a Locust" test. """ # Get directory and locus...
https://github.com/locustio/locust/issues/940
unuser@miguel-pc:/$ locust -f /tests/login_and_minimal_navigation.test.py -H http://127.0.0.1:10000 --no-web -c 10 -r 2 -t 30s --only-summary [2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: Traceback (most recent call last): [2019-01-04 09:32:05,137] miguel-pc/ERROR/stderr: File "/usr/local/bin/locust", line 11, in <...
ImportError
def sample( self, n: Optional[int] = None, frac: Optional[float] = None, replace: bool = False, weights: Optional[Union[Sequence, Series]] = None, random_state=None, ): """ Return a random sample of items from each group. You can use `random_state` for reproducibility. .. versi...
def sample( self, n: Optional[int] = None, frac: Optional[float] = None, replace: bool = False, weights: Optional[Union[Sequence, Series]] = None, random_state=None, ): """ Return a random sample of items from each group. You can use `random_state` for reproducibility. .. versi...
https://github.com/pandas-dev/pandas/issues/39927
Traceback (most recent call last): File "/Users/wenjun/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-4-1fc31a504740>", line 1, in <module> df1.groupby('c').sample(1, weights=df1['d'].to_numpy()) Fil...
KeyError
def _wrap_applied_output( self, data: Series, keys: Index, values: Optional[List[Any]], not_indexed_same: bool = False, ) -> FrameOrSeriesUnion: """ Wrap the output of SeriesGroupBy.apply into the expected result. Parameters ---------- data : Series Input data for groupb...
def _wrap_applied_output( self, keys: Index, values: Optional[List[Any]], not_indexed_same: bool = False ) -> FrameOrSeriesUnion: """ Wrap the output of SeriesGroupBy.apply into the expected result. Parameters ---------- keys : Index Keys of groups that Series was grouped by. values...
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def _wrap_applied_output(self, data, keys, values, not_indexed_same=False): if len(keys) == 0: result = self.obj._constructor( index=self.grouper.result_index, columns=data.columns ) result = result.astype(data.dtypes.to_dict(), copy=False) return result # GH12824 ...
def _wrap_applied_output(self, keys, values, not_indexed_same=False): if len(keys) == 0: return self.obj._constructor(index=keys) # GH12824 first_not_none = next(com.not_none(*values), None) if first_not_none is None: # GH9684 - All values are None, return an empty frame. retur...
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def _python_apply_general(self, f: F, data: FrameOrSeriesUnion) -> FrameOrSeriesUnion: """ Apply function f in python space Parameters ---------- f : callable Function to apply data : Series or DataFrame Data to apply f to Returns ------- Series or DataFrame ...
def _python_apply_general(self, f: F, data: FrameOrSeriesUnion) -> FrameOrSeriesUnion: """ Apply function f in python space Parameters ---------- f : callable Function to apply data : Series or DataFrame Data to apply f to Returns ------- Series or DataFrame ...
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def _wrap_applied_output(self, data, keys, values, not_indexed_same: bool = False): raise AbstractMethodError(self)
def _wrap_applied_output(self, keys, values, not_indexed_same: bool = False): raise AbstractMethodError(self)
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def __internal_pivot_table( data: DataFrame, values, index, columns, aggfunc: Union[AggFuncTypeBase, AggFuncTypeDict], fill_value, margins: bool, dropna: bool, margins_name: str, observed: bool, ) -> DataFrame: """ Helper of :func:`pandas.pivot_table` for any non-list ``a...
def __internal_pivot_table( data: DataFrame, values, index, columns, aggfunc: Union[AggFuncTypeBase, AggFuncTypeDict], fill_value, margins: bool, dropna: bool, margins_name: str, observed: bool, ) -> DataFrame: """ Helper of :func:`pandas.pivot_table` for any non-list ``a...
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def crosstab( index, columns, values=None, rownames=None, colnames=None, aggfunc=None, margins=False, margins_name: str = "All", dropna: bool = True, normalize=False, ) -> DataFrame: """ Compute a simple cross tabulation of two (or more) factors. By default computes a...
def crosstab( index, columns, values=None, rownames=None, colnames=None, aggfunc=None, margins=False, margins_name: str = "All", dropna: bool = True, normalize=False, ) -> DataFrame: """ Compute a simple cross tabulation of two (or more) factors. By default computes a...
https://github.com/pandas-dev/pandas/issues/26411
Empty DataFrame Columns: [] Index: [] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pandas/core/frame.py", line 2927, in __getitem__ indexer = self.columns.get_loc(key) File "/usr/local/lib/python2.7/dist-packages/pandas/core/indexes/base.py", line 2...
KeyError
def _convert_datetimes(sas_datetimes: pd.Series, unit: str) -> pd.Series: """ Convert to Timestamp if possible, otherwise to datetime.datetime. SAS float64 lacks precision for more than ms resolution so the fit to datetime.datetime is ok. Parameters ---------- sas_datetimes : {Series, Seque...
def _convert_datetimes(sas_datetimes: pd.Series, unit: str) -> pd.Series: """ Convert to Timestamp if possible, otherwise to datetime.datetime. SAS float64 lacks precision for more than ms resolution so the fit to datetime.datetime is ok. Parameters ---------- sas_datetimes : {Series, Seque...
https://github.com/pandas-dev/pandas/issues/39725
Traceback (most recent call last): File "/home/wertha/source/pandas/pandas/tests/io/sas/data/.test/lib/python3.9/site-packages/pandas/io/sas/sas7bdat.py", line 52, in _convert_datetimes return pd.to_datetime(sas_datetimes, unit=unit, origin="1960-01-01") File "/home/wertha/source/pandas/pandas/tests/io/sas/data/.test/l...
ValueError
def sort_values( # type: ignore[override] self, by, axis: Axis = 0, ascending=True, inplace: bool = False, kind: str = "quicksort", na_position: str = "last", ignore_index: bool = False, key: ValueKeyFunc = None, ): inplace = validate_bool_kwarg(inplace, "inplace") axis = se...
def sort_values( # type: ignore[override] self, by, axis: Axis = 0, ascending=True, inplace: bool = False, kind: str = "quicksort", na_position: str = "last", ignore_index: bool = False, key: ValueKeyFunc = None, ): inplace = validate_bool_kwarg(inplace, "inplace") axis = se...
https://github.com/pandas-dev/pandas/issues/39426
Traceback (most recent call last): File "sort_values_test6.py", line 19, in <module> print(df2) File "/localdisk/gashiman/miniconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 803, in __repr__ self.to_string( File "/localdisk/gashiman/miniconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 939, ...
ValueError
def _align_series(self, indexer, ser: Series, multiindex_indexer: bool = False): """ Parameters ---------- indexer : tuple, slice, scalar Indexer used to get the locations that will be set to `ser`. ser : pd.Series Values to assign to the locations specified by `indexer`. multiin...
def _align_series(self, indexer, ser: Series, multiindex_indexer: bool = False): """ Parameters ---------- indexer : tuple, slice, scalar Indexer used to get the locations that will be set to `ser`. ser : pd.Series Values to assign to the locations specified by `indexer`. multiin...
https://github.com/pandas-dev/pandas/issues/38303
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) ~/sources/official.clone/pandas/pandas/core/generic.py in _get_axis_number(cls, axis) 456 try: --> 457 return cls._AXIS_TO_AXIS_NUMBER[axis] 458 ...
KeyError
def _parsed_string_to_bounds(self, reso: Resolution, parsed: datetime): """ Calculate datetime bounds for parsed time string and its resolution. Parameters ---------- reso : str Resolution provided by parsed string. parsed : datetime Datetime from parsed string. Returns ...
def _parsed_string_to_bounds(self, reso: Resolution, parsed: datetime): """ Calculate datetime bounds for parsed time string and its resolution. Parameters ---------- reso : str Resolution provided by parsed string. parsed : datetime Datetime from parsed string. Returns ...
https://github.com/pandas-dev/pandas/issues/33589
During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) <ipython-input-20-482a9c5e8c58> in <module> ----> 1 df['2017-10-25T16:25:04.252':'2017-10-25T16:50:05.237'] /opt/conda/lib/python3.7/site-packages/pandas/core/frame.py in __g...
KeyError
def value_counts( self, normalize=False, sort=True, ascending=False, bins=None, dropna=True ): from pandas.core.reshape.merge import get_join_indexers from pandas.core.reshape.tile import cut ids, _, _ = self.grouper.group_info val = self.obj._values def apply_series_value_counts(): re...
def value_counts( self, normalize=False, sort=True, ascending=False, bins=None, dropna=True ): from pandas.core.reshape.merge import get_join_indexers from pandas.core.reshape.tile import cut ids, _, _ = self.grouper.group_info val = self.obj._values def apply_series_value_counts(): re...
https://github.com/pandas-dev/pandas/issues/39172
Traceback (most recent call last): File "<input>", line 1, in <module> File "/Users/username/.virtualenvs/my_project/lib/python3.8/site-packages/pandas/core/groupby/generic.py", line 736, in value_counts codes = [rep(level_codes) for level_codes in codes] + [llab(lab, inc)] File "/Users/username/.virtualenvs/my_project...
IndexError
def __setitem__(self, key, value): key = com.apply_if_callable(key, self) # see if we can slice the rows indexer = convert_to_index_sliceable(self, key) if indexer is not None: # either we have a slice or we have a string that can be converted # to a slice for partial-string date index...
def __setitem__(self, key, value): key = com.apply_if_callable(key, self) # see if we can slice the rows indexer = convert_to_index_sliceable(self, key) if indexer is not None: # either we have a slice or we have a string that can be converted # to a slice for partial-string date index...
https://github.com/pandas-dev/pandas/issues/15695
In [2]: df = pd.DataFrame(index=range(3), columns=['A', 'B', 'C', 'D', 'E', 'F']) In [3]: df.loc[0, ['A', 'D']] = (1,2) In [4]: df.loc[:, ['B', 'E']] = (1,2) In [5]: df[['C', 'F']] = (1,2) In [6]: df Out[6]: A B C D E F 0 1 1 1 2 2 2 1 NaN 1 1 NaN 2 2 2 NaN 1 1 NaN 2 2 In [7]: dfdup = ...
ValueError
def _setitem_single_block(self, indexer, value, name: str): """ _setitem_with_indexer for the case when we have a single Block. """ from pandas import Series info_axis = self.obj._info_axis_number item_labels = self.obj._get_axis(info_axis) if isinstance(indexer, tuple): # if we ar...
def _setitem_single_block(self, indexer, value, name: str): """ _setitem_with_indexer for the case when we have a single Block. """ from pandas import Series info_axis = self.obj._info_axis_number item_labels = self.obj._get_axis(info_axis) if isinstance(indexer, tuple): # if we ar...
https://github.com/pandas-dev/pandas/issues/38521
Traceback (most recent call last): File "c:\Users\leona\pandas\main.py", line 3, in <module> df.loc[:, 'a'] = list(range(5)) File "c:\Users\leona\pandas\pandas\core\indexing.py", line 691, in __setitem__ iloc._setitem_with_indexer(indexer, value, self.name) File "c:\Users\leona\pandas\pandas\core\indexing.py", line 163...
ValueError
def __init__(self, f: Union[FilePathOrBuffer, List], **kwds): """ Workhorse function for processing nested list into DataFrame """ ParserBase.__init__(self, kwds) self.data: Optional[Iterator[str]] = None self.buf: List = [] self.pos = 0 self.line_pos = 0 self.skiprows = kwds["skip...
def __init__(self, f: Union[FilePathOrBuffer, List], **kwds): """ Workhorse function for processing nested list into DataFrame """ ParserBase.__init__(self, kwds) self.data: Optional[Iterator[str]] = None self.buf: List = [] self.pos = 0 self.line_pos = 0 self.skiprows = kwds["skip...
https://github.com/pandas-dev/pandas/issues/39024
Traceback (most recent call last): File "..\scratch\pandas_file_handle.py", line 19, in <module> dataframe = pandas.read_csv(csv_file, sep=None) File "C:\Users\dmf\projects\invest\env\lib\site-packages\pandas\io\parsers.py", line 605, in read_csv return _read(filepath_or_buffer, kwds) File "C:\Users\dmf\projects\invest...
UnicodeDecodeError
def _reindex_non_unique(self, target): """ Create a new index with target's values (move/add/delete values as necessary) use with non-unique Index and a possibly non-unique target. Parameters ---------- target : an iterable Returns ------- new_index : pd.Index Resulting ind...
def _reindex_non_unique(self, target): """ Create a new index with target's values (move/add/delete values as necessary) use with non-unique Index and a possibly non-unique target. Parameters ---------- target : an iterable Returns ------- new_index : pd.Index Resulting ind...
https://github.com/pandas-dev/pandas/issues/38906
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\mboling\Anaconda3\envs\pandastest\lib\site-packages\pandas\util\_decorators.py", line 312, in wrapper return func(*args, **kwargs) File "C:\Users\mboling\Anaconda3\envs\pandastest\lib\site-packages\pandas\core\frame.py", line 4173, in...
IndexError
def to_numeric(arg, errors="raise", downcast=None): """ Convert argument to a numeric type. The default return dtype is `float64` or `int64` depending on the data supplied. Use the `downcast` parameter to obtain other dtypes. Please note that precision loss may occur if really large numbers ...
def to_numeric(arg, errors="raise", downcast=None): """ Convert argument to a numeric type. The default return dtype is `float64` or `int64` depending on the data supplied. Use the `downcast` parameter to obtain other dtypes. Please note that precision loss may occur if really large numbers ...
https://github.com/pandas-dev/pandas/issues/38974
In [9]: import pandas as pd ...: import pandas._testing as tm ...: ...: arr = pd.array([1, 2, pd.NA], dtype="Int64") ...: ...: result = pd.to_numeric(arr, downcast="integer") ...: expected = pd.array([1, 2, pd.NA], dtype="Int8") ...: tm.assert_extension_array_equal(result, expected) ...: ...: arr[1] = pd.NA # should no...
AssertionError
def _maybe_add_join_keys(self, result, left_indexer, right_indexer): left_has_missing = None right_has_missing = None keys = zip(self.join_names, self.left_on, self.right_on) for i, (name, lname, rname) in enumerate(keys): if not _should_fill(lname, rname): continue take_le...
def _maybe_add_join_keys(self, result, left_indexer, right_indexer): left_has_missing = None right_has_missing = None keys = zip(self.join_names, self.left_on, self.right_on) for i, (name, lname, rname) in enumerate(keys): if not _should_fill(lname, rname): continue take_le...
https://github.com/pandas-dev/pandas/issues/33814
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 88, in merge return op.get_result() File "/usr/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 668, in get_result self._maybe_add_join_keys(result, left_index...
AttributeError
def setup(self, N): data = np.arange(N, dtype=float) data[40] = np.nan self.array = pd.array(data, dtype="Int64")
def setup(self): N = 10**5 na = np.arange(int(N / 2)) self.left = np.concatenate([na[: int(N / 4)], na[: int(N / 4)]]) self.right = np.concatenate([na, na])
https://github.com/pandas-dev/pandas/issues/6963
In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File "<ipython-input-10-f61a1ab4009e>", line 1, in <module> pd.concat([df1, df2]) ... File "c:\users\vdbo...
IndexError
def get_result(self): cons: Type[FrameOrSeriesUnion] sample: FrameOrSeriesUnion # series only if self._is_series: sample = cast("Series", self.objs[0]) # stack blocks if self.bm_axis == 0: name = com.consensus_name_attr(self.objs) cons = sample._construc...
def get_result(self): cons: Type[FrameOrSeriesUnion] sample: FrameOrSeriesUnion # series only if self._is_series: sample = cast("Series", self.objs[0]) # stack blocks if self.bm_axis == 0: name = com.consensus_name_attr(self.objs) cons = sample._construc...
https://github.com/pandas-dev/pandas/issues/6963
In [9]: df1 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B1']) ...: df2 = pd.DataFrame(np.random.randn(3,3), columns=['A', 'A', 'B2']) In [10]: pd.concat([df1, df2]) Traceback (most recent call last): File "<ipython-input-10-f61a1ab4009e>", line 1, in <module> pd.concat([df1, df2]) ... File "c:\users\vdbo...
IndexError
def astype(self, dtype, copy=True): # Some notes on cases we don't have to handle here in the base class: # 1. PeriodArray.astype handles period -> period # 2. DatetimeArray.astype handles conversion between tz. # 3. DatetimeArray.astype handles datetime -> period dtype = pandas_dtype(dtype) ...
def astype(self, dtype, copy=True): # Some notes on cases we don't have to handle here in the base class: # 1. PeriodArray.astype handles period -> period # 2. DatetimeArray.astype handles conversion between tz. # 3. DatetimeArray.astype handles datetime -> period dtype = pandas_dtype(dtype) ...
https://github.com/pandas-dev/pandas/issues/24381
In [10]: idx._data.astype('int32').astype("int32", casting="safe") --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-10-2c2a4a677a5c> in <module> ----> 1 idx._data.astype('int32').astype("int32", casting...
TypeError
def astype_nansafe( arr: np.ndarray, dtype: DtypeObj, copy: bool = True, skipna: bool = False ) -> ArrayLike: """ Cast the elements of an array to a given dtype a nan-safe manner. Parameters ---------- arr : ndarray dtype : np.dtype or ExtensionDtype copy : bool, default True If...
def astype_nansafe( arr: np.ndarray, dtype: DtypeObj, copy: bool = True, skipna: bool = False ) -> ArrayLike: """ Cast the elements of an array to a given dtype a nan-safe manner. Parameters ---------- arr : ndarray dtype : np.dtype or ExtensionDtype copy : bool, default True If...
https://github.com/pandas-dev/pandas/issues/24381
In [10]: idx._data.astype('int32').astype("int32", casting="safe") --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-10-2c2a4a677a5c> in <module> ----> 1 idx._data.astype('int32').astype("int32", casting...
TypeError
def _transform_general(self, func, *args, **kwargs): """ Transform with a non-str `func`. """ klass = type(self._selected_obj) results = [] for name, group in self: object.__setattr__(group, "name", name) res = func(group, *args, **kwargs) if isinstance(res, (DataFrame,...
def _transform_general(self, func, *args, **kwargs): """ Transform with a non-str `func`. """ klass = type(self._selected_obj) results = [] for name, group in self: object.__setattr__(group, "name", name) res = func(group, *args, **kwargs) if isinstance(res, (DataFrame,...
https://github.com/pandas-dev/pandas/issues/35612
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-4-3bae7d67a46f> in <module> ----> 1 gb['B'].transform(len) /workspaces/pandas-arw2019/pandas/core/groupby/generic.py in transform(self, func, engine, en...
ValueError
def _set_result_index_ordered( self, result: "OutputFrameOrSeries" ) -> "OutputFrameOrSeries": # set the result index on the passed values object and # return the new object, xref 8046 if self.grouper.is_monotonic: # shortcut if we have an already ordered grouper result.set_axis(self.ob...
def _set_result_index_ordered( self, result: "OutputFrameOrSeries" ) -> "OutputFrameOrSeries": # set the result index on the passed values object and # return the new object, xref 8046 # the values/counts are repeated according to the group index # shortcut if we have an already ordered grouper ...
https://github.com/pandas-dev/pandas/issues/35612
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-4-3bae7d67a46f> in <module> ----> 1 gb['B'].transform(len) /workspaces/pandas-arw2019/pandas/core/groupby/generic.py in transform(self, func, engine, en...
ValueError
def maybe_box_datetimelike(value: Scalar, dtype: Optional[Dtype] = None) -> Scalar: """ Cast scalar to Timestamp or Timedelta if scalar is datetime-like and dtype is not object. Parameters ---------- value : scalar dtype : Dtype, optional Returns ------- scalar """ if d...
def maybe_box_datetimelike(value: Scalar, dtype: Optional[Dtype] = None) -> Scalar: """ Cast scalar to Timestamp or Timedelta if scalar is datetime-like and dtype is not object. Parameters ---------- value : scalar dtype : Dtype, optional Returns ------- scalar """ if d...
https://github.com/pandas-dev/pandas/issues/38032
In [31]: import pandas as pd ...: import pandas._testing as tm ...: ...: td = pd.Timedelta(nanoseconds=500) ...: ser = pd.Series({"a": td}) ...: expected = pd.Series(td, index=["a"], dtype="timedelta64[ns]") ...: ...: tm.assert_series_equal(ser, expected) ----------------------------------------------------------------...
AssertionError
def maybe_cast_to_datetime(value, dtype: Optional[DtypeObj]): """ try to cast the array/value to a datetimelike dtype, converting float nan to iNaT """ from pandas.core.tools.datetimes import to_datetime from pandas.core.tools.timedeltas import to_timedelta if dtype is not None: is_...
def maybe_cast_to_datetime(value, dtype: Optional[DtypeObj]): """ try to cast the array/value to a datetimelike dtype, converting float nan to iNaT """ from pandas.core.tools.datetimes import to_datetime from pandas.core.tools.timedeltas import to_timedelta if dtype is not None: is_...
https://github.com/pandas-dev/pandas/issues/38032
In [31]: import pandas as pd ...: import pandas._testing as tm ...: ...: td = pd.Timedelta(nanoseconds=500) ...: ser = pd.Series({"a": td}) ...: expected = pd.Series(td, index=["a"], dtype="timedelta64[ns]") ...: ...: tm.assert_series_equal(ser, expected) ----------------------------------------------------------------...
AssertionError
def construct_1d_arraylike_from_scalar( value: Scalar, length: int, dtype: Optional[DtypeObj] ) -> ArrayLike: """ create a np.ndarray / pandas type of specified shape and dtype filled with values Parameters ---------- value : scalar value length : int dtype : pandas_dtype or np.dtyp...
def construct_1d_arraylike_from_scalar( value: Scalar, length: int, dtype: Optional[DtypeObj] ) -> ArrayLike: """ create a np.ndarray / pandas type of specified shape and dtype filled with values Parameters ---------- value : scalar value length : int dtype : pandas_dtype or np.dtyp...
https://github.com/pandas-dev/pandas/issues/38032
In [31]: import pandas as pd ...: import pandas._testing as tm ...: ...: td = pd.Timedelta(nanoseconds=500) ...: ser = pd.Series({"a": td}) ...: expected = pd.Series(td, index=["a"], dtype="timedelta64[ns]") ...: ...: tm.assert_series_equal(ser, expected) ----------------------------------------------------------------...
AssertionError
def __init__( self, data=None, index: Optional[Axes] = None, columns: Optional[Axes] = None, dtype: Optional[Dtype] = None, copy: bool = False, ): if data is None: data = {} if dtype is not None: dtype = self._validate_dtype(dtype) if isinstance(data, DataFrame): ...
def __init__( self, data=None, index: Optional[Axes] = None, columns: Optional[Axes] = None, dtype: Optional[Dtype] = None, copy: bool = False, ): if data is None: data = {} if dtype is not None: dtype = self._validate_dtype(dtype) if isinstance(data, DataFrame): ...
https://github.com/pandas-dev/pandas/issues/38032
In [31]: import pandas as pd ...: import pandas._testing as tm ...: ...: td = pd.Timedelta(nanoseconds=500) ...: ser = pd.Series({"a": td}) ...: expected = pd.Series(td, index=["a"], dtype="timedelta64[ns]") ...: ...: tm.assert_series_equal(ser, expected) ----------------------------------------------------------------...
AssertionError
def _should_parse_dates(self, i): if isinstance(self.parse_dates, bool): return self.parse_dates else: if self.index_names is not None: name = self.index_names[i] else: name = None j = i if self.index_col is None else self.index_col[i] if is_scala...
def _should_parse_dates(self, i): if isinstance(self.parse_dates, bool): return self.parse_dates else: if self.index_names is not None: name = self.index_names[i] else: name = None j = self.index_col[i] if is_scalar(self.parse_dates): ...
https://github.com/pandas-dev/pandas/issues/33699
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-146-082b3d7afa0a> in <module>() 1 import io 2 s = """A,B,\n1,2""" ----> 3 pd.read_csv(io.StringIO(s), parse_dates=["B"], names=["B"]) /usr/lib/python3/d...
TypeError
def drop(self, labels, errors: str_t = "raise"): """ Make new Index with passed list of labels deleted. Parameters ---------- labels : array-like errors : {'ignore', 'raise'}, default 'raise' If 'ignore', suppress error and existing labels are dropped. Returns ------- dropp...
def drop(self, labels, errors: str_t = "raise"): """ Make new Index with passed list of labels deleted. Parameters ---------- labels : array-like errors : {'ignore', 'raise'}, default 'raise' If 'ignore', suppress error and existing labels are dropped. Returns ------- dropp...
https://github.com/pandas-dev/pandas/issues/38051
index = pd.Index(range(3)).repeat(2) index.drop(1) Traceback (most recent call last): [...] pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
pandas.errors.InvalidIndexError
def drop(self, codes, level=None, errors="raise"): """ Make new MultiIndex with passed list of codes deleted Parameters ---------- codes : array-like Must be a list of tuples when level is not specified level : int or level name, default None errors : str, default 'raise' Retur...
def drop(self, codes, level=None, errors="raise"): """ Make new MultiIndex with passed list of codes deleted Parameters ---------- codes : array-like Must be a list of tuples when level is not specified level : int or level name, default None errors : str, default 'raise' Retur...
https://github.com/pandas-dev/pandas/issues/38051
index = pd.Index(range(3)).repeat(2) index.drop(1) Traceback (most recent call last): [...] pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
pandas.errors.InvalidIndexError
def _groupby_and_merge(by, on, left: "DataFrame", right: "DataFrame", merge_pieces): """ groupby & merge; we are always performing a left-by type operation Parameters ---------- by: field to group on: duplicates field left: DataFrame right: DataFrame merge_pieces: function for mergi...
def _groupby_and_merge(by, on, left: "DataFrame", right: "DataFrame", merge_pieces): """ groupby & merge; we are always performing a left-by type operation Parameters ---------- by: field to group on: duplicates field left: DataFrame right: DataFrame merge_pieces: function for mergi...
https://github.com/pandas-dev/pandas/issues/35269
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 290, in merge_ordered result, _ = _groupby_and_merge( File "/usr/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 162, in _groupby_and_merge merged[k] = key Fi...
ValueError
def _convert_list_indexer(self, keyarr): """ we are passed a list-like indexer. Return the indexer for matching intervals. """ locs = self.get_indexer_for(keyarr) # we have missing values if (locs == -1).any(): raise KeyError(keyarr[locs == -1].tolist()) return locs
def _convert_list_indexer(self, keyarr): """ we are passed a list-like indexer. Return the indexer for matching intervals. """ locs = self.get_indexer_for(keyarr) # we have missing values if (locs == -1).any(): raise KeyError return locs
https://github.com/pandas-dev/pandas/issues/27365
import numpy as np import pandas as pd pd.__version__ '0.25.0rc0+59.g0437f6899' s=pd.Series(np.arange(5), pd.IntervalIndex.from_breaks(np.arange(6))) s (0, 1] 0 (1, 2] 1 (2, 3] 2 (3, 4] 3 (4, 5] 4 dtype: int32 s.loc[[4,5]] (3, 4] 3 (4, 5] 4 dtype: int32 s.loc[[4,5,6]] Traceback (most recent call...
KeyError
def _partial_tup_index(self, tup, side="left"): if len(tup) > self.lexsort_depth: raise UnsortedIndexError( f"Key length ({len(tup)}) was greater than MultiIndex lexsort depth " f"({self.lexsort_depth})" ) n = len(tup) start, end = 0, len(self) zipped = zip(tup, ...
def _partial_tup_index(self, tup, side="left"): if len(tup) > self.lexsort_depth: raise UnsortedIndexError( f"Key length ({len(tup)}) was greater than MultiIndex lexsort depth " f"({self.lexsort_depth})" ) n = len(tup) start, end = 0, len(self) zipped = zip(tup, ...
https://github.com/pandas-dev/pandas/issues/24263
In [1]: import pandas as pd In [2]: index = pd.date_range('2001-01-01', periods=100) In [3]: mindex = pd.MultiIndex.from_arrays([index]) In [4]: mindex.get_loc('2001-01') --------------------------------------------------------------------------- TypeError Traceback (most recent call ...
TypeError
def _get_level_indexer(self, key, level: int = 0, indexer=None): # `level` kwarg is _always_ positional, never name # return an indexer, boolean array or a slice showing where the key is # in the totality of values # if the indexer is provided, then use this level_index = self.levels[level] lev...
def _get_level_indexer(self, key, level: int = 0, indexer=None): # `level` kwarg is _always_ positional, never name # return an indexer, boolean array or a slice showing where the key is # in the totality of values # if the indexer is provided, then use this level_index = self.levels[level] lev...
https://github.com/pandas-dev/pandas/issues/24263
In [1]: import pandas as pd In [2]: index = pd.date_range('2001-01-01', periods=100) In [3]: mindex = pd.MultiIndex.from_arrays([index]) In [4]: mindex.get_loc('2001-01') --------------------------------------------------------------------------- TypeError Traceback (most recent call ...
TypeError
def slice_indexer(self, start=None, end=None, step=None, kind=None): """ Return indexer for specified label slice. Index.slice_indexer, customized to handle time slicing. In addition to functionality provided by Index.slice_indexer, does the following: - if both `start` and `end` are instances...
def slice_indexer(self, start=None, end=None, step=None, kind=None): """ Return indexer for specified label slice. Index.slice_indexer, customized to handle time slicing. In addition to functionality provided by Index.slice_indexer, does the following: - if both `start` and `end` are instances...
https://github.com/pandas-dev/pandas/issues/18531
In [9]: import pandas as pd ...: ...: df1 = pd.DataFrame({"A": [1, 2, 3]}, ...: index=[pd.Timestamp('2017'), ...: pd.Timestamp('2019'), ...: pd.Timestamp('2018')]) ...: df2 = pd.DataFrame({"A": [1, 2, 3]}, ...: index=['a', 'c', 'b...
ValueError
def head(self, n=5): """ Return first n rows of each group. Similar to ``.apply(lambda x: x.head(n))``, but it returns a subset of rows from the original DataFrame with original index and order preserved (``as_index`` flag is ignored). Does not work for negative values of `n`. Returns ...
def head(self, n=5): """ Return first n rows of each group. Similar to ``.apply(lambda x: x.head(n))``, but it returns a subset of rows from the original DataFrame with original index and order preserved (``as_index`` flag is ignored). Does not work for negative values of `n`. Returns ...
https://github.com/pandas-dev/pandas/issues/9772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jonas/Code/pandas/pandas/core/groupby.py", line 986, in head in_head = self._cumcount_array() < n File "/home/jonas/Code/pandas/pandas/core/groupby.py", line 1044, in _cumcount_array cumcounts[indices] = values IndexError: index 10 is ou...
IndexError
def tail(self, n=5): """ Return last n rows of each group. Similar to ``.apply(lambda x: x.tail(n))``, but it returns a subset of rows from the original DataFrame with original index and order preserved (``as_index`` flag is ignored). Does not work for negative values of `n`. Returns ...
def tail(self, n=5): """ Return last n rows of each group. Similar to ``.apply(lambda x: x.tail(n))``, but it returns a subset of rows from the original DataFrame with original index and order preserved (``as_index`` flag is ignored). Does not work for negative values of `n`. Returns ...
https://github.com/pandas-dev/pandas/issues/9772
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jonas/Code/pandas/pandas/core/groupby.py", line 986, in head in_head = self._cumcount_array() < n File "/home/jonas/Code/pandas/pandas/core/groupby.py", line 1044, in _cumcount_array cumcounts[indices] = values IndexError: index 10 is ou...
IndexError
def safe_sort( values, codes=None, na_sentinel: int = -1, assume_unique: bool = False, verify: bool = True, ) -> Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]: """ Sort ``values`` and reorder corresponding ``codes``. ``values`` should be unique if ``codes`` is not None. Safe for ...
def safe_sort( values, codes=None, na_sentinel: int = -1, assume_unique: bool = False, verify: bool = True, ) -> Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]: """ Sort ``values`` and reorder corresponding ``codes``. ``values`` should be unique if ``codes`` is not None. Safe for ...
https://github.com/pandas-dev/pandas/issues/36562
In [79]: x = ['b', 'b', 'c', 'a', 'b', np.nan] ...: y = ['a', 'b', 'c', 'a', 'b', 'd'] ...: mi1 = pd.MultiIndex.from_arrays( ...: [x, [1, 2, 3, 4, 5, 6]], ...: names=['a', 'b'] ...: ) ...: df = pd.DataFrame({'c': [1, 1, 1, 1, 1, 1]}, index=mi1) ...: mi2 = pd.MultiIndex.from_arrays( ...: [y, [1, 1, 1, 1, 1, ...
TypeError