Skip to content

Adds build_paramDict#26

Open
dinskid wants to merge 13 commits intovollmersj:masterfrom
dinskid:paramDict
Open

Adds build_paramDict#26
dinskid wants to merge 13 commits intovollmersj:masterfrom
dinskid:paramDict

Conversation

@dinskid
Copy link
Copy Markdown
Collaborator

@dinskid dinskid commented Jun 18, 2020

Creates a named tuple instead of OrderedDict(). It can be buggy, cos it used REs and a lot of string manipulation from the source code. But to my understanding, it works

@vollmersj
Copy link
Copy Markdown
Owner

It is quite involved approach there must be better way of doing this.

@ChrisRackauckas
Copy link
Copy Markdown
Collaborator

Why is there any string parsing here? I don't get the purpose of this.

@ChrisRackauckas
Copy link
Copy Markdown
Collaborator

Are you trying to take an OrderedDict and convert it to a NamedTuple?

@dinskid
Copy link
Copy Markdown
Collaborator Author

dinskid commented Jun 19, 2020

I want to get the functionality of the inspect module from python, more specifically, the getfullargspec() function. I couldn't find an equivalent one in Julia. I've made a post as well here https://discourse.julialang.org/t/function-parameter-speculation-in-runtime/41523, but I wasn't able to get an answer. So I had to do this to get it working

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #26 into master will decrease coverage by 0.26%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #26      +/-   ##
=========================================
- Coverage    8.81%   8.55%   -0.27%     
=========================================
  Files           5       6       +1     
  Lines        1372    1414      +42     
=========================================
  Hits          121     121              
- Misses       1251    1293      +42     
Impacted Files Coverage Δ
src/diseaseProg.jl 61.41% <0.00%> (ø)
src/diseaseProg_withCallableStructs.jl 0.00% <0.00%> (ø)

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 55bf964...5d62eb3. Read the comment docs.

@dinskid
Copy link
Copy Markdown
Collaborator Author

dinskid commented Jun 28, 2020

Changed it to a callable struct now. Only issue with this is to call a function, one must write ()(args); the first set of () for creating an instance of the struct. Is this way better? @vollmersj @ChrisRackauckas

Comment thread src/diseaseProg_withCallableStructs.jl Outdated
@dinskid
Copy link
Copy Markdown
Collaborator Author

dinskid commented Jun 30, 2020

Converted all the functions!

@dinskid
Copy link
Copy Markdown
Collaborator Author

dinskid commented Jun 30, 2020

I've converted the functions in the highlevel to callable structs as well and have made the nested whenever possible(when a function uses another, I've made it a member of the parent-for a hierarchical structure). As of now, the solveSystem puts out the solution, but I am not able to get the solveSystem working with the speedup made by @ChrisRackauckas, as it errors out.

If @ChrisRackauckas or @vollmersj can help me out with this, it will be great. (Note: I've commented out the part that optimises the model)

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.

4 participants