FedericoCinus / WoMG

WoMG: Word of Mouth Generator
3 stars 0 forks source link

WoMG flow: use input and output of methods instead of saving and reading temporary files #22

Closed FedericoCinus closed 5 years ago

FedericoCinus commented 5 years ago

Put network model and topic model as input of diffusion model

corradomonti commented 5 years ago

In __main__.py, there should be a structure where the network model, the topic model are created with their constructor, then used as input to create the diffusion model, which is then finally used through a run() method to generate the propagation. At the moment, all those flows are hidden behind saving and loading temporary files in paths known internally within these object, which is slow and makes debugging and maintaining much harder.

FedericoCinus commented 5 years ago

Done in commit 76a623bfb65f2f7661bd6f56e513eb9add397dd5

Schermata 2019-06-06 alle 12 28 28

corradomonti commented 5 years ago

So since temporary files are not used anymore the Hidden_ hack is now not needed, correct?

FedericoCinus commented 5 years ago

No. The Hidden_ keyword is used in save_modelattr() in order to avoid saving (in txt files) the not necessary attributes. The Hidden keyword can be removed after issue #20 completion. What I have just done is deleting the save_model_class() method which was generating the temporary file of the all class with a pickle file; so now what is not needed is the cleaning() method. I am going to check and remove it.