Skip to content

test_synthesizer_mp.py crashes after completing MP synthesizer computation #1

@wesmwoo

Description

@wesmwoo

Thank you for sharing this very cool project!

I have been trying to run test_synthesizer_mp.py on my local machine. After a couple days of computation, the MP synthesizer finally finished. However, in the "Generating Operational Satellite Data" step, it seems a syntax error has caused the test program to crash before saving the results of the MP synthesizer.

Below is the output:

...
Residual demand: 36.52053035001177
100%|██████████████████████████████████████████████████████████████████████████████████████████| 1247400/1247400 [01:56<00:00, 10747.67it/s]
Selected: [573, 1.2137971616142382, 0.49418311404783266] 87
Residual demand: 26.98103163669689
Processing Synthesis Results...
Generating Operational Satellite Data...
Traceback (most recent call last):
  File "/home/wesley/TinyLEO/network_synthesizer/test/test_synthesizer_mp.py", line 65, in <module>
    synthesizer_mp.generate_operation_sat_location(
  File "/home/wesley/TinyLEO/network_synthesizer/synthesizer_mp.py", line 221, in generate_operation_sat_location
    tmp_texture=np.load(self.texture_save_path+str(int(selected[0][0]))+"_"+str(selected[0][1])+"_"+str(selected[0][2])+"_"+str(selected[1])+".npy",allow_pickle=True)[2] # Load texture data
                        ^^^^
NameError: name 'self' is not defined

I was able to patch this locally by adding texture_save_path as a function parameter in generate_operation_sat_location and changing replacing self.texture_save_path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions