diff --git a/tools/ckpts/convert_hf_to_sequential.py b/tools/ckpts/convert_hf_to_sequential.py index 3d4f756ed..8a3902bce 100644 --- a/tools/ckpts/convert_hf_to_sequential.py +++ b/tools/ckpts/convert_hf_to_sequential.py @@ -14,7 +14,7 @@ from transformers import GPTNeoXForCausalLM, GPTNeoXConfig sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) from megatron.neox_arguments import NeoXArgs from megatron.training import get_model, get_optimizer, get_learning_rate_scheduler diff --git a/tools/ckpts/convert_module_to_hf.py b/tools/ckpts/convert_module_to_hf.py index 5a147f218..f3f43c308 100644 --- a/tools/ckpts/convert_module_to_hf.py +++ b/tools/ckpts/convert_module_to_hf.py @@ -25,7 +25,7 @@ sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) from megatron.tokenizer import build_tokenizer diff --git a/tools/ckpts/convert_sequential_to_hf.py b/tools/ckpts/convert_sequential_to_hf.py index d38184131..f0a505ac3 100644 --- a/tools/ckpts/convert_sequential_to_hf.py +++ b/tools/ckpts/convert_sequential_to_hf.py @@ -25,7 +25,7 @@ from typing import List sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) from megatron.tokenizer import build_tokenizer diff --git a/tools/datasets/merge_datasets.py b/tools/datasets/merge_datasets.py index c5d1e6255..4239c5eb5 100644 --- a/tools/datasets/merge_datasets.py +++ b/tools/datasets/merge_datasets.py @@ -4,7 +4,7 @@ import argparse sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) from megatron.data import indexed_dataset diff --git a/tools/datasets/preprocess_data.py b/tools/datasets/preprocess_data.py index 862620eb8..e780bec34 100644 --- a/tools/datasets/preprocess_data.py +++ b/tools/datasets/preprocess_data.py @@ -26,7 +26,7 @@ import numpy as np sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) import time import tqdm diff --git a/tools/datasets/preprocess_data_with_mask.py b/tools/datasets/preprocess_data_with_mask.py index 83447dd12..093d94b2f 100644 --- a/tools/datasets/preprocess_data_with_mask.py +++ b/tools/datasets/preprocess_data_with_mask.py @@ -62,7 +62,7 @@ import numpy as np sys.path.append( - os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) ) import time import tqdm