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

composite problem #265

Open
MA-Kochen opened this issue Jun 2, 2024 · 4 comments
Open

composite problem #265

MA-Kochen opened this issue Jun 2, 2024 · 4 comments

Comments

@MA-Kochen
Copy link

Using the composite problem method returns the following error:

AttributeError: 'CompositeProblem' object has no attribute 'extensions_config'

Suggestions?

@dweindl dweindl transferred this issue from PEtab-dev/PEtab Jun 3, 2024
@dilpath
Copy link
Member

dilpath commented Jun 3, 2024

Hi @MA-Kochen

I'm not too sure about your setup, could you describe your composite problem in a few sentences, and provide the PEtab problem if possible? I could then try to reproduce the error or suggest alternatives. Which tool(s) do you intend to work with for simulation/parameter estimation?

@MA-Kochen
Copy link
Author

I have two SBML models (different experiments) with associated data and I'm trying to find a common set of parameters. Each model has multiple sub-experiments which I've defined in the relevant tsv files. I'm using the develop branch of PyPesto with the new roadrunner implementation.

Note that I've since redefined the problem as a single PeTab problem (combining the two and using a more extensive experimental conditions file). This seems to have side stepped the issue.

Setup looks like this:

petab_yaml1 = './egfr/egfr1.yaml'
petab_yaml2 = './egfr/egfr2.yaml'

petab_problem1 = petab.Problem.from_yaml(petab_yaml1)
petab_problem2 = petab.Problem.from_yaml(petab_yaml2)
petab_problem = petab.CompositeProblem(problems=[petab_problem1, petab_problem2])

importer = pypesto_rr.PetabImporterRR(petab_problem)

The full Traceback is

Traceback (most recent call last):
  File "/home/michael/PycharmProjects/pyPESTO/doc/example/EGFR.py", line 20, in <module>
    importer = pypesto_rr.PetabImporterRR(petab_problem)
  File "/home/michael/PycharmProjects/pyPESTO/pypesto/objective/roadrunner/petab_importer_roadrunner.py", line 62, in __init__
    if petab.lint_problem(petab_problem):
  File "/home/michael/anaconda3/envs/pypestorr/lib/python3.10/site-packages/petab/lint.py", line 870, in lint_problem
    if problem.extensions_config:
AttributeError: 'CompositeProblem' object has no attribute 'extensions_config'

@MA-Kochen
Copy link
Author

One of the YAML files:

format_version: 1
parameter_file: parameters.tsv
problems:
  - condition_files:
    - experimental_conditions_a.tsv
    measurement_files:
    - measurement_data_a.tsv
    observable_files:
    - observables_a.tsv
    sbml_files:
    - EGFR_8a.xml

@dilpath
Copy link
Member

dilpath commented Jun 3, 2024

Thanks for sharing. I think your current fix is the way to go. Your use case of combining multiple PEtab problems looks uncommon to me, and there is probably little tool support available for it. One approach could be to use the AggregatedObjective in pyPESTO, but this probably requires some implementation effort.

A minor point: you may be able to combine your two conditions files simply by listing them both in the YAML file -- maybe that helps if you are trying to keep the two parts as separate as possible. As long as the condition IDs remain unique across both files, it should be fine. If you try this and want further advice, I would ask for the full set of PEtab files, or a minimal working example (via email is also fine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants