You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

structure.py 740 B

12345678910111213141516171819202122232425262728
  1. envs='dgl pyg'.split()
  2. forbids=dict(zip(envs,"torch_geometric dgl".split()))
  3. import os
  4. from utils import *
  5. import sys
  6. def func(dev,env):
  7. sys.modules[forbids[env]]=None
  8. os.environ['AUTOGL_BACKEND']=env
  9. from autogl.backend import DependentBackend
  10. print('using backend :',DependentBackend.get_backend_name())
  11. from autogl.datasets import build_dataset_from_name
  12. data = build_dataset_from_name('cora')
  13. from autogl.module.preprocessing.structure_engineering import GCNJaccard,GCNSVD
  14. fes=[GCNJaccard,GCNSVD]
  15. for fe in fes:
  16. print(f'Doing {fe}')
  17. fe = fe()
  18. data=fe.fit_transform(data,inplace=False)
  19. return 'Test OK'
  20. # func(0,'dgl')
  21. results=mp_exec([0,1],envs,func)
  22. print(results)