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

Initial States Generation Fail #327

Open
dmachi opened this issue Feb 27, 2023 · 1 comment
Open

Initial States Generation Fail #327

dmachi opened this issue Feb 27, 2023 · 1 comment
Assignees

Comments

@dmachi
Copy link
Contributor

dmachi commented Feb 27, 2023

When this initial states method is called, the simulation fails:

        "initial_states_method": [
            {
                "type": "custom",
                "number_nodes": 1,
                "state": "1",
                "node_selection_method": "random-weighted",
                "node_selection_criteria": [
                    {
                        "property": "clustering-coefficient",
                        "ordering": "ignore",
                        "min": 0,
                        "max": 2,
                        "weight": 2
                    }
                ]
            }
        ],

Here is the output log:

*********************
    Begin Primary 
*********************
Configuring with 1 processes
Running TransitionGen:  python3 /csonnet-input-file-generation/transition_rules_file/src/transitiongen.py -i /input/supInput.json -o /input/rules_file -d /csonnet-input-file-generation/transition_rules_file/test/rule_set_csonnet_v3.json
Loading rule data from:  /csonnet-input-file-generation/transition_rules_file/test/rule_set_csonnet_v3.json
rule data loaded
Loading JSON data from:  /input/supInput.json
JSON data loaded
Begin generate...
Loaded Rules:  2
Generating Rule  1
1
Cause string
[1]
{'Parameter_1': 'edge_probability_value'}
edge_probability: casting parameter to float
1  of  2  completed
Generating Rule  2
{'Parameter_1': 'discrete_time_auto_value'}
2  of  2  completed
Generation complete
2  rules were written
executed in  0.0021278858184814453
file created at:  /input/rules_file
Graph file name: /input/input_file
Check for blocking_nodes
Generating Seed Config:
---- Start Execution ----
Reading job file: /job/job.json
Debug Mode: True
Output Location: /input/seedconfig
Itteration: 0
type: custom
state: 1
number_nodes: 1
node_selection_method: random-weighted
criterion property: clustering-coefficient
criterion ordering: ignore
criterion min: 0
criterion max: 2
criterion weight: 2
Total execution time was:  0.0017235279083251953 seconds
---- Good Execution ----
Execute Initial States Generator: python3 /csonnet-input-file-generation/inital_states_file/seed-graph/src-v01/genSeedSetsCsonnet.py --inputGraphEdges /input/input_file --finalSelection rand_weight --seedConfig /input/seedconfig --randomNumberSeed 6213 --separator space --srcColIdx 0 --dstColIdx 1 --defaultState 0 --activeState 1 --numSets 1 --numActivated 1 --isNodeTypeInt 1 --isDirected 0 --isMultigraph 0 --process multi --initCondFile /input/initial_states_file --seedLogFile /output/seed.log.out --filterLogFile /output/filter.log.out
Reading config
Graph read started ...
Graph read finished in 0.0002211072 seconds(s)
5 nodes and 4 edges read.
Computing metrics
Invoking multiprocessing to compute metrics
Parallel metric computation started ...
Computation of clustcf started ...
Computation of clustcf finished in 0.0093127266 seconds(s)
Metric computation finished in 0.2278934466 seconds(s)
       clustcf
count      5.0
mean       0.0
std        0.0
min        0.0
25%        0.0
50%        0.0
75%        0.0
max        0.0
Node filtering finished in 0.0003275014 seconds(s)
Info: clustcf will be ignored in the final node score
Sampling nodes and writing output files
Info: A seed is being used for random number generator
Launching Simulations...
   Error
   Nodes in graph file and nodes in initial states file are different.
   Nodes in graph file are  [14, 16, 18, 20, 22]
   Nodes in initial states file are  set()
   Terminate

And here is the stderr:

(sciduct_env) bash-4.2$cat job.stderr 
Traceback (most recent call last):
  File "/csonnet-input-file-generation/inital_states_file/seed-graph/src-v01/genSeedSetsCsonnet.py", line 941, in <module>
    main()
  File "/csonnet-input-file-generation/inital_states_file/seed-graph/src-v01/genSeedSetsCsonnet.py", line 930, in main
    sampleNodesWriteOutput(args, node_id_list, filtered_frame.index.values, prob_array)
  File "/csonnet-input-file-generation/inital_states_file/seed-graph/src-v01/genSeedSetsCsonnet.py", line 636, in sampleNodesWriteOutput
    seed_nodes = np.sort(rng.choice(filtered_nodes, num_activated, False, prob_array))
  File "_generator.pyx", line 644, in numpy.random._generator.Generator.choice
ValueError: probabilities contain NaN
srun: error: udc-aj36-1c1: task 0: Exited with exit code 1
srun: launch/slurm: _step_signal: Terminating StepId=47156062.1
@dmachi
Copy link
Contributor Author

dmachi commented May 16, 2023

Is this fixed and ready for me to update?

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

3 participants