Skip to content

docs(trim): clarify requirements on target observed property#602

Open
danielelotito wants to merge 5 commits intomainfrom
dl_598_trim_explain
Open

docs(trim): clarify requirements on target observed property#602
danielelotito wants to merge 5 commits intomainfrom
dl_598_trim_explain

Conversation

@danielelotito
Copy link
Collaborator

@danielelotito danielelotito commented Feb 23, 2026

FIX #598
CLOSE #598

Improves the logging and the docs to address #598

@danielelotito
Copy link
Collaborator Author

danielelotito commented Feb 23, 2026

With reference to #598 .
It would be nice to reference the id of the actuator/experiment in the logging message.
In this way the user will find the info directly from the logs, now he needs to run a separate space related CLI command, or look at their space yaml.
In the relevant part of the code, I can have access to OperationOutput but I do not know how to retrieve the info. The mereasurementResult should have that information but I don't know how you get back the data from randomwalk.

I also have access to the space.
However, the space object does not expose the id in a 'safe way' (i.e. I can do space.measurementSpace.experiments[0].actuatorIdentifier  but accessing that list does not seem a good idea.

How can I tell if I am looking for

  • space.measurementSpace.experiments[0].actuatorIdentifier  or
  • space.measurementSpace.experiments[1].actuatorIdentifier  or
  • ?

@danielelotito danielelotito changed the title Dl 598 trim explain feat(trim): explain to users that TRIM expects measurements that always produce the observed property it tracks Feb 23, 2026
@danielelotito danielelotito marked this pull request as ready for review February 23, 2026 16:51
@AlessandroPomponio AlessandroPomponio changed the title feat(trim): explain to users that TRIM expects measurements that always produce the observed property it tracks docs(trim): clarify requirements on target observed property Feb 24, 2026
@michael-johnston
Copy link
Member

michael-johnston commented Feb 24, 2026

The issue link (#529) is incorrect - can you put the correct one?

I see now its #598

@michael-johnston
Copy link
Member

The mereasurementResult should have that information but I don't know how you get back the data from randomwalk.

If you're looking for information on the last measurement by the operation

  1. Get the operation id from the OperationOutput instance (output.operation.identifier)
  2. Query the space for the timeseries of request/results for that operation (space.measurement_results_for_operation, space.measurement_requests_for_operation). These are in submission order.

If your only submitting one entity at a time, then the last element, space.measurement_results_for_operation(ID)[-1], will be the last result.

@michael-johnston
Copy link
Member

michael-johnston commented Feb 24, 2026

So a little more

  1. Within the sampler

If in the sampler you look for the last result and you don't find it, you know by process of elimination the actuator/experiment that failed as either

  • There is one experiment in the space - its that experiment that failed

  • There are N experiments in the space - for all experiment that passed you will have their ids from the result table. The ones that failed are just the set difference (space identifiers) - (successful results identifiers)

  1. After the operation

If you know that the failure during the sampling (cannot find an expected result) - raises a particular error you can

  1. Inspect OperationOutput.exitStatus.message to see if it matches the error

  2. If so look for the last result following process above (which will be invalid) and will contain the necessary info.

@danielelotito
Copy link
Collaborator Author

The error message now has the required info.
Here an example:

The current version of TRIM assumes that all measurements produce the observed target output property 'pressure'. The measurements obtained with experiment custom_experiments.calculate_pressure_ideal_gas may not produce values for the target output property 'pressure'. This was detected during the no-priors characterization phase: 18 out of 18 requested measurements did not contain the target output property 'pressure'. This is insufficient for starting the Iterative Modeling phase, the operation will exit with an error. For more information, refer to the documentation here: https://ibm.github.io/ado/operators/trim/.

This PR can be reviewed @VassilisVassiliadis .

@AlessandroPomponio AlessandroPomponio added the ci Enables CI integration label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Enables CI integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(trim): explain to users that TRIM expects measurements that always produce the observed property it tracks

3 participants