Ryan Patet Posted April 5 Posted April 5 I am using Seeq DataLab to pull in data from multiple processing units running in parallel. I am assessing the states of each of these units, and building a set of capsules for when each individual unit is running. I then am pushing these capsules as a condition back into a workbook. I am able to successfully achieve this using a for loop and using separate data pushes for each unit. I find that the time for the data to push back to the Workbook takes the longest, and was curious to see if I could do one large push of Conditions for all unit ops at once, rather than having to do separate pushes for each unit? I have done this for multiple Signals in the past, but cannot find documentation for a way to do it with multiple Conditions. Below is a concatenated version of the code I am currently running using the for loops: for index in range(len(state)): ... capsule_bounds = pd.DataFrame({'Capsule Start': start_list, 'Capsule End': end_list, 'Batch ID': batch_id_list}) spy.push(data=capsule_bounds, metadata=pd.DataFrame([{ 'Name': 'Unit '+[index]+' Condition', 'Type': 'Condition', 'Maximum Duration': max_dur}]), replace={'Start': start_time, 'End': end_time}, workbook=workbook_id)
Seeq Team Solution Mark Derbecker Posted April 5 Seeq Team Solution Posted April 5 (edited) Hi Ryan, In the latest versions of SPy (use v190.2 or later) you can supply a "Condition" column in your "data" DataFrame that corresponds to an index entry in your "metadata" DataFrame, and this combination will allow you to push multiple conditions in spy.push() call. It should be faster because SPy will push the conditions in parallel. Take a look at the docs here for more info: https://python-docs.seeq.com/user_guide/spy.push.html#pushing-condition-and-capsule-data Edited April 5 by Mark Derbecker
Ryan Patet Posted April 6 Author Posted April 6 Thank you, Mark. Read through the docs but missed that paragraph when reading through. Knowing that it was in there helped me find it - and your solution sped up the data push, as expected.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now