Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in ipyannotations.text.MulticlassLabeller when used with Superintendent #42

Open
morenobonaventura opened this issue Mar 27, 2023 · 0 comments

Comments

@morenobonaventura
Copy link

Versions

  • ipyannotations==0.5.1
  • superintendent==0.6.0
  • voila==0.4.0

Minimal script to reproduce (running via voila==0.4.0)

from superintendent import Superintendent
from IPython.display import display
from ipyannotations.text import MulticlassLabeller

label_classes = ['one', 'two', 'three']
labelling_widget = MulticlassLabeller(options=label_classes, allow_freetext=False)

if __name__ == '__main__':
    widget = Superintendent(labelling_widget=labelling_widget)
    a = [123, 123, 123]
    widget.add_features([a, a, a])
    display(widget)

Getting the following error with this minimal script

AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_997/63846817.py in <module>
      4 
      5 label_classes = ['one', 'two', 'three']
----> 6 labelling_widget = MulticlassLabeller(options=label_classes, allow_freetext=False)
      7 
      8 if __name__ == '__main__':

/opt/conda/lib/python3.7/site-packages/ipyannotations/text/classification.py in __init__(self, options, max_buttons, allow_freetext, *args, **kwargs)
     79             display_function=_text_display_function,
     80             *args,
---> 81             **kwargs,
     82         )  # type: ignore
     83 

/opt/conda/lib/python3.7/site-packages/ipyannotations/generic/multiclassification.py in __init__(self, options, allow_freetext, display_function, *args, **kwargs)
     67         self._fixed_options = [option for option in self.options]
     68         self._freetext_timestamp = 0.0
---> 69         self.freetext_widget.on_submit(self.freetext_submission)
     70 
     71         self.children = [

AttributeError: 'HBox' object has no attribute 'on_submit'
@morenobonaventura morenobonaventura changed the title Error on from ipyannotations.text.MulticlassLabeller when used with Superintendent Error in ipyannotations.text.MulticlassLabeller when used with Superintendent Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant