Skip to content

openai tools fine_tunes.prepare_data does not accept indented JSON files #206

Closed
@reinvantveer

Description

@reinvantveer

To reproduce:

pip install --user openai[datalib]==0.26.4 

# Works fine:
echo '[{"prompt": "Here is my example input 1", "completion": "Complete to 1"}, {"prompt": "Here is my example input 2", "completion": "Complete to 2"}]' > unindented.json
openai tools fine_tunes.prepare_data --quiet --file unindented.json

# Doesn't work:
cat > to_indented.py << EOF
import json
with open('unindented.json', 'rt') as f:
    data = json.loads(f.read())
# Simple rewrite of the "unindented.json": output to indented version
with open('indented', 'wt') as f:
    f.write(json.dumps(data, indent=2))
EOF
python to_indented.py
openai tools fine_tunes.prepare_data -f indented.json

Metadata

Metadata

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