Model input and output data file formats

With your Decision Optimization model you can use the following input and output data identifiers and extension combinations.

This table shows the supported file type combinations for Decision Optimization in Watson Machine Learning:
Model type Input file type Output file type Comments
cplex
.lp
.mps
.sav
.feasibility
.prm
.xml
.json
The output format can be specified using the API.

Files of type .lp, .mps, and .sav can be compressed using gzip or bzip2, and uploaded as, for example, .lp.gz or .sav.bz2.

The schemas for the CPLEX formats for solutions, conflicts, and feasibility files are available for you to download. Click here to download them in a .zip archive.

cpo .cpo
.xml
.json
The output format can be specified using the solve parameter.

The native file format for CPO models is documented in the Knowledge Center: CP Optimizer file format syntax.

opl
.mod
.dat
.oplproject
.xls
.json
.csv
.xml
.json
.txt
.csv
The output format is consistent with the input type but can be specified using the solve parameter if needed. To take advantage of data connectors, use the .csv format.

To read and write input and output in OPL, see OPL models.

docplex
.py
*.* (input data)
Any output file type, specified in the model Any format can be used in your Python code, but to take advantage of data connectors, use the .csv format.

To read and write input and output in Python, use the commands get_input_stream("filename") and get_output_stream("filename"). See DOcplex API sum example.

Data identifier restrictions

A file name

  • is limited to 255 characters;
  • can include only ASCII characters;
  • cannot include the characters /\?%*:|"<>, the space character, or the null character; and
  • cannot include _ as the first character.