Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in the qualification workflow #991

Closed
Yuri05 opened this issue Feb 10, 2023 · 3 comments
Closed

Crash in the qualification workflow #991

Yuri05 opened this issue Feb 10, 2023 · 3 comments

Comments

@Yuri05
Copy link
Member

Yuri05 commented Feb 10, 2023

When trying to run the qualification workflow from Digoxin-Model.zip the error Unit 'µg/l' is not defined in dimension 'Fraction' comes.

Looking at the RE inputs (re_input.zip) I don't see any problem. I assume RE somehow mixes the axes of the multiaxis plots.

i Info	Starting run of Plot Time Profiles task
10/02/2023 - 17:59:46
! Warning	Type:    OSPSuite.Utility.Exceptions.OSPSuiteException
Message: Unit 'µg/l' is not defined in dimension 'Fraction'.
Method:  Double[] convertToUnit(OSPSuite.Core.Domain.UnitSystem.IDimension, System.String, System.Nullable`1[System.Double], Double[])
Stack trace:
   bei OSPSuite.R.Services.DimensionTask.convertToUnit(IDimension dimension, String targetUnit, Nullable`1 molWeight, Double[] valuesInBaseUnit)
   bei OSPSuite.R.Services.DimensionTask.ConvertToUnit(String dimensionName, String targetUnit, Double[] valuesInBaseUnit, Double molWeight)


	
> Error Trace
	 ↪ createQualificationReport(qualificationRunnerFolder = "C:/Temp/11.1beta/QualificationRunner_11.1.104")
	  ↪ workflow$runWorkflow()
	   ↪ self[[plotTask]]$runTask(self$configurationPlan)
	    ↪ self$getTaskResults(configurationPlan, self$settings)
	     ↪ ifNotNull(timeProfilePlan$Plot$Type, plotQualificationPopulationTimeProfile(simulationAnalysis = timeProfilePlan$Plot$Analysis, 
	      ↪ plotQualificationPopulationTimeProfile(simulationAnalysis = timeProfilePlan$Plot$Analysis, 
	       ↪ ospsuite::toUnit(simulationQuantity, simulationPathResults$data[, 
	        ↪ rClr::clrCall(dimensionTask, "ConvertToUnit", dimension, targetUnit, 
 Error: Type:    OSPSuite.Utility.Exceptions.OSPSuiteException
Message: Unit 'µg/l' is not defined in dimension 'Fraction'.
Method:  Double[] convertToUnit(OSPSuite.Core.Domain.UnitSystem.IDimension, System.String, System.Nullable`1[System.Double], Double[])
Stack trace:
   bei OSPSuite.R.Services.DimensionTask.convertToUnit(IDimension dimension, String targetUnit, Nullable`1 molWeight, Double[] valuesInBaseUnit)
   bei OSPSuite.R.Services.DimensionTask.ConvertToUnit(String dimensionName, String targetUnit, Double[] valuesInBaseUnit, Double molWeight) 
@Yuri05 Yuri05 added this to To do in Version 2.1 / 2.2 via automation Feb 10, 2023
@pchelle
Copy link
Collaborator

pchelle commented Mar 2, 2023

I think I have found the reason.
In population time profiles, the configuration plan usually provides in Plot>Analysis>Fields both dimension and unit.

"Dimension": "Concentration (molar)",
"Scaling": "Log",
"Unit": "µg/l"

However, for that qualification unit is not provided, which makes the reporting engine choose the default axis unit for time profiles µg/l:

"Name": "Digoxin-Kidney-Urine-Fraction excreted to urine",
"Dimension": "Fraction",
"Scaling": "Log",
"QuantityPath": "Organism|Kidney|Urine|Digoxin|Fraction excreted to urine",
"QuantityType": "Drug, Observer",
"Color": "#000000",
"Area": "DataArea"

@pchelle
Copy link
Collaborator

pchelle commented Mar 2, 2023

Should we try to make the RE smart in such case ?
For instance, if Unit is null, then pick the first available unit in ospsuite of the provided dimension.
The code would look like this:

unit <- Fields$Unit %||% head(ospsuite::ospUnits[[Fields$Dimension]], 1)

@Yuri05
Copy link
Member Author

Yuri05 commented Mar 2, 2023

Should we try to make the RE smart in such case ?

But select the base unit for the dimension, not the first one.
If the plot was exported like above, then the unit should be the internal (base) unit of that dimension. @msevestre Can you confirm?

pchelle added a commit to pchelle/OSPSuite.ReportingEngine that referenced this issue Mar 9, 2023
@Yuri05 Yuri05 closed this as completed in b72c236 Mar 9, 2023
Version 2.1 / 2.2 automation moved this from To do to Fixed Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants