Skip to content

AttributeError: module 'fastBPE' has no attribute 'fastBPE' #116

@zhongxiangboy

Description

@zhongxiangboy

Great work~

while I fellow the instructs and finish all the environmental configuration, run usage example

2023-11-29 12:14:00 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX
2023-11-29 12:14:00 | INFO | fairseq.file_utils | loading archive file checkpoints/Pre-trained-BioGPT
2023-11-29 12:14:00 | INFO | fairseq.file_utils | loading archive file data
2023-11-29 12:14:01 | INFO | fairseq.tasks.language_modeling | dictionary: 42384 types
2023-11-29 12:14:04 | INFO | fairseq.models.fairseq_model | {'_name': None, 'common': {'_name': None, 'no_progress_bar': False, 'log_interval': 100, 'log_format': None, 'tensorboard_logdir': None, 'wandb_project': None, 'azureml_logging': False, 'seed': 1, 'cpu': False, 'tpu': False, 'bf16': False, 'memory_efficient_bf16': False, 'fp16': True, 'memory_efficient_fp16': False, 'fp16_no_flatten_grads': False, 'fp16_init_scale': 128, 'fp16_scale_window': None, 'fp16_scale_tolerance': 0.0, 'min_loss_scale': 0.0001, 'threshold_loss_scale': None, 'user_dir': None, 'empty_cache_freq': 0, 'all_gather_list_size': 16384, 'model_parallel_size': 1, 'quantization_config_path': None, 'profile': False, 'reset_logging': False, 'suppress_crashes': False, 'use_plasma_view': False, 'plasma_path': '/tmp/plasma'}, 'common_eval': {'_name': None, 'path': None, 'post_process': ............., 'lr': [0.0002]}, 'lr_scheduler': {'_name': 'inverse_sqrt', 'warmup_updates': 20000, 'warmup_init_lr': 1e-07, 'lr': [0.0002]}, 'scoring': {'_name': 'bleu', 'pad': 1, 'eos': 2, 'unk': 3}, 'bpe': {'_name': 'fastbpe', 'bpe_codes': 'data/bpecodes'}, 'tokenizer': {'_name': 'moses', 'source_lang': 'en', 'target_lang': 'en', 'moses_no_dash_splits': False, 'moses_no_escape': False}, 'simul_type': None}
Traceback (most recent call last):
File "test.py", line 3, in
m = TransformerLanguageModel.from_pretrained(
File "/home/lpc/miniconda3/lib/python3.8/site-packages/fairseq/models/fairseq_model.py", line 275, in from_pretrained
return hub_utils.GeneratorHubInterface(x["args"], x["task"], x["models"])
File "/home/lpc/miniconda3/lib/python3.8/site-packages/fairseq/hub_utils.py", line 108, in init
self.bpe = encoders.build_bpe(cfg.bpe)
File "/home/lpc/miniconda3/lib/python3.8/site-packages/fairseq/registry.py", line 61, in build_x
return builder(cfg, *extra_args, **extra_kwargs)
File "/home/lpc/miniconda3/lib/python3.8/site-packages/fairseq/data/encoders/fastbpe.py", line 27, in init
self.bpe = fastBPE.fastBPE(codes)
AttributeError: module 'fastBPE' has no attribute 'fastBPE'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions