-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Right now, the trace.txt uses the tag which is simply set to $id to figure out which process is linked to which component. However, the structure of the id is highly dependant on the task and component being run, as different steps will add on extra info to the id. Example, a predict modality metric: openproblems_neurips2022/pbmc_multiome/normal/log_cp10k.guanlab_dengkw_pm.correlation.
I'd be useful if methods and metrics could have their tag set to something that is machine interpretable, e.g. a json {"dataset_id": ..., "normalization_id": ..., ...}. Fundamentally, it would probably be a good idea to implement this at a Viash level, so we can do something like:
| component.run(
auto: [
tag: { id, state ->
toJsonBlob([dataset_id: state.dataset_id])
}
]
)However, perhaps there is something we can already do right now. The issue is that the tag is currently limited to the information that the underlying process has access to, namely:
input: tuple val(id), path(viash_par_input_mod1), path(viash_par_mod2), val(args), path(resourcesDir)
In here, id is self-explanatory, input_mod1 and input_mod2 correspond to input files used by the component, and args are all other arguments a component has.
That's why we are able to use tag: "$id". I suppose that doesn't leave much room for other arguments, unless we add an optional name: --tag, type: string argument to all methods and metrics so that we can use them for setting tag: "${args.tag ?: id}".
@KaiWaldrant WDYT?