Skip to content

Commit

Permalink
Hot fix disable grounding rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasZahradnik committed Oct 29, 2023
1 parent bda13b1 commit bad3e0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions neuralogic/core/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def _build_samples(
source_pipeline.execute(None if sources is None else sources.sources)
java_model = source_pipeline.get()

groundings = java_model.r.collect(self.collectors.toList())
# groundings = java_model.r.collect(self.collectors.toList())
logic_samples = java_model.s.collect(self.collectors.toList())

return [RawSample(sample, grounding) for sample, grounding in zip(logic_samples, groundings)]
return [RawSample(sample, None) for sample in logic_samples]

def build_model(self, parsed_template, settings: SettingsProxy):
neural_model = self.neural_model(parsed_template.getAllWeights(), settings.settings)
Expand Down
11 changes: 7 additions & 4 deletions neuralogic/core/builder/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,19 @@ def draw_grounding(
*args,
**kwargs,
):
return draw_grounding(
self.grounding, filename, draw_ipython, img_type, value_detail, graphviz_path, *args, **kwargs
)
if False:
return draw_grounding(
self.grounding, filename, draw_ipython, img_type, value_detail, graphviz_path, *args, **kwargs
)

raise NotImplementedError


class Sample(RawSample):
__slots__ = ("id", "target", "neurons", "output_neuron", "java_sample")

def __init__(self, sample, java_sample):
super().__init__(sample)
super().__init__(sample, None)
serialized_sample = json.loads(str(sample.exportToJson()))

self.id = serialized_sample["id"]
Expand Down

0 comments on commit bad3e0f

Please sign in to comment.