LLaVA-NeXT icon indicating copy to clipboard operation
LLaVA-NeXT copied to clipboard

dpo_ov7b.sh imports data_processing which is missing

Open bluesky333 opened this issue 1 year ago • 4 comments

In train_dpo.py line 41, it imports data_processing which is removed in the latest commit. from data_processing.utils import load_jsonl, load_json ModuleNotFoundError: No module named 'data_processing'

bluesky333 avatar Sep 17 '24 08:09 bluesky333

+1

xushilin1 avatar Nov 04 '24 05:11 xushilin1

same issue. Any solution?

Liuziyu77 avatar Dec 30 '24 10:12 Liuziyu77

+1

jbjeong91 avatar Feb 13 '25 12:02 jbjeong91

+1

just remove the import line and add these two functions

def load_jsonl(filepath):
    """Load a JSONL file and return a list of parsed JSON objects."""
    data = []
    with open(filepath, 'r', encoding='utf-8') as f:
        for line in f:
            try:
                json_object = json.loads(line.strip())
                data.append(json_object)
            except json.JSONDecodeError as e:
                print(f"Error decoding JSON on line: {line.strip()} - {e}")
    return data


def load_json(filepath):
    """Load a JSON file and return the parsed data."""
    with open(filepath, 'r', encoding='utf-8') as f:
        return json.load(f)

tobiapoppi avatar Oct 23 '25 02:10 tobiapoppi