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

Dictionary inputs fail for BoltSpec with more than 5 inputs #452

Open
colebaileygit opened this issue Nov 30, 2018 · 0 comments
Open

Dictionary inputs fail for BoltSpec with more than 5 inputs #452

colebaileygit opened this issue Nov 30, 2018 · 0 comments

Comments

@colebaileygit
Copy link

colebaileygit commented Nov 30, 2018

At the end of my topology, I am creating a bolt roughly as follows:

 ## Final Node which captures all data and formats response
    fulfillment_bolt = JavaBolt.spec(full_class_name="bolt.FulfillmentBolt",
                                    args_list=[],
                                    inputs={
                                        nlg_bolt['default']: Grouping.fields('msgId'),
                                        audio_arousal['default']: Grouping.fields('msgId'),
                                        audio_emotion['default']: Grouping.fields('msgId'),
                                        text_sentiment_LIWC['default']: Grouping.fields('msgId'),
                                        text_sentiment_LSTM['default']: Grouping.fields('msgId'),
                                        text_sentiment_CNN['default']: Grouping.fields('msgId'),
                                        text_sentiment_google['default']: Grouping.fields('msgId'),
                                        text_emotion['default']: Grouping.fields('msgId')
                                    })

The above snippet is the current work-around - using ['default'] to get the GlobalStreamId for each input component.

The error occurs if I remove the ['default'] by each input.

When I limit it to any 5 components, the code builds successfully. But after I add a 6th input component (no matter which one I add) I get the following error:

File "topologies/dialog.py", line 9, in
class Dialog(Topology):
File "/home/me/anaconda3/lib/python3.6/site-packages/streamparse/dsl/topology.py", line 36, in new
TopologyType.clean_spec_inputs(spec, specs)
File "/home/me/anaconda3/lib/python3.6/site-packages/streamparse/dsl/topology.py", line 104, in clean_spec_inputs
if isinstance(stream_id.componentId, ComponentSpec):
AttributeError: 'JavaBoltSpec' object has no attribute 'componentId'

I found that clean_spec_inputs simply maps each ComponentSpec to a GlobalStreamId using the ['default'] and so I'm using this hack for now.

When I add 6 components, 5 will be transformed to GlobalStreamId if I debug using print(fulfillment_bolt.inputs) but the 6th one is still a JavaBoltSpec.

It always seems to be the first component returned by bolt.inputs.items() which has not been transformed properly.

Any idea what is going wrong here?

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