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

Can't suppress verbose infomap output in python 3.6 #11

Open
dkori opened this issue Jul 12, 2020 · 2 comments
Open

Can't suppress verbose infomap output in python 3.6 #11

dkori opened this issue Jul 12, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@dkori
Copy link

dkori commented Jul 12, 2020

I developed code that used infostop in python 3.7.1. When I run the algorithm with the "verbose=False" option, the option seems to function correctly and no output is printed.

However, I am currently trying to run these scripts in a remote environment where only python 3.6 is available, and despite using the verbose=False option, running the code prints an output like the sample below:

  Infomap v1.1.3 starts at 2020-07-12 20:16:14
  -> Input network: 
  -> No file output!
  -> Configuration: two-level
=======================================================
  -> Ordinary network input, using the Map Equation for first order network flows
Calculating global network flow using flow model 'undirected'... 
  -> Using undirected links.
  => Sum node flow: 1, sum link flow: 1
Build internal network with 6 nodes and 15 links...
Calculating one-level codelength... done!
 -> One-level codelength: 2.5849625
Calculating entropy rate... done!
  -> Entropy rate: 1.151148433

================================================
Trial 1/1 starting at 2020-07-12 20:16:14
================================================
Two-level compression: 3.4e-14% 
Partitioned to codelength 1.11022302e-16 + 2.5849625 + 0 = 2.584962501 in 1 (0 non-trivial) modules.

=> Trial 1/1 finished in 7.4e-05s with codelength 2.5849625


================================================
Summary after 1 trial
================================================
Best end modular solution in 2 levels:
Per level number of modules:         [          1,           0] (sum: 1)
Per level number of leaf nodes:      [          0,           6] (sum: 6)
Per level average child degree:      [          1,           6] (average: 5.28571)
Per level codelength for modules:    [0.000000000, 0.000000000] (sum: 0.000000000)
Per level codelength for leaf nodes: [0.000000000, 2.584962501] (sum: 2.584962501)
Per level codelength total:          [0.000000000, 2.584962501] (sum: 2.584962501)

===================================================
  Infomap ends at 2020-07-12 20:16:14
  (Elapsed time: 0.000451s)
===================================================
=======================================================

The python 3.6 environment has infostop 0.1.6 and infomap 1.1.3 installed. Is there any way to suppress the infomap output when using Python 3.6?

@ulfaslak
Copy link
Owner

The verbose argument is to limit the output displayed by Python. This is output displayed by Infomap. But it would make sense to not yield output from Infomap at all. Will have a look.

@ulfaslak ulfaslak added the enhancement New feature or request label Jul 19, 2020
@ulfaslak
Copy link
Owner

Check the latest commit 48446a3, does it solve your problem? I basically just supress Infomap output when verbose==False.

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

No branches or pull requests

2 participants