Ali Amiri 2 years ago
commit
e881dd753b
100 changed files with 2955486 additions and 0 deletions
  1. 3
    0
      .idea/.gitignore
  2. 11
    0
      .idea/GraphRNN.iml
  3. 50
    0
      .idea/deployment.xml
  4. 6
    0
      .idea/inspectionProfiles/profiles_settings.xml
  5. 7
    0
      .idea/misc.xml
  6. 8
    0
      .idea/modules.xml
  7. 16
    0
      .idea/remote-mappings.xml
  8. 6
    0
      .idea/vcs.xml
  9. 23
    0
      .idea/webServers.xml
  10. 171
    0
      .idea/workspace (DESKTOP-13QDL5D's conflicted copy 2019-10-06).xml
  11. 186
    0
      .idea/workspace (DESKTOP-13QDL5D's conflicted copy 2019-10-21).xml
  12. 186
    0
      .idea/workspace (DESKTOP-4R9F6QD's conflicted copy 2019-10-21).xml
  13. 440
    0
      .idea/workspace (DESKTOP-4R9F6QD's conflicted copy 2019-12-20).xml
  14. 164
    0
      GraphCompletion/graph_completion_test.py
  15. 213
    0
      GraphCompletion/graph_completion_test_without_training.py
  16. 675
    0
      GraphCompletion/graph_completion_with_training.py
  17. 86
    0
      GraphCompletion/graph_show.py
  18. 21
    0
      LICENSE
  19. 86
    0
      README.md
  20. 0
    0
      __init__.py
  21. 216
    0
      analysis.py
  22. 119
    0
      args.py
  23. 275
    0
      baselines/baseline_simple.py
  24. 131
    0
      baselines/graphvae/args.py
  25. BIN
      baselines/graphvae/dataset/.DS_Store
  26. 2
    0
      baselines/graphvae/dataset/.idea/.gitignore
  27. 8
    0
      baselines/graphvae/dataset/.idea/dataset.iml
  28. 21
    0
      baselines/graphvae/dataset/.idea/deployment.xml
  29. 6
    0
      baselines/graphvae/dataset/.idea/inspectionProfiles/profiles_settings.xml
  30. 7
    0
      baselines/graphvae/dataset/.idea/misc.xml
  31. 8
    0
      baselines/graphvae/dataset/.idea/modules.xml
  32. 6
    0
      baselines/graphvae/dataset/.idea/vcs.xml
  33. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-1.txt
  34. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-10.txt
  35. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-2.txt
  36. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-3.txt
  37. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-4.txt
  38. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-5.txt
  39. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-6.txt
  40. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-7.txt
  41. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-8.txt
  42. 500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/test_idx-9.txt
  43. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-1.txt
  44. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-10.txt
  45. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-2.txt
  46. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-3.txt
  47. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-4.txt
  48. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-5.txt
  49. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-6.txt
  50. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-7.txt
  51. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-8.txt
  52. 4500
    0
      baselines/graphvae/dataset/COLLAB/10fold_idx/train_idx-9.txt
  53. BIN
      baselines/graphvae/dataset/COLLAB/COLLAB.mat
  54. 377475
    0
      baselines/graphvae/dataset/COLLAB/COLLAB.txt
  55. 1686092
    0
      baselines/graphvae/dataset/DD/DD_A.txt
  56. 334925
    0
      baselines/graphvae/dataset/DD/DD_graph_indicator.txt
  57. 1178
    0
      baselines/graphvae/dataset/DD/DD_graph_labels.txt
  58. 334925
    0
      baselines/graphvae/dataset/DD/DD_node_labels.txt
  59. 75
    0
      baselines/graphvae/dataset/DD/README.txt
  60. 74564
    0
      baselines/graphvae/dataset/ENZYMES/ENZYMES_A.txt
  61. 19580
    0
      baselines/graphvae/dataset/ENZYMES/ENZYMES_graph_indicator.txt
  62. 600
    0
      baselines/graphvae/dataset/ENZYMES/ENZYMES_graph_labels.txt
  63. 19580
    0
      baselines/graphvae/dataset/ENZYMES/ENZYMES_node_attributes.txt
  64. 19580
    0
      baselines/graphvae/dataset/ENZYMES/ENZYMES_node_labels.txt
  65. 71
    0
      baselines/graphvae/dataset/ENZYMES/README.txt
  66. 60
    0
      baselines/graphvae/dataset/ENZYMES/load_data.py
  67. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-1.txt
  68. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-10.txt
  69. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-2.txt
  70. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-3.txt
  71. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-4.txt
  72. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-5.txt
  73. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-6.txt
  74. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-7.txt
  75. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-8.txt
  76. 100
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/test_idx-9.txt
  77. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-1.txt
  78. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-10.txt
  79. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-2.txt
  80. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-3.txt
  81. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-4.txt
  82. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-5.txt
  83. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-6.txt
  84. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-7.txt
  85. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-8.txt
  86. 900
    0
      baselines/graphvae/dataset/IMDBBINARY/10fold_idx/train_idx-9.txt
  87. BIN
      baselines/graphvae/dataset/IMDBBINARY/IMDBBINARY.mat
  88. 20774
    0
      baselines/graphvae/dataset/IMDBBINARY/IMDBBINARY.txt
  89. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-1.txt
  90. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-10.txt
  91. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-2.txt
  92. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-3.txt
  93. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-4.txt
  94. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-5.txt
  95. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-6.txt
  96. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-7.txt
  97. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-8.txt
  98. 150
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/test_idx-9.txt
  99. 1350
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/train_idx-1.txt
  100. 0
    0
      baselines/graphvae/dataset/IMDBMULTI/10fold_idx/train_idx-10.txt

+ 3
- 0
.idea/.gitignore View File

@@ -0,0 +1,3 @@

# Default ignored files
/workspace.xml

+ 11
- 0
.idea/GraphRNN.iml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Remote Python 3.7.3 (sftp://faez@192.168.207.78:22/home/faez/faez_venv/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

+ 50
- 0
.idea/deployment.xml View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="faez@192.168.207.78">
<serverData>
<paths name="faez@192.167.207.71">
<serverdata>
<mappings>
<mapping deploy="/home/faez/Codes/GraphCompletion2" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="faez@192.168.207.71:22">
<serverdata>
<mappings>
<mapping deploy="/home/faez/Codes/GraphCompletion2" local="$PROJECT_DIR$" />
</mappings>
</serverdata>
</paths>
<paths name="faez@192.168.207.71:22 (1)">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="faez@192.168.207.78">
<serverdata>
<mappings>
<mapping deploy="/home/faez/Codes/GraphCompletion2" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="faez@192.168.207.78:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="faez@192.168.207.78:22 (1)">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>
</project>

+ 6
- 0
.idea/inspectionProfiles/profiles_settings.xml View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

+ 7
- 0
.idea/misc.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Remote Python 3.7.3 (sftp://faez@192.168.207.78:22/home/faez/faez_venv/bin/python)" project-jdk-type="Python SDK" />
</project>

+ 8
- 0
.idea/modules.xml View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/GraphRNN.iml" filepath="$PROJECT_DIR$/.idea/GraphRNN.iml" />
</modules>
</component>
</project>

+ 16
- 0
.idea/remote-mappings.xml View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteMappingsManager">
<list>
<list>
<remote-mappings server-id="python@sftp://faez@192.168.207.78:22/home/faez/faez_venv/bin/python">
<settings>
<list>
<mapping local-root="$PROJECT_DIR$" remote-root="/home/faez/Codes/GraphCompletion2" />
</list>
</settings>
</remote-mappings>
</list>
</list>
</component>
</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 23
- 0
.idea/webServers.xml View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="WebServers">
<option name="servers">
<webServer id="10e3317b-4e39-402a-b65f-af742f10f4b3" name="faez@192.167.207.71" url="http://192.168.207.71">
<fileTransfer host="192.168.207.71" port="22" accessType="SFTP">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
<option name="port" value="22" />
</fileTransfer>
</webServer>
<webServer id="54e7a78c-4a67-4cb7-ad8a-005e3bcd92ca" name="faez@192.168.207.78" url="http://192.168.207.78">
<fileTransfer host="192.168.207.78" port="22" accessType="SFTP">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
<option name="port" value="22" />
</fileTransfer>
</webServer>
</option>
</component>
</project>

+ 171
- 0
.idea/workspace (DESKTOP-13QDL5D's conflicted copy 2019-10-06).xml View File

@@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="62e08229-ef03-4c17-ab67-e9a8510f4a5f" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/baselines/graphvae/args.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/args.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1RasLsxZIGMCL2VPQnLdlf6CbR4" />
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.graphvae_model">
<configuration name="faez_test" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/faez_test.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_model" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_t" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_train" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.graphvae_model" />
<item itemvalue="Python.graphvae_train" />
<item itemvalue="Python.graphvae_t" />
<item itemvalue="Python.faez_test" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="62e08229-ef03-4c17-ab67-e9a8510f4a5f" name="Default Changelist" comment="" />
<created>1569916488590</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1569916488590</updated>
<workItem from="1569916489756" duration="9290000" />
<workItem from="1569999702915" duration="1928000" />
<workItem from="1570261001168" duration="9989000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_model.coverage" NAME="graphvae_model Coverage Results" MODIFIED="1570276181650" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_t.coverage" NAME="graphvae_t Coverage Results" MODIFIED="1570270966961" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test.coverage" NAME="faez_test Coverage Results" MODIFIED="1569917345063" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_train.coverage" NAME="graphvae_train Coverage Results" MODIFIED="1570273424585" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
</component>
</project>

+ 186
- 0
.idea/workspace (DESKTOP-13QDL5D's conflicted copy 2019-10-21).xml View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/baselines/graphvae/args.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/args.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_data.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_data.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1RuXmB9p05mUz58ntQQQWlgP5D5" />
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../diffpool" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.faez_test_2">
<configuration name="faez_test" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/faez_test.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="faez_test_2" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/faez_test_2.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_t" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_train" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.faez_test_2" />
<item itemvalue="Python.faez_test" />
<item itemvalue="Python.graphvae_t" />
<item itemvalue="Python.graphvae_train" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="" />
<created>1570518110256</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1570518110256</updated>
<workItem from="1570518111474" duration="2470000" />
<workItem from="1570521527467" duration="7564000" />
<workItem from="1570556944756" duration="4000" />
<workItem from="1570631330322" duration="167000" />
<workItem from="1570787814243" duration="5791000" />
<workItem from="1571283197359" duration="30244000" />
<workItem from="1571507545471" duration="1811000" />
<workItem from="1571559010620" duration="1402000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_t.coverage" NAME="graphvae_t Coverage Results" MODIFIED="1571319559245" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test.coverage" NAME="faez_test Coverage Results" MODIFIED="1571376083277" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_train.coverage" NAME="graphvae_train Coverage Results" MODIFIED="1571316509310" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test_2.coverage" NAME="faez_test_2 Coverage Results" MODIFIED="1571496030178" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
</component>
</project>

+ 186
- 0
.idea/workspace (DESKTOP-4R9F6QD's conflicted copy 2019-10-21).xml View File

@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/baselines/graphvae/args.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/args.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_data.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_data.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_model.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" beforeDir="false" afterPath="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1RuXmB9p05mUz58ntQQQWlgP5D5" />
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../diffpool" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.faez_test_2">
<configuration name="faez_test" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/faez_test.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="faez_test_2" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/faez_test_2.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_t" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_t.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_train" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.faez_test_2" />
<item itemvalue="Python.faez_test" />
<item itemvalue="Python.graphvae_t" />
<item itemvalue="Python.graphvae_train" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="" />
<created>1570518110256</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1570518110256</updated>
<workItem from="1570518111474" duration="2470000" />
<workItem from="1570521527467" duration="7564000" />
<workItem from="1570556944756" duration="4000" />
<workItem from="1570631330322" duration="167000" />
<workItem from="1570787814243" duration="5791000" />
<workItem from="1571283197359" duration="30244000" />
<workItem from="1571507545471" duration="1811000" />
<workItem from="1571586962043" duration="1498000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_t.coverage" NAME="graphvae_t Coverage Results" MODIFIED="1571319559245" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test.coverage" NAME="faez_test Coverage Results" MODIFIED="1571376083277" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_train.coverage" NAME="graphvae_train Coverage Results" MODIFIED="1571316509310" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test_2.coverage" NAME="faez_test_2 Coverage Results" MODIFIED="1571496030178" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
</component>
</project>

+ 440
- 0
.idea/workspace (DESKTOP-4R9F6QD's conflicted copy 2019-12-20).xml View File

@@ -0,0 +1,440 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/baselines/graphvae/dataset/.idea/dataset.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/.gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/dataset.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/deployment.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/inspectionProfiles/profiles_settings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/COLLAB.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/COLLAB/COLLAB.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/DD/DD_A.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/DD/DD_graph_indicator.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/DD/DD_graph_labels.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/DD/DD_node_labels.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/DD/README.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/ENZYMES_A.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/ENZYMES_graph_indicator.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/ENZYMES_graph_labels.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/ENZYMES_node_attributes.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/ENZYMES_node_labels.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/README.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ENZYMES/load_data.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/IMDBBINARY.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBBINARY/IMDBBINARY.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/IMDBMULTI.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/IMDBMULTI/IMDBMULTI.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/MUTAG.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/MUTAG/MUTAG.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/NCI1.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/NCI1/NCI1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/PROTEINS.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PROTEINS/PROTEINS.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/test_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-1.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-10.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-2.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-3.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-4.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-5.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-6.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-7.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-8.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/10fold_idx/train_idx-9.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/PTC.mat" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/PTC/PTC.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/REDDITBINARY/REDDITBINARY.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/REDDITMULTI5K/REDDITMULTI5K.txt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/__MACOSX/dataset/._.DS_Store" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/__MACOSX/dataset/REDDITBINARY/._.DS_Store" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/__MACOSX/dataset/REDDITMULTI5K/._.DS_Store" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ind.citeseer.allx" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ind.citeseer.graph" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ind.citeseer.test.index" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ind.citeseer.tx" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/dataset/ind.citeseer.x" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/graphvae/Main_VAE_Args.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/graphvae/VAE_evaluate.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/main_baselines/graphvae/test.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main_baselines/graphvae/graphvae_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/main_baselines/graphvae/graphvae_model.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main_baselines/graphvae/graphvae_train.py" beforeDir="false" afterPath="$PROJECT_DIR$/main_baselines/graphvae/graphvae_train.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model.py" beforeDir="false" afterPath="$PROJECT_DIR$/model.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1RuXmB9p05mUz58ntQQQWlgP5D5" />
<component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/main_baselines" />
<property name="run.code.analysis.last.selected.profile" value="aDefault" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Faez\Dropbox\Codes\GraphRNN\main_baselines" />
<recent name="C:\Users\Faez\Dropbox\Codes\GraphRNN\main_baselines\graphvae" />
<recent name="C:\Users\Faez\Dropbox\Codes\GraphRNN\baselines\graphvae\dataset" />
<recent name="C:\Users\Faez\Dropbox\Codes\GraphRNN\dataset" />
<recent name="C:\Users\Faez\Dropbox\Codes\GraphRNN\baselines\graphvae" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.graphvae_train (1)">
<configuration name="evaluate2" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/evaluate2.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_train (1)" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/main_baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main_baselines/graphvae/graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="graphvae_train" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/baselines/graphvae/graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="test" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/main_baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main_baselines/graphvae/test.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="train" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="GraphRNN" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/main_baselines/graphvae" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="C:\Users\faez\Dropbox\Codes\GraphRNN\main_baselines\graphvae\graphvae_train.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.graphvae_train (1)" />
<item itemvalue="Python.graphvae_train" />
<item itemvalue="Python.test" />
<item itemvalue="Python.train" />
<item itemvalue="Python.evaluate2" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ce8b0617-b537-4b45-8e31-cee269a6f92e" name="Default Changelist" comment="" />
<created>1570518110256</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1570518110256</updated>
<workItem from="1570518111474" duration="2470000" />
<workItem from="1570521527467" duration="7564000" />
<workItem from="1570556944756" duration="4000" />
<workItem from="1570631330322" duration="167000" />
<workItem from="1570787814243" duration="5791000" />
<workItem from="1571283197359" duration="30244000" />
<workItem from="1571507545471" duration="1811000" />
<workItem from="1571586962043" duration="893000" />
<workItem from="1571641426788" duration="1704000" />
<workItem from="1571661636678" duration="2418000" />
<workItem from="1571677411016" duration="88000" />
<workItem from="1571738478882" duration="52000" />
<workItem from="1571892686806" duration="1678000" />
<workItem from="1572003908633" duration="2792000" />
<workItem from="1572070170488" duration="14692000" />
<workItem from="1572497273667" duration="25649000" />
<workItem from="1572619695727" duration="5545000" />
<workItem from="1572625282001" duration="13795000" />
<workItem from="1572692061573" duration="51000" />
<workItem from="1572692900201" duration="35611000" />
<workItem from="1573014843100" duration="37891000" />
<workItem from="1573111779304" duration="27609000" />
<workItem from="1573208250375" duration="38852000" />
<workItem from="1573470708983" duration="3052000" />
<workItem from="1573725197871" duration="48171000" />
<workItem from="1574230416480" duration="34893000" />
<workItem from="1574600871783" duration="695000" />
<workItem from="1575095125770" duration="7032000" />
<workItem from="1575645947073" duration="19657000" />
<workItem from="1576655860360" duration="203000" />
<workItem from="1576656145394" duration="1295000" />
<workItem from="1576726492840" duration="15749000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/GraphRNN$graph_completion_test.coverage" NAME="graph_completion_test Coverage Results" MODIFIED="1574115523047" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/GraphCompletion" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_model.coverage" NAME="graphvae_model Coverage Results" MODIFIED="1573060646412" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$test.coverage" NAME="test Coverage Results" MODIFIED="1576743917691" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/main_baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test.coverage" NAME="faez_test Coverage Results" MODIFIED="1571376083277" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$main.coverage" NAME="main Coverage Results" MODIFIED="1575739853939" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_train__1_.coverage" NAME="graphvae_train (1) Coverage Results" MODIFIED="1576745963643" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/main_baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$faez_test_2.coverage" NAME="faez_test_2 Coverage Results" MODIFIED="1575783586219" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$evaluate.coverage" NAME="evaluate Coverage Results" MODIFIED="1573194585558" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$train.coverage" NAME="train Coverage Results" MODIFIED="1576656266119" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/main_baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$graph_generator.coverage" NAME="graph_generator Coverage Results" MODIFIED="1573470807267" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/../SAMI/graph_production" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_t.coverage" NAME="graphvae_t Coverage Results" MODIFIED="1572622582376" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$model.coverage" NAME="model Coverage Results" MODIFIED="1572697509917" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/GraphRNN$graphvae_train.coverage" NAME="graphvae_train Coverage Results" MODIFIED="1576745819913" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$diffpoolClassesAndFunctions.coverage" NAME="diffpoolClassesAndFunctions Coverage Results" MODIFIED="1573152107947" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/baselines/graphvae" />
<SUITE FILE_PATH="coverage/GraphRNN$evaluate2.coverage" NAME="evaluate2 Coverage Results" MODIFIED="1575783876333" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
</project>

+ 164
- 0
GraphCompletion/graph_completion_test.py View File

@@ -0,0 +1,164 @@
from sklearn.metrics import mean_absolute_error
import sys
sys.path.append('../')
from train import *
from args import Args
from GraphCompletion.graph_completion_with_training import graph_show
from GraphCompletion.graph_show import graph_save


def test_completion(x_batch, y_len_unsorted, args, rnn, output, test_batch_size=32, sample_time=1):
rnn.hidden = rnn.init_hidden(1)
rnn.eval()
output.eval()

# generate graphs
max_num_node = int(args.max_num_node)
y_pred = Variable(
torch.zeros(test_batch_size, max_num_node, args.max_prev_node)).cuda() # normalized prediction score
y_pred_long = Variable(torch.zeros(test_batch_size, max_num_node, args.max_prev_node)).cuda() # discrete prediction
x_step = Variable(torch.ones(1, 1, args.max_prev_node)).cuda()

# number_of_missing_nodes = args.number_of_missing_nodes
number_of_missing_nodes = 2
for j in range(test_batch_size):
incomplete_graph_size = y_len_unsorted.data[j] - number_of_missing_nodes
for i in range(y_len_unsorted.data[j]-1):
h = rnn(x_step)
y_pred_step = output(h)
y_pred[j:j+1, i:i + 1, :] = F.sigmoid(y_pred_step)
if(i<incomplete_graph_size):
x_step = (x_batch[j:j+1, i+1:i+2, :]).cuda()
else:
x_step = sample_sigmoid(y_pred_step, sample=True, sample_time=sample_time)
y_pred_long[j:j+1, i:i + 1, :] = x_step
rnn.hidden = Variable(rnn.hidden.data).cuda()
y_pred_long_data = y_pred_long.data.long()
adj_true_list = []
graph_true_list = []
adj_incomplete_list = []
graph_incomplete_list = []
adj_pred_list = []
graph_pred_list = []
for i in range(test_batch_size):
adj_true = decode_adj(x_batch[i, 1:y_len_unsorted.data[i], :].cpu().numpy())
adj_true_list.append(adj_true)
graph_true_list.append(nx.from_numpy_matrix(adj_true))
adj_incomplete = decode_adj(x_batch[i, 1:y_len_unsorted.data[i] - number_of_missing_nodes, :].cpu().numpy())
adj_incomplete_list.append(adj_incomplete)
graph_incomplete_list.append(nx.from_numpy_matrix(adj_incomplete))
adj_pred = decode_adj(y_pred_long_data[i, 0:y_len_unsorted.data[i]-1, :].cpu().numpy())
adj_pred_list.append(adj_pred)
graph_pred_list.append(nx.from_numpy_matrix(adj_pred))
return adj_true_list, graph_true_list, adj_incomplete_list, graph_incomplete_list, adj_pred_list, graph_pred_list


if __name__ == '__main__':
# All necessary arguments are defined in args.py
args = Args()
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda)
# check if necessary directories exist
if not os.path.isdir(args.model_save_path):
os.makedirs(args.model_save_path)
if not os.path.isdir(args.graph_save_path):
os.makedirs(args.graph_save_path)
if not os.path.isdir(args.figure_save_path):
os.makedirs(args.figure_save_path)
if not os.path.isdir(args.timing_save_path):
os.makedirs(args.timing_save_path)
if not os.path.isdir(args.figure_prediction_save_path):
os.makedirs(args.figure_prediction_save_path)
if not os.path.isdir(args.nll_save_path):
os.makedirs(args.nll_save_path)

graphs = create_graphs.create(args)

# split datasets
random.seed(123)
shuffle(graphs)
graphs_len = len(graphs)

args.max_num_node = max([graphs[i].number_of_nodes() for i in range(len(graphs))])
max_num_edge = max([graphs[i].number_of_edges() for i in range(len(graphs))])
min_num_edge = min([graphs[i].number_of_edges() for i in range(len(graphs))])

# show graphs statistics
print('total graph num: {}'.format(len(graphs)))
print('max number node: {}'.format(args.max_num_node))
print('max/min number edge: {}; {}'.format(max_num_edge, min_num_edge))
print('max previous node: {}'.format(args.max_prev_node))

if 'nobfs' in args.note:
args.max_prev_node = args.max_num_node-1
dataset = Graph_sequence_sampler_pytorch_nobfs_for_completion(graphs,
max_num_node=args.max_num_node)
sample_strategy = torch.utils.data.sampler.WeightedRandomSampler([1.0 / len(dataset) for i in range(len(dataset))],
num_samples=args.batch_size * args.batch_ratio,
replacement=True)
dataset_loader = torch.utils.data.DataLoader(dataset, batch_size=args.batch_size, num_workers=args.num_workers,
sampler=sample_strategy)

rnn_GraphRNN = GRU_plain(input_size=args.max_prev_node, embedding_size=args.embedding_size_rnn,
hidden_size=args.hidden_size_rnn, num_layers=args.num_layers, has_input=True,
has_output=False).cuda()
output_GraphRNN = MLP_plain(h_size=args.hidden_size_rnn, embedding_size=args.embedding_size_output,
y_size=args.max_prev_node).cuda()
fname = args.model_save_path + args.fname_GraphRNN + 'lstm_' + str(args.load_epoch) + '.dat'
rnn_GraphRNN.load_state_dict(torch.load(fname))
fname = args.model_save_path + args.fname_GraphRNN + 'output_' + str(args.load_epoch) + '.dat'
output_GraphRNN.load_state_dict(torch.load(fname))

# ******************************************************************
rnn_GraphCompletion = GRU_plain(input_size=args.max_prev_node, embedding_size=args.embedding_size_rnn,
hidden_size=args.hidden_size_rnn, num_layers=args.num_layers, has_input=True,
has_output=False).cuda()
output_GraphCompletion = MLP_plain(h_size=args.hidden_size_rnn, embedding_size=args.embedding_size_output,
y_size=args.max_prev_node).cuda()

fname = args.model_save_path + args.fname + 'lstm_' + args.graph_completion_string + str(args.epochs) + '.dat'
rnn_GraphCompletion.load_state_dict(torch.load(fname))
fname = args.model_save_path + args.fname + 'output_' + args.graph_completion_string + str(args.epochs) + '.dat'
output_GraphCompletion.load_state_dict(torch.load(fname))
# ******************************************************************
MAE_GraphRNN = []
MAE_GraphCompletion = []
for batch_idx, data in enumerate(dataset_loader):
if True:
x_unsorted = data['x'].float()
y_unsorted = data['y'].float()
y_len_unsorted = data['len']
# *********************************
adj_true_list, graph_true_list, adj_incomplete_list, graph_incomplete_list, adj_pred_list, graph_pred_list\
= test_completion(x_unsorted, y_len_unsorted, args, rnn_GraphRNN, output_GraphRNN)
adj_true_list, graph_true_list, adj_incomplete_list, graph_incomplete_list, adj_pred_list_completion_model\
, graph_pred_list_completion_model \
= test_completion(x_unsorted, y_len_unsorted, args, rnn_GraphCompletion, output_GraphCompletion)
mae = np.sum(np.absolute((adj_pred_list[0].astype("float") - adj_true_list[0].astype("float"))))
# print("adj_true: ")
# print(adj_true_list[0])
# graph_show(nx.from_numpy_matrix(adj_true_list[0]),"adj_true" )
# graph_show(nx.from_numpy_matrix(adj_incomplete_list[0]), "adj_incomplete")
# print("my error")
# print(mae)
# print(mean_absolute_error(adj_pred_list[0], adj_true_list[0]))
# print("adj_pred_list:")
# print(adj_pred_list[0])
# graph_show(nx.from_numpy_matrix(adj_pred_list[0]), "pred_true")

for i in range(len(graph_true_list)):
# graph_save(graph_true_list[i], graph_incomplete_list[i],
# graph_pred_list[i], graph_pred_list_completion_model[i], i, args.graph_save_path)
mae = mean_absolute_error(adj_pred_list[i], adj_true_list[i])
MAE_GraphRNN.append(mae)
mae = mean_absolute_error(adj_pred_list_completion_model[i], adj_true_list[i])
MAE_GraphCompletion.append(mae)
# *********************************
# print(MAE_GraphCompletion)
# G_pred_step = test_mlp(x_unsorted, y_len_unsorted, epoch, args, rnn_for_graph_completion,
# output_for_graph_completion)
# nx.write_gpickle(G_pred_step, "completed_graphs_with_training.dat")
print("MAE_GraphRNN:")
print(np.mean(MAE_GraphRNN))
# print(MAE_GraphRNN)
print("MAE_GraphCompletion:")
print(np.mean(MAE_GraphCompletion))

+ 213
- 0
GraphCompletion/graph_completion_test_without_training.py View File

@@ -0,0 +1,213 @@
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from sklearn.metrics import mean_absolute_error
import sys
sys.path.append('../')
from data import *
from train import *
from args import Args


def test_mlp(x_batch, y_len_unsorted, epoch, args, rnn, output, test_batch_size=32, save_histogram=False,sample_time=1):
rnn.hidden = rnn.init_hidden(1)
rnn.eval()
output.eval()

# generate graphs
max_num_node = int(args.max_num_node)
y_pred = Variable(
torch.zeros(test_batch_size, max_num_node, args.max_prev_node)).cuda() # normalized prediction score
y_pred_long = Variable(torch.zeros(test_batch_size, max_num_node, args.max_prev_node)).cuda() # discrete prediction
x_step = Variable(torch.ones(1, 1, args.max_prev_node)).cuda()

incompleteness_ratio = 0.96

for j in range(test_batch_size):
incomplete_graph_size = int(int(y_len_unsorted.data[j]) * incompleteness_ratio)
# print(y_len_unsorted.data[j])
for i in range(y_len_unsorted.data[j]-1):
h = rnn(x_step)
y_pred_step = output(h)
y_pred[j:j+1, i:i + 1, :] = F.sigmoid(y_pred_step)
if (i<incomplete_graph_size):
x_step = (x_batch[j:j+1, i+1:i+2, :]).cuda()
else:
x_step = sample_sigmoid(y_pred_step, sample=True, sample_time=sample_time)
y_pred_long[j:j+1, i:i + 1, :] = x_step
rnn.hidden = Variable(rnn.hidden.data).cuda()
y_pred_long_data = y_pred_long.data.long()

G_pred_list = []
adj_true_list = []
adj_pred_list = []
for i in range(test_batch_size):
adj_pred = decode_adj(y_pred_long_data[i].cpu().numpy())
adj_pred_list.append(adj_pred)
adj_true_list.append(decode_adj(x_batch[i].cpu().numpy()))
G_pred = get_graph(adj_pred) # get a graph from zero-padded adj
G_pred_list.append(G_pred)
return G_pred_list, adj_true_list, adj_pred_list


def save_graph(graph, name):
adj_pred = decode_adj(graph.cpu().numpy())
G_pred = get_graph(adj_pred) # get a graph from zero-padded adj
G = np.asarray(nx.to_numpy_matrix(G_pred))
np.savetxt(name + '.txt', G, fmt='%d')


def data_to_graph_converter(data):
G_list = []
for i in range(len(data)):
x = data[i].numpy()
x = x.astype(int)
adj_pred = decode_adj(x)
G = get_graph(adj_pred) # get a graph from zero-padded adj
G_list.append(G)
return G_list


def get_incomplete_graph(x_batch, y_len_unsorted, incompleteness_ratio = 0.96):
batch_size = len(x_batch)
max_prev_node = len(x_batch[0][0])
max_incomplete_num_node = int(int(max(y_len_unsorted)) * incompleteness_ratio)
incomplete_graph = Variable(torch.zeros(batch_size, max_incomplete_num_node, max_prev_node))
for i in range(len(y_len_unsorted)):
incomplete_graph_size = int(int(y_len_unsorted.data[i])*incompleteness_ratio)
incomplete_graph[i] = torch.cat((x_batch[i,:incomplete_graph_size],
torch.zeros([max_incomplete_num_node - incomplete_graph_size,
max_prev_node])), dim=0)
return incomplete_graph


if __name__ == '__main__':
# All necessary arguments are defined in args.py
args = Args()
os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda)
print('CUDA', args.cuda)
print('File name prefix', args.fname)
# check if necessary directories exist
if not os.path.isdir(args.model_save_path):
os.makedirs(args.model_save_path)
if not os.path.isdir(args.graph_save_path):
os.makedirs(args.graph_save_path)
if not os.path.isdir(args.figure_save_path):
os.makedirs(args.figure_save_path)
if not os.path.isdir(args.timing_save_path):
os.makedirs(args.timing_save_path)
if not os.path.isdir(args.figure_prediction_save_path):
os.makedirs(args.figure_prediction_save_path)
if not os.path.isdir(args.nll_save_path):
os.makedirs(args.nll_save_path)

graphs = create_graphs.create(args)

# split datasets
random.seed(123)
shuffle(graphs)
graphs_len = len(graphs)
graphs_test = graphs[int(0.8 * graphs_len):]
graphs_train = graphs[0:int(0.8 * graphs_len)]
graphs_validate = graphs[0:int(0.2 * graphs_len)]

graph_validate_len = 0
for graph in graphs_validate:
graph_validate_len += graph.number_of_nodes()
graph_validate_len /= len(graphs_validate)
print('graph_validate_len', graph_validate_len)

graph_test_len = 0
for graph in graphs_test:
graph_test_len += graph.number_of_nodes()
graph_test_len /= len(graphs_test)
print('graph_test_len', graph_test_len)

args.max_num_node = max([graphs[i].number_of_nodes() for i in range(len(graphs))])
max_num_edge = max([graphs[i].number_of_edges() for i in range(len(graphs))])
min_num_edge = min([graphs[i].number_of_edges() for i in range(len(graphs))])

# args.max_num_node = 2000
# show graphs statistics
print('total graph num: {}, training set: {}'.format(len(graphs), len(graphs_train)))
print('max number node: {}'.format(args.max_num_node))
print('max/min number edge: {}; {}'.format(max_num_edge, min_num_edge))
print('max previous node: {}'.format(args.max_prev_node))

# save ground truth graphs
## To get train and test set, after loading you need to manually slice
save_graph_list(graphs, args.graph_save_path + args.fname_train + '0.dat')
save_graph_list(graphs, args.graph_save_path + args.fname_test + '0.dat')
print('train and test graphs saved at: ', args.graph_save_path + args.fname_test + '0.dat')

if 'nobfs' in args.note:
args.max_prev_node = args.max_num_node-1
dataset = Graph_sequence_sampler_pytorch_nobfs_for_completion(graphs_train,
max_num_node=args.max_num_node)
# dataset = Graph_sequence_sampler_pytorch(graphs_train, max_prev_node=args.max_prev_node,
# max_num_node=args.max_num_node)
sample_strategy = torch.utils.data.sampler.WeightedRandomSampler([1.0 / len(dataset) for i in range(len(dataset))],
num_samples=args.batch_size * args.batch_ratio,
replacement=True)
dataset_loader = torch.utils.data.DataLoader(dataset, batch_size=args.batch_size, num_workers=args.num_workers,
sampler=sample_strategy)

rnn = GRU_plain(input_size=args.max_prev_node, embedding_size=args.embedding_size_rnn,
hidden_size=args.hidden_size_rnn, num_layers=args.num_layers, has_input=True,
has_output=False).cuda()
output = MLP_plain(h_size=args.hidden_size_rnn, embedding_size=args.embedding_size_output,
y_size=args.max_prev_node).cuda()
name = "GraphRNN_MLP" + '_' + args.graph_type + '_' + str(args.num_layers) + '_' + str(args.hidden_size_rnn) + '_'
fname = args.model_save_path + name + 'lstm_' + str(args.load_epoch) + '.dat'
rnn.load_state_dict(torch.load(fname))
fname = args.model_save_path + name + 'output_' + str(args.load_epoch) + '.dat'
output.load_state_dict(torch.load(fname))

# ******************************************************************
rnn_for_graph_completion = GRU_plain(input_size=args.max_prev_node, embedding_size=args.embedding_size_rnn,
hidden_size=args.hidden_size_rnn, num_layers=args.num_layers, has_input=True,
has_output=False).cuda()
output_for_graph_completion = MLP_plain(h_size=args.hidden_size_rnn, embedding_size=args.embedding_size_output,
y_size=args.max_prev_node).cuda()

graph_completion_string = 'graph_completion_one_node_'

# fname = args.model_save_path + args.fname + 'lstm_' + graph_completion_string + str(args.load_epoch) + '.dat'
# rnn_for_graph_completion.load_state_dict(torch.load(fname))
# fname = args.model_save_path + args.fname + 'output_' + graph_completion_string + str(args.load_epoch) + '.dat'
# output_for_graph_completion.load_state_dict(torch.load(fname))
# ******************************************************************

args.lr = 0.00001
epoch = args.load_epoch
print('model loaded!, lr: {}'.format(args.lr))

for batch_idx, data in enumerate(dataset_loader):
if batch_idx==0:
rnn.zero_grad()
output.zero_grad()
x_unsorted = data['x'].float()
G = data_to_graph_converter(x_unsorted[:,1:,:])
nx.write_gpickle(G, "main_graphs.dat")
y_unsorted = data['y'].float()
y_len_unsorted = data['len']
# *********************************
G = get_incomplete_graph(x_unsorted, y_len_unsorted)
G = data_to_graph_converter(G[:, 1:, :])
nx.write_gpickle(G, "incomplete_graphs.dat")
# *********************************
G_pred_step, adj_true_list, adj_pred_list = test_mlp(x_unsorted, y_len_unsorted, epoch, args, rnn, output)
nx.write_gpickle(G_pred_step, "completed_graphs.dat")
mae = np.sum(np.absolute((adj_pred_list[0].astype("float") - adj_true_list[0].astype("float"))))
print("adj_true: ")
print(adj_true_list[0])

print("my err")
print(mae)
print(mean_absolute_error(adj_pred_list[0], adj_true_list[0]))
print("adj_pred_list:")
print(adj_pred_list[0])
# *********************************
# G_pred_step = test_mlp(x_unsorted, y_len_unsorted, epoch, args, rnn_for_graph_completion,
# output_for_graph_completion)
# nx.write_gpickle(G_pred_step, "completed_graphs_with_training.dat")

+ 675
- 0
GraphCompletion/graph_completion_with_training.py View File

@@ -0,0 +1,675 @@
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import sys
sys.path.append('../')
from train import *
from args import Args
from torch import optim
from torch.optim.lr_scheduler import MultiStepLR
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
from torch.nn.init import *
import matplotlib.pyplot as plt
import networkx as nx
from tensorboard_logger import configure, log_value
from baselines.graphvae.graphvae_model import GraphVAE
import itertools

device = torch.device("cuda:0")


def plot_grad_flow(named_parameters):
ave_grads = []
layers = []
for n, p in named_parameters:
if(p.requires_grad) and ("bias" not in n):
layers.append(n)
print(p.grad)
print("**********************************")
print(p.grad.abs())
print("**********************************")
print(p.grad.abs().mean())
print("**********************************")
ave_grads.append(p.grad.abs().mean())
plt.plot(ave_grads, alpha=0.3, color="b")
plt.hlines(0, 0, len(ave_grads)+1, linewidth=1, color="k" )
plt.xticks(range(0,len(ave_grads), 1), layers, rotation="vertical")
plt.xlim(xmin=0, xmax=len(ave_grads))
plt.xlabel("Layers")
plt.ylabel("average gradient")
plt.title("Gradient flow")
plt.grid(True)
plt.show()


def graph_show(G, title):
pos = nx.spring_layout(G, scale=2)
nx.draw(G, pos, font_size=8)
fig = plt.gcf()
fig.canvas.set_window_title(title)
plt.show()


def decode_adj(adj_output):
'''
recover to adj from adj_output
note: here adj_output have shape (n-1)*m
'''
max_prev_node = adj_output.shape[1]
adj = np.zeros((adj_output.shape[0], adj_output.shape[0]))
for i in range(adj_output.shape[0]):
input_start = max(0, i - max_prev_node + 1)
input_end = i + 1
output_start = max_prev_node + max(0, i - max_prev_node + 1) - (i + 1)
output_end = max_prev_node
adj[i, input_start:input_end] = adj_output[i,::-1][output_start:output_end] # reverse order
adj_full = np.zeros((adj_output.shape[0]+1, adj_output.shape[0]+1))
n = adj_full.shape[0]
adj_full[1:n, 0:n-1] = np.tril(adj, 0)
adj_full = adj_full + adj_full.T

return adj_full


def tensor_to_graph_converter(tensor, title):
adj_matrix = decode_adj(tensor.numpy())
G = nx.from_numpy_matrix(adj_matrix)
graph_show(G, title)
return


def get_indices(number_of_missing_nodes, row_size):
# print("$$$$$$$$")
# print(row_size)
row_index = []
column_index = []
start_index = 0
for i in range(number_of_missing_nodes):
for j in range(row_size):
row_index.append(i)
column_index.append(j + start_index)
start_index+=1
return row_index, column_index


def GraphRNN_loss2(true_adj_batch, predicted_adj_batch, y_pred, y, batch_size, number_of_missing_nodes):
row_list = list(range(number_of_missing_nodes))
permutation_indices = list(itertools.permutations(row_list))
loss_sum = 0
for data_index in range(batch_size):
row_size = len(true_adj_batch[data_index])-number_of_missing_nodes
row_index, column_index = get_indices(number_of_missing_nodes, row_size)
# print("true_adj_batch: ")
# print(true_adj_batch[data_index])
# print("y: ")
# print(y[data_index])
# print("predicted_adj_batch: ")
# print(predicted_adj_batch[data_index])
# print("y_pred:")
# print(y_pred[data_index]+0)
# print("selected_y_pred:")
# print(y_pred[data_index][row_index, column_index])
# print("selected_y:")
# print(y[data_index][row_index, column_index])
loss_list = []
for row_order in permutation_indices:
permuted_y_pred = y_pred[data_index][list(row_order)]
loss_list.append(F.binary_cross_entropy(permuted_y_pred[row_index, column_index],
y[data_index][row_index, column_index]))
loss_sum+=min(loss_list)
loss_sum/=batch_size
return loss_sum


def GraphRNN_loss(true_adj_batch, predicted_adj_batch, batch_size, number_of_missing_nodes):
# loss_sum = 0
for data_index in range(batch_size):
loss_sum= F.binary_cross_entropy(predicted_adj_batch[data_index],
true_adj_batch[data_index])
break
# loss_sum/=batch_size
# loss_sum.requires_grad = True
return loss_sum


def matrix_completion_loss(true_adj_batch, predicted_adj_batch, batch_size, number_of_missing_nodes):
# graph_show(nx.from_numpy_matrix(true_adj[0]), "true_adj")
# graph_show(nx.from_numpy_matrix(predicted_adj[0]), "predicted_adj")
loss_sum=F.binary_cross_entropy(torch.from_numpy(predicted_adj_batch[0]),
torch.from_numpy(true_adj_batch[0]))

# loss_sum = 0
# for data_index in range(batch_size):
# # print("########## data_len: ")
# # print(data_len[data_index].item())
# # print("^^^^ data_index: " + str(data_index))
# adj_matrix = true_adj_batch[data_index]
# predicted_adj_matrix = predicted_adj_batch[data_index]
# number_of_nodes = np.shape(adj_matrix)[1]
# # loss_sum+=F.binary_cross_entropy(torch.from_numpy(predicted_adj_matrix),
# # torch.from_numpy(adj_matrix))
# sub_matrix = adj_matrix[number_of_nodes - number_of_missing_nodes:][:,
# :number_of_nodes - number_of_missing_nodes]
# predicted_sub_matrix = predicted_adj_matrix[number_of_nodes - number_of_missing_nodes:][:,
# :number_of_nodes - number_of_missing_nodes]
# min_permutation_loss = float("inf")
# row_list = list(range(number_of_missing_nodes))
# permutation_indices = list(itertools.permutations(row_list))
# number_of_rows = np.shape(predicted_sub_matrix)[0]
# number_of_columns = np.shape(predicted_sub_matrix)[1]
# matrix_size = number_of_rows*number_of_columns
# # print(str(number_of_rows) + " ### " + str(number_of_columns) + " @@@ " + str(matrix_size))
#
# for row_order in permutation_indices:
# permuted_sub_matrix = sub_matrix[list(row_order)]
# # print("***** permuted_sub_matrix ")
# # print(permuted_sub_matrix)
# # print("***** predicted_sub_matrix ")
# # print(predicted_sub_matrix)
# adj_recon_loss = F.binary_cross_entropy(torch.from_numpy(predicted_sub_matrix),
# torch.from_numpy(permuted_sub_matrix))
# # print(adj_recon_loss)
# min_permutation_loss = np.minimum(min_permutation_loss, adj_recon_loss.item())
# # print(adj_recon_loss)
# loss_sum += min_permutation_loss/matrix_size
# # print("^^^^^ ")
# # print(loss_sum)
# loss_sum = torch.autograd.Variable(torch.from_numpy(np.array(loss_sum)))
# # print(loss_sum)
# loss_sum.requires_grad = True
# print(loss_sum)
# print(loss_sum/batch_size)
return loss_sum/batch_size


def graph_matching_loss(true_adj_batch, predicted_adj_batch, data_len, batch_size):
# graph_show(nx.from_numpy_matrix(true_adj[0]), "true_adj")
# graph_show(nx.from_numpy_matrix(predicted_adj[0]), "predicted_adj")
loss_sum = 0
for data_index in range(batch_size):
features = torch.zeros(data_len[data_index])
number_of_nodes = data_len[data_index].item()
# print("########## data_len: ")
# print(data_len[data_index].item())
if data_len[data_index].item()>14:
continue
graphvae = GraphVAE(1, 64, 256, data_len[data_index].item())
# print("^^^^ data_index: " + str(data_index))
current_true_adj = true_adj_batch[data_index]
current_predicted_adj = predicted_adj_batch[data_index]
current_features = features
S = graphvae.edge_similarity_matrix(current_true_adj, current_predicted_adj, current_features, current_features,
graphvae.deg_feature_similarity)
init_corr = 1 / number_of_nodes
init_assignment = torch.ones(number_of_nodes, number_of_nodes) * init_corr
assignment = graphvae.mpm(init_assignment, S)
row_ind, col_ind = scipy.optimize.linear_sum_assignment(-assignment.numpy())
permuted_adj = graphvae.permute_adj(torch.from_numpy(current_true_adj).float(), row_ind, col_ind)
# print("***** permuted_adj ")
# print(permuted_adj)
# print("***** current_predicted_adj ")
# print(torch.from_numpy(current_predicted_adj).float())
adj_recon_loss = graphvae.adj_recon_loss(permuted_adj, torch.from_numpy(current_predicted_adj).float())
# print(adj_recon_loss)
loss_sum += adj_recon_loss.data
loss_sum.requires_grad = True
# print(loss_sum/batch_size)
# print("^^^^^ ")
# print(loss_sum)
return loss_sum/batch_size


def make_batch_of_matrices(initial_y, initial_y_len, y_train, y_pred, batch_size):
true_adj_batch = []
predicted_adj_batch = []
for data_index in range(batch_size):
a = initial_y[data_index][:initial_y_len[data_index] - 1].cpu()
b = y_train[data_index]
true_adj = torch.cat((a, b), dim=0)
true_adj = decode_adj(true_adj.numpy())
true_adj_tensor = torch.from_numpy(true_adj + np.identity(len(true_adj[0]))).float().to(device)
true_adj_batch.append(true_adj_tensor)
b = y_pred[data_index].data
# print("bbbbbbbbbbbbbbbbbbbbbbb :")
# print(b)
# print("b.data :")
# print(b.data)
# print("**********************************************************************************")
predicted_adj = torch.cat((a, b.cpu()), dim=0)
predicted_adj = decode_adj(predicted_adj.numpy())
predicted_adj_tensor = torch.from_numpy(predicted_adj + np.identity(len(predicted_adj[0]))).float().to(device)
predicted_adj_tensor.requires_grad = True
# predicted_adj_tensor = predicted_adj_tensor + 1
# print("*********** predicted_adj_tensor *******")
# print(predicted_adj_tensor+0)
predicted_adj_batch.append(predicted_adj_tensor+0)
return true_adj_batch, predicted_adj_batch


def train_mlp_epoch_for_completion(epoch, args, rnn, output, rnn_for_initialization,
output_for_initialization, data_loader,
optimizer_rnn, optimizer_output,
scheduler_rnn, scheduler_output, number_of_missing_nodes):
rnn.train()
output.train()
loss_sum = 0
for batch_idx, data in enumerate(data_loader):
rnn.zero_grad()
output.zero_grad()
x_unsorted = data['x'].float()
y_unsorted = data['y'].float()
data_len = y_len_unsorted = data['len']

# data_index = 0
# b = y_unsorted[data_index][:y_len_unsorted[data_index] - 1].cpu()
# tensor_to_graph_converter(b, "Complete Graph")
# ****
x_unsorted, y_unsorted, y_len_unsorted, hidden, initial_y, initial_y_len = \
data_initializer_for_training(x_unsorted, y_unsorted, y_len_unsorted,
args, rnn_for_initialization, output_for_initialization,
number_of_missing_nodes, False, 0.96)
# ____________________________________________________________________________________________
# x_unsorted1, y_unsorted1, y_len_unsorted1, hidden, initial_y1, initial_y_len1 = \
# data_initializer_for_training(x_unsorted, y_unsorted, y_len_unsorted,
# args, rnn_for_initialization, output_for_initialization,
# number_of_missing_nodes, False, 0.96)
# ____________________________________________________________________________________________
# a = initial_y[data_index][:initial_y_len[data_index]-1].cpu()
# tensor_to_graph_converter(a, "Incomplete Graph")

# b = y_unsorted[data_index][:-1]
# recons = torch.cat((a, b), dim=0)
# tensor_to_graph_converter(recons, "Merged Complete Graph")
# ****
y_len_max = max(y_len_unsorted)
x_unsorted = x_unsorted[:, 0:y_len_max, :]
y_unsorted = y_unsorted[:, 0:y_len_max, :]
# initialize lstm hidden state according to batch size
# rnn.hidden = rnn.init_hidden(batch_size=x_unsorted.size(0))
# ****
rnn.hidden = hidden
# ****

# sort input
y_len,sort_index = torch.sort(y_len_unsorted,0,descending=True)
y_len = y_len.numpy().tolist()
x = torch.index_select(x_unsorted,0,sort_index)
y = torch.index_select(y_unsorted,0,sort_index)
x = Variable(x).cuda()
y = Variable(y).cuda()

h = rnn(x, pack=True, input_len=y_len)
y_pred = output(h)
y_pred = F.sigmoid(y_pred)

# clean
y_pred = pack_padded_sequence(y_pred, y_len, batch_first=True)
y_pred = pad_packed_sequence(y_pred, batch_first=True)[0]
# use cross entropy loss
# print("y_unsorted: ")
# print(y_unsorted[0])
# print("y: ")
# print(y[0].cpu())
true_adj_batch, predicted_adj_batch = make_batch_of_matrices(initial_y, initial_y_len, y.cpu(),y_pred, len(y_pred))
# graph_show(nx.from_numpy_matrix(true_adj_batch[data_index]), "Complete2")
# import time
# start = time.time()
# print("@@@@@@@@@@@@@@@@@@@@@@@@@")
# print(args.loss)
if args.loss == "graph_matching_loss":
print(graph_matching_loss)
# loss = graph_matching_loss(true_adj_batch, predicted_adj_batch, data_len, len(data_len))
elif args.loss == "matrix_completion_loss":
print(matrix_completion_loss)
# loss = matrix_completion_loss(true_adj_batch, predicted_adj_batch, len(data_len),
# args.number_of_missing_nodes)
elif args.loss =="GraphRNN_loss":
# print("GraphRNN_loss")
# print(y)
# print(y_pred)
# loss = F.binary_cross_entropy(torch.from_numpy(predicted_adj_batch[0]), torch.from_numpy(true_adj_batch[0]))
# loss.requires_grad = True
# print("true_adj_batch: ")
# print(true_adj_batch[0])
# print("y: ")
# print(y[0])
# print("predicted_adj_batch: ")
# print(predicted_adj_batch[0])
# print("y_pred:")
# print(y_pred[0]+0)
# print("**************************************************************")
# loss = GraphRNN_loss(true_adj_batch, predicted_adj_batch, len(data_len), args.number_of_missing_nodes);
# loss = binary_cross_entropy_weight(predicted_adj_batch[0], true_adj_batch[0])
# print("**** GraphRNN_loss: ")
# print(loss)
# row_index = [0, 2]
# col_index = [1, 3]
# print("**************************")
# print(y_pred[0][row_index, col_index])
# print(np.shape(y_pred[0])[1])
loss = GraphRNN_loss2(true_adj_batch, predicted_adj_batch, y_pred, y, len(y_pred), args.number_of_missing_nodes)
# loss = binary_cross_entropy_weight(y_pred[0][row_index, col_index], y[0][row_index, col_index])
# print("**** main_loss: ")
# print(loss)
# print("*** epoch : " + str(epoch) + "*** loss: " + str(loss.data))
# break
# end = time.time()
# print(end - start)
# print("y_pred")
# print(y_pred[0])
# print("y")
# print(y[0])
# print("***************************************************")
# loss = binary_cross_entropy_weight(y_pred, y)
loss.backward()
# update deterministic and lstm
optimizer_output.step()
optimizer_rnn.step()
scheduler_output.step()
scheduler_rnn.step()
# for p in rnn.parameters():
# print(p)
# print(p.grad)
# if p.grad is not None:
# print("________________________________________________________")
# print(p.grad.data)
# plot_grad_flow(rnn.named_parameters())


if epoch % args.epochs_log==0 and batch_idx==0: # only output first batch's statistics
print('Epoch: {}/{}, train loss: {:.6f}, graph type: {}, num_layer: {}, hidden: {}'.format(
epoch, args.epochs,loss.data, args.graph_type, args.num_layers, args.hidden_size_rnn))

log_value(args.loss + args.fname + args.training_mode + "_ "
"number_of_missing_nodes_" +
str(number_of_missing_nodes), loss.data, epoch * args.batch_ratio + batch_idx)
loss_sum += loss.data
return loss_sum/(batch_idx+1)


def train_for_completion(args, dataset_train, rnn, output, rnn_for_initialization,output_for_initialization):
# check if load existing model
if args.load:
fname = args.model_save_path + args.fname + 'lstm_' + args.graph_completion_string + str(args.load_epoch) + '.dat'
rnn.load_state_dict(torch.load(fname))
fname = args.model_save_path + args.fname + 'output_' + args.graph_completion_string + str(args.load_epoch) + '.dat'
output.load_state_dict(torch.load(fname))

args.lr = 0.00001
epoch = args.load_epoch
print('model loaded!, lr: {}'.format(args.lr))
else:
epoch = 1

# initialize optimizer
optimizer_rnn = optim.Adam(list(rnn.parameters()), lr=args.lr)
optimizer_output = optim.Adam(list(output.parameters()), lr=args.lr)

scheduler_rnn = MultiStepLR(optimizer_rnn, milestones=args.milestones, gamma=args.lr_rate)
scheduler_output = MultiStepLR(optimizer_output, milestones=args.milestones, gamma=args.lr_rate)