mriapp.retrieve package¶
mriapp.retrieve.BaseRetrieve module¶
-
class
mriapp.retrieve.BaseRetrieve.
BaseRetrieve
¶ Bases:
object
Base class to retrieve new solver jobs
-
retrieve_file
(location)¶ Fetch a file and return a json/dict representation
-
retrieve_task
()¶ Retrieve the next task and return a json/dict representation. A task can contain multiple directives and files to fetch. This is a generator
-
mriapp.retrieve.LocalRetrieve module¶
-
class
mriapp.retrieve.LocalRetrieve.
LocalRetrieve
(task_record)¶ Bases:
object
Retrieve new solver jobs from local filesystem
Parameters: task_record (string) – File on the local system containing a list of folders with tasks -
__del__
()¶ Make sure we close our file on object deletion
-
retrieve_file
(location)¶ Basically the identity function - we don’t need to get any network data for local files, so we’ll just pass back the file handle
Returns: location – Local location of a file. Return type: string
-
retrieve_task
()¶ Retrieve the next task and return a json/dict representation.
A task can contain a number of directives, but will generally contain the training task for Caffe, including the locations of model/solvers. This function is a generator and will allow iteration through the entire set of possible tasks.
Yields: task (dict) – A task located on the local drive
-