eriklindernoren / PyTorch-YOLOv3

Minimal PyTorch implementation of YOLOv3
GNU General Public License v3.0
7.32k stars 2.63k forks source link

Crash after processing JSON to RDF #801

Closed nicolastoira closed 1 year ago

nicolastoira commented 1 year ago

The execution of python3 -m morph_kgc morph.ini is failing after writing to the output file. Trying to convert JSON to RDF.

Configuration file:

[DEFAULT]
main_dir: /lib

[CONFIGURATION]
output_file: knowledge-graph.nt

[DataSource1]
mappings: ml_generated_mapping.ttl

Error:

INFO | 2022-12-01 10:26:29,037 | 620 mapping rules retrieved.
INFO | 2022-12-01 10:26:29,414 | Mapping partition with 419 groups generated.
INFO | 2022-12-01 10:26:29,415 | Maximum number of rules within mapping group: 24.
INFO | 2022-12-01 10:26:29,434 | Mappings processed in 4.174 seconds.
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/materializer.py", line 363, in _materialize_mapping_partition
    data = _materialize_mapping_rule(mapping_rule, mappings_df, config)
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/materializer.py", line 332, in _materialize_mapping_rule
    merged_data = _merge_data(data, parent_data, mapping_rule, 'object_join_conditions')
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/materializer.py", line 258, in _merge_data
    return data.merge(parent_data, how='inner', left_on=child_join_references, right_on=parent_join_references)
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 9351, in merge
    return merge(
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 122, in merge
    return op.get_result()
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 716, in get_result
    join_index, left_indexer, right_indexer = self._get_join_info()
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 967, in _get_join_info
    (left_indexer, right_indexer) = self._get_join_indexers()
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 941, in _get_join_indexers
    return get_join_indexers(
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/pandas/core/reshape/merge.py", line 1489, in get_join_indexers
    llab, rlab, shape = (list(x) for x in zipped)
ValueError: not enough values to unpack (expected 3, got 0)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/__main__.py", line 21, in <module>
    process_materialization(mappings, config)
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/engine.py", line 44, in process_materialization
    materializer.materialize_concurrently()
  File "/home/nicola/workspace/venv/lib/python3.8/site-packages/morph_kgc/materializer.py", line 406, in materialize_concurrently
    num_triples = sum(pool.starmap(_materialize_mapping_partition,
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
ValueError: not enough values to unpack (expected 3, got 0)

Is it some known issue of the code, or it could be due to input data or used RML mapping? Thanks.

jaagut commented 1 year ago

This error message and config snippet seems to be in no relation to this current source code repository. This repository provides a PyTorch implementation of the neural network YOLO for object detection on images. It has nothing to do with knowledge-graphs. The paths of python files in your error log also do not match any of our files.

I must apologize, but I believe, we cannot provide you any help.

nicolastoira commented 1 year ago

Sorry my bad... Thanks for quick response.