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

fix flattening time-point specific override failures #404

Merged
merged 6 commits into from
Mar 23, 2020

Conversation

yannikschaelte
Copy link
Member

fixes #363

@codecov
Copy link

codecov bot commented Mar 22, 2020

Codecov Report

Merging #404 into develop will decrease coverage by 0.05%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #404      +/-   ##
===========================================
- Coverage    77.84%   77.78%   -0.06%     
===========================================
  Files           22       22              
  Lines         2072     2098      +26     
  Branches       476      486      +10     
===========================================
+ Hits          1613     1632      +19     
- Misses         340      343       +3     
- Partials       119      123       +4
Impacted Files Coverage Δ
petab/core.py 82.23% <75%> (-1.9%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4abc8aa...f60ff78. Read the comment docs.

Copy link
Member

@dweindl dweindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @LeonardSchmiester please check that the issues you had are resolved.

@LeonardSchmiester
Copy link
Collaborator

For the Sobotta model I get:

Traceback (most recent call last):
  File "/home/leonard/Anaconda/envs/benchmark_collection/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3319, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-5-73ba67d08c8d>", line 1, in <module>
    flatten_petab_problem = flatten_timepoint_specific_output_overrides(petab_problem)
  File "/home/leonard/Anaconda/envs/benchmark_collection/lib/python3.7/site-packages/petab/core.py", line 178, in flatten_timepoint_specific_output_overrides
    df[OBSERVABLE_PARAMETERS].str.find(cur_sc)
  File "/home/leonard/Anaconda/envs/benchmark_collection/lib/python3.7/site-packages/pandas/core/strings.py", line 1954, in wrapper
    return func(self, *args, **kwargs)
  File "/home/leonard/Anaconda/envs/benchmark_collection/lib/python3.7/site-packages/pandas/core/strings.py", line 3083, in find
    result = str_find(self._parent, sub, start=start, end=end, side="left")
  File "/home/leonard/Anaconda/envs/benchmark_collection/lib/python3.7/site-packages/pandas/core/strings.py", line 1366, in str_find
    raise TypeError(msg)
TypeError: expected a string object, not float

Possibly due to some empty observableParameter / noiseParameter rows.

Additionally I think the function will still scale very badly with the size of the measurement file. Why do we need the <= in lines 159 & 161? Shouldn't == do the job?

@LeonardSchmiester
Copy link
Collaborator

Well, it doesn't throw an error anymore. But the ouput is a nonType object which I guess is not intended!? Might be the same reason as in my comment in #363?

@yannikschaelte yannikschaelte merged commit 8abdd7d into develop Mar 23, 2020
@yannikschaelte yannikschaelte deleted the fix_flatten branch March 23, 2020 12:18
@yannikschaelte yannikschaelte mentioned this pull request Mar 31, 2020
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

Successfully merging this pull request may close these issues.

3 participants