The main goal of 2.0.0 is that finding a better dimension order becomes a repeatable, auditable workflow rather than a one-off script run. In 1.x you described a run with command-line flags; in 2.0.0 each cube is described in a JSON file you can keep, share and run again, or you drive the whole thing from a local web UI. This page is the tour; the CHANGELOG is the record.
New to OptimusPy? We'd recommend starting with the User Guide instead, because it walks you through a first run end to end.
New¶
- Web UI. Start it with
optimuspy ui, or double-click the executable. It opens athttp://127.0.0.1:8765with these pages: Optimize, Reports, Sync Order, Optimize DB and Settings, plus a Jobs list. See the UI Overview. - Modes.
optimizebenchmarks orders for one cube, in one of four ways: Greedy (with an optional Fast mode), Predefined (orders you list), Position (the best dimension for one slot) and Dimension (the best slot for one dimension). Alongside it,setapplies one order without benchmarking,scanlists the cubes worth optimizing, andoptimize-dbreorders every cube on an instance by leaf-element count within a time limit, benchmarking nothing except the last slot of the cubes you pick. - Several views and TI processes per run.
viewsandprocessestake lists, andprocess_parameterssets parameters per process. Each runsexecutionstimes, and the median counts, so one slow execution doesn't skew the result. See Multi-View / Multi-Process. - The same greedy search as 1.x. It fills the slots from the outside in, last slot first, and measures every remaining dimension at each one; Fast mode stops after the last and first slots. A run logs how many orders it will measure before it starts, and each progress line reads
Iteration k of N. See The Greedy Search. - Dimension position rules.
dimension_position_ruleskeeps a dimension at a fixed position while the rest are tested, andorders_to_ignoreskips orders you don't want tested. See Dimension Position Rules. - An HTML report for every run. Summary cards, the recommended order, a chart of memory against query time relative to the original order, a podium with the best order per metric, and the full sortable table. See the Reports Page.
- Checkpoint and resume. Run the same
optimizecommand again and it continues where a stopped or failed run left off, including the order that was in flight.--no-resumestarts over, and--tm1-checkpointkeeps the checkpoint in TM1's file storage for environments without a persistent disk. See Checkpoints & Resume. - Sync Order and exported orders. The Sync Order page copies storage orders from one instance to another, and can export them to
exports/as JSON configs thatoptimuspy setapplies. See the Sync Order Page and Exporting & Importing Orders. - Settings page. It links the
config.iniyou already keep for RushTI or your scripts, or copies it intoconfig/config.ini, then shows each instance read-only with Test Connection. The choice is shared with the CLI. See the Settings Page. - A settings file.
config/settings.iniremembers the linkedconfig.ini, the UI's port and whether it opens a browser. It's optional; the bundle shipsconfig/settings.ini.example. See Settings File. - TM1 v12 (PAoC / PAaaS) alongside v11. Memory is read through TM1py's Metrics service on both, and the VMM / VMT override only happens on v11, where those settings exist. See VMM / VMT Handling.
-v/--verboselogs the reason each skipped order was refused. See Optimization Logging.- Windows and Linux bundles. Each holds the executable,
config/config.ini.example,config/settings.ini.exampleand the sample cube configs, so nothing needs installing. See Installation.
Changed¶
- Command line. The command is now
optimuspy <mode> <cube_config.json>(orpython -m optimuspy, orpython optimuspy.pyfrom a clone), and the 1.x flags are gone. See the CLI Reference. - Where
config.inilives. It's read from the file given with--config, else the file linked on the Settings page, elseconfig/config.iniin the folder you run from (for the bundle, the executable's folder). OptimusPy doesn't edit it, so it can be shared with other TM1py tools. See TM1 Connection. - Where the log is written.
logs/optimuspy.login the install folder: the executable's folder for the bundle, the repository root for a clone. 1.x wroteoptimuspy.login the folder you ran from. - Result files. They go in
results/<instance>/, named<instance>_<cube>_<timestamp>, without the view or process in the name. An HTML report is always written, and it replaces the 1.x.pngchart. - Python 3.11 or later, installed with pip along with the dependencies (TM1py 2.3.0 or later). matplotlib and seaborn are no longer needed.
Removed¶
- Benchmarking every cube with one command. In 1.x, leaving out
-cbenchmarked every cube that had the given view. 2.0.0 benchmarks one cube per config. To cover a whole instance, usescan --outputto write a config for each candidate cube, or runoptimize-db, which reorders every cube by leaf count and measures only the last slot of the cubes you pick.
Upgrading from 1.x¶
- Install 2.0.0. Unzip the Windows or Linux bundle, or with Python 3.11 or later clone the repository and run
pip install -e .. See Installation. - Move
config.iniinto aconfigfolder. 2.0.0 readsconfig/config.ini; aconfig.inisitting next to the executable is not read. The instance sections keep the same format. To leave the file where it is, pass--config path/to/config.ini. -
Turn each command into a JSON cube config. A 1.x command stops with
error: unrecognized argumentsorinvalid choice, exit code 2, before it connects. For example, this 1.x command:optimuspy.py -i my_instance -c Sales -v Optimus -e 10 -f True -o csv -u True -t load.csv.file -d Time,Versionbecomes
optimuspy optimize sales.json, wheresales.jsoncontains:{ "instance": "my_instance", "cube": "Sales", "views": ["Optimus"], "processes": ["load.csv.file"], "executions": 10, "fast": true, "output": "csv", "update": true, "dimensions_to_exclude": ["Time", "Version"] }1.x flag 2.0.0 -i,--instance"instance"-c,--cube"cube", now required (see Removed)-v,--view"views", a list. On the command line,-vnow means--verbose-e,--executions"executions", now required (1.x defaulted to 15)-d,--dimensions_to_exclude"dimensions_to_exclude", a list instead of a comma-separated string-f,--fast"fast",trueorfalse-o,--output"output","csv"or"xlsx", now required. On the command line,--outputis now scan's folder for generated configs-u,--update"update"(or"auto_apply")-p,--passwordUnchanged: -p/--passwordon the command line-t,--process"processes", a listEvery field is listed in the JSON Config Reference. 4. Look for results in a folder per instance. Each run writes
results/<instance>/<instance>_<cube>_<timestamp>.html, plus a.csvor.xlsxof the same name. See the Reports Page.
Design notes¶
The pages above describe how to use each feature. For the reasoning behind the bigger design decisions (the order frame and the locked slot, the Optimize DB pass, the checkpoint format, position rules, and what changes between v11 and v12), see the Design Notes section.