Knowledge-Graph-Hub / neat-ml

Network Embedding All the Things
BSD 3-Clause "New" or "Revised" License
18 stars 1 forks source link

Allow config YAML to not contain graph files #64

Open caufieldjh opened 2 years ago

caufieldjh commented 2 years ago

Not every run will involve starting from scratch on a graph, but NEAT currently expects a graph_data block to be present in the config. Omit it, and a KeyError is raised:

Traceback (most recent call last):
  File "/home/harry/kg-env/bin/neat", line 11, in <module>
    load_entry_point('neat==0.0.1', 'console_scripts', 'neat')()
  File "/home/harry/kg-env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/harry/kg-env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/harry/kg-env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/harry/kg-env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/harry/kg-env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/harry/kg-env/lib/python3.8/site-packages/neat-0.0.1-py3.8.egg/neat/cli.py", line 41, in run
  File "/home/harry/kg-env/lib/python3.8/site-packages/neat-0.0.1-py3.8.egg/neat/yaml_helper/yaml_helper.py", line 225, in deal_with_url_node_edge_paths
KeyError: 'graph_data'

Some modifications to the yaml_helper to make this optional should help.