Can't start the CLI data preparation tool

Dear All

I tried to to prepare my dataset, currently in .csv format, with the CDLI data preparation tool.

However, when I enter the following command, I receive the following error:

openai tools fine_tunes.prepare_data -f "myfile.csv"
usage: openai [-h] [-v] [-b API_BASE] [-k API_KEY] [-o ORGANIZATION] {api} ...
openai: error: invalid choice: 'tools' (choose from 'api')

I am trying to run the command in a freshly installed virtualenvs environment, which I set up for openai and installed the requirec packages.

What am I doing wrong?

Thank you for your guidance.

1 Like

you have an outdated library.

you can run the following command to upgrade

pip install --upgrade openai

1 Like

The below CSV format should work, where one column is “prompt” and another “completion”:

prompt,completion
prompt_text1,completion_text1
prompt_text2,completion_text2

If you still run into this error after an upgrade, it would be good to confirm that you are using the required version of Python.

The installation may still be successful with older version of Python, but will not contain the updated CLI functionality.

1 Like