Skip to content

bug: Trim fails if outputDirectory is not set #1226

Description

@christian-pinto

Issue Description

if the outputDirectory parameter is not set in a trim operation the documentation states the arg defaults to none and output files are going to be saved in a temp location.

outputDirectory
Type: str | None

Default: None

Tuning Guidance: Always set this explicitly. If not set, models may be saved to a temporary location and lost.

In reality, if outputDirectory is omitted the operation fails saving the output files and crashes at the very end

The issue is here:

if should_stop:
# Stopping info
self.params.finalModelAutoGluonArgs.tabularPredictorArgs["path"] = (
self.params.finalModelAutoGluonArgs.tabularPredictorArgs.get(
"path", self.params.outputDirectory
)
+ "_finalized"
)

if outputDirectory is None it should be replaced with a "". Autogluon will then save to "./_finalized"

How to reproduce

Run a TRIM operation omitting the outputDirectory field.

Expected behaviour

Outputs to be saved directly in the current working directory

Screenshots/Logs

message: "Operation exited due to the following error from a Ray Task: \e[36mray::RandomWalk.run()\e\
    [39m (pid=352390, ip=10.130.24.112, actor_id=58987b9c24363bbb293532c650000000,\
    \ repr=<ado.modules.operators.randomwalk.RandomWalk object at 0x7f5fa6f940d0>)\n\
    \  File \"/home/ray/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line\
    \ 456, in result\n    return self.__get_result()\n           ^^^^^^^^^^^^^^^^^^^\n\
    \  File \"/home/ray/anaconda3/lib/python3.11/concurrent/futures/_base.py\", line\
    \ 401, in __get_result\n    raise self._exception\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\
    \  File \"/tmp/ray/session_2026-07-02_23-28-37_581176_1/runtime_resources/uv/9456699ae58c80eb8e835b4e6772f5a54a1a4fe6/virtualenv/lib/python3.11/site-packages/ado/modules/operators/randomwalk.py\"\
    , line 718, in run\n    await self._sampleEntityAndAddMeasurementsToQueue(\n \
    \          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/tmp/ray/session_2026-07-02_23-28-37_581176_1/runtime_resources/uv/9456699ae58c80eb8e835b4e6772f5a54a1a4fe6/virtualenv/lib/python3.11/site-packages/ado/modules/operators/randomwalk.py\"\
    , line 897, in _sampleEntityAndAddMeasurementsToQueue\n    entities = await anext(iterator)\n\
    \               ^^^^^^^^^^^^^^^^^^^^^\n  File \"/tmp/ray/session_2026-07-02_23-28-37_581176_1/runtime_resources/uv/9456699ae58c80eb8e835b4e6772f5a54a1a4fe6/virtualenv/lib/python3.11/site-packages/trim/trim_sampler.py\"\
    , line 478, in async_wrapper\n    for entity_batch in self._core_iterator_logic(\n\
    \  File \"/tmp/ray/session_2026-07-02_23-28-37_581176_1/runtime_resources/uv/9456699ae58c80eb8e835b4e6772f5a54a1a4fe6/virtualenv/lib/python3.11/site-packages/trim/trim_sampler.py\"\
    , line 433, in _core_iterator_logic\n    self.params.finalModelAutoGluonArgs.tabularPredictorArgs.get(\n\
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'."

Python/ado/system info

Please include the output of:

python --version
ado version
Your OS

Note: If you installed ado in editable mode (e.g., pip install -e .) or
ran uv sync, the version metadata may not be up to date. Please reinstall to
get an accurate version number:

# If you used uv sync:
uv sync --reinstall

# If you used pip install -e:
pip install -e . --force-reinstall --no-deps

Additional information

Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions