Unable to `save` a Workflow: Appears to be due to missing attributes
Closed this issue · 10 comments
For instance Workflow has no attribute links.project
needed for .save()
In [6]: workflow = panoptes_client.Workflow()
In [7]: workflow.links.project
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-7-d07d007d97eb> in <module>()
----> 1 workflow.links.project
To add context -- scotty is one of the leads for the Gravity Spy project.
He is working towards the broader goal of helping volunteers spin up their own projects or workflows within the Gravity Spy project or organization. These new workflows would vet whether they have truly found a new glitch type.
The existing steps are:
- volunteer identifies potential new glitch type and picks an exemplar subject
- volunteer uses https://gravityspytools.ciera.northwestern.edu/search/do_similarity_search/ (which Scotty built) to search for other subjects that ML indicates have similar features as their subject of interest.
- volunteer creates a zooniverse collection with these subjects
Scotty will then create a subject set based on that collection (which he can do via the API).
The next step is to create the workflow and associate the subject set with this workflow. And that's the bug he's running into, as listed above.
All this is just to add context for why this is of interest to him/us.
@astopy Do you have a sense for when in your upcoming effort you'll have time to allocate to issues on the python client? Do you have a prioritization of what you need to work on first? Could this be included in those early efforts?
Could we just add a button in the lab subject sets editor to import subjects from a collection? I think we talked about this before.
oh, I think I might have been unclear. Scotty can already link subjects from a collection to a subject set via the API.
What he can't do is get past the bug he pasted above about saving a workflow.
I updated my comment above to clarify.
Is the goal to script workflow creations for the existing Gravity Spy project or for a volunteer created project under a Gravity Spy organization? I'm still unclear why workflow creation needs to be scripted.
@srallen The idea is the following. A user has created a large collection from a similarity search in an effort to find enough samples for a new class. This user would like to have others vet this collection in a simply yes/no style workflow. To do this they can go here: https://gravityspytools.ciera.northwestern.edu/collection-to-subject-set/ put in the URL for the collection and then the website will transform their collection into a subject set, create a yes/no workflow for them called "Possible New Glitch Name Blah" that has an example image and only yes no options with some basic retired meant (if three yes or no it gets retired as either an example of this new category or not). This workflow will exist in a pre created project called "Vet New Class" or whatever I called it that is under the Gravity Spy Organization. We can take all the retired yes samples as the new subjects for the training set and add it as a class. That is the idea behind programatically creating workflows on user request.
@trouille Sorry, I didn't realise this was blocking anything. I'm planning a 1.0.1 release which will include this and a few other bug fixes -- I'll try to get that out next week (it's pretty much at the top of my to-do list now anyway).
@scottcoughlin2014 The fix for this will be included in 1.0.1, but you can start using it right away by installing from this branch:
pip install -U git+git://github.com/zooniverse/panoptes-python-client.git#release/1.0
@astopy thanks a ton!
@scottcoughlin2014 Thanks for explaining the use case in more detail. I'm a bit behind I think in the discussion of how the volunteer led projects in the GS organization will work.