Package Ganga :: Package GPIDev :: Package Lib :: Package Job :: Module Job' :: Class JobTemplate :: Class _proxyClass
[hide private]
[frames] | no frames]

Class _proxyClass

source code

    object --+    
             |    
GPIProxyObject --+
                 |
                Lib.Job.Job'.JobTemplate._proxyClass

A placeholder for Job configuration parameters.

    JobTemplates are normal Job objects but they are never submitted. They have their own JobRegistry, so they do not get mixed up with
    normal jobs. They have always a "template" status.

    Create a job with an existing job template t:
    
         j = Job(t)

    Save a job j as a template t:

         t = JobTemplate(j)

    You may save commonly used job parameters in a template and create new jobs easier and faster.
    

Properties:

     info             JobInfo . ('jobinfos' object, default=None,comparable)

     status           current state of the job, one of "new", "submitted",
                      "running", "completed", "killed", "unknown", "incomplete".
                      (simple property, default='template',protected,comparable)

     name             optional label which may be any combination of ASCII
                      characters. (simple property, default='',comparable)

     application      specification of the application to be executed.
                      ('applications' object, default=None,comparable)

     merger           optional output merger. ('mergers' object,
                      default=None,comparable,optional)

     do_auto_resubmit Automatically resubmit failed subjobs. (simple property,
                      default=False,comparable)

     id               unique Ganga job identifier generated automatically.
                      (simple property, default='',protected)

     inputsandbox     list of File objects shipped to the worker node . ('files'
                      object, list, default=[],comparable)

     outputdir        location of output directory (file workspace). (simple
                      property, default=None,transient,protected,optional)

     fqid             fully qualified job identifier. (simple property,
                      default=None,transient,protected,optional)

     inputdir         location of input directory (file workspace). (simple
                      property, default=None,transient,protected,optional)

     master           master job. ('jobs' object,
                      default=None,transient,protected,optional)

     outputdata       dataset definition (typically this is specific either to
                      an application, a site or the virtual organization.
                      ('datasets' object, default=None,comparable,optional)

     time             provides timestamps for status transitions. ('jobtime'
                      object, default=None,protected)

     splitter         optional splitter. ('splitters' object,
                      default=None,comparable,optional)

     outputsandbox    list of filenames or patterns shipped from the worker
                      node. (simple property, list, default=[],comparable)

     subjobs          list of subjobs (if splitting). ('jobs' object, list,
                      default=[],protected,comparable,optional)

     inputdata        dataset definition (typically this is specific either to
                      an application, a site or the virtual organization.
                      ('datasets' object, default=None,comparable,optional)

     backend          specification of the resources to be used (e.g. batch
                      system). ('backends' object, default=None,comparable)

Nested Classes [hide private]
  _impl
This is a Ganga.GPI.JobTemplate implementation class.
Instance Methods [hide private]
 
__eq__(self, x)
Equality operator (==), compare the JobTemplate properties which are declared as [comparable].
source code
 
__init__(self, *args, **kwds)
GPI JobTemplate object constructor: JobTemplate() : create jobtemplate with default settings; JobTemplate(j) : make a copy of j; JobTemplate(j,x=a,...): make a copy of j and set property 'x' to a, etc..
source code
 
__ne__(self, x)
Non-equality operator (!=).
source code
 
__repr__(self)
Return an short representation of JobTemplate object.
source code
 
__setattr__(self, x, v)
Set a property of JobTemplate with consistency and safety checks.
source code
 
__str__(self)
Return a printable string representing JobTemplate object as a tree of properties.
source code
 
copy(self)
Make an identical copy of self.
source code
 
fail(...)
Deprecated.
source code
 
force_status(...)
Force job to enter the "failed" or "completed" state.
source code
 
kill(...)
Templates may not be killed, return false.
source code
 
merge(...)
Merge the output of subjobs.
source code
 
peek(...)
Allow viewing of job output (and input) files
source code
 
remove(...)
See Job for documentation.
source code
 
resubmit(...)
Resubmit a failed or completed job.
source code
 
submit(...)
Templates may not be submitted, return false.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  application = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor obj...
  backend = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object ...
  do_auto_resubmit = <Ganga.GPIDev.Base.Proxy.ProxyDataDescripto...
  fqid = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
  id = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x...
  info = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
  inputdata = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
  inputdir = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
  inputsandbox = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor ob...
  master = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object a...
  merger = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object a...
  name = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
  outputdata = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor obje...
  outputdir = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
  outputsandbox = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor o...
  splitter = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
  status = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object a...
  subjobs = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object ...
  time = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

GPI JobTemplate object constructor: JobTemplate() : create jobtemplate with default settings; JobTemplate(j) : make a copy of j; JobTemplate(j,x=a,...): make a copy of j and set property 'x' to a, etc..

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return an short representation of JobTemplate object.

Overrides: object.__repr__

__setattr__(self, x, v)

source code 

Set a property of JobTemplate with consistency and safety checks. Setting a [protected] or a unexisting property raises AttributeError.

Overrides: object.__setattr__

__str__(self)
(Informal representation operator)

source code 

Return a printable string representing JobTemplate object as a tree of properties.

Overrides: object.__str__

fail(...)

source code 

Deprecated. Use force_status('failed') instead.

force_status(...)

source code 

Force job to enter the "failed" or "completed" state. This may be used for marking jobs "bad" jobs or jobs which are stuck in one of the internal ganga states (e.g. completing).

To see the list of allowed states do: job.force_status(None)

merge(...)

source code 

Merge the output of subjobs.

By default merge all subjobs into the master outputdir. The output location and the list of subjobs may be overriden. The options (keyword arguments) are passed onto the specific merger implementation. Refer to the specific merger documentation for more information about available options.

peek(...)

source code 

Allow viewing of job output (and input) files

Arguments other than self:
filename : name of file to be viewed
           => For backends where this is enabled, the filename
              for a job in the "running" state is relative to
              the job's work directory unless the filename begins
              with "../".  In all other cases, the filename is
              relative to the job's output directory
command  : command to be used for viewing the file
           => If no command is given, then the command defined in
              the [File_Associations] section of the Ganga
              configuration file(s) is used

Example usage:

   # examine contents of output/work directory
   peek()

   # examine contents of output directory,
   # even in case of job in "running" state
   peek( "../output" )

   # examine contents of input directory
   peek( "../input" )

   # View ROOT histograms, running root.exe in a new terminal window
   peek( "histograms.root", "root.exe &&" )

   # View contents of file in output/work directory, using
   # command defined in configuration file
   peek( "output.txt" )

   # View ROOT histograms in ouput/work directory,
   # running root.exe in a new terminal window
   peek( "histograms.root", "root.exe &&" )
              
Return value: None

remove(...)

source code 

See Job for documentation. The force optional argument has no effect (it is provided for the compatibility with Job interface)

resubmit(...)

source code 
Resubmit a failed or completed job.  A backend object may
be specified to change some submission parameters (which
parameters may be effectively changed depends on a
particular backend implementation).

Example:
 b = j.backend.copy()
 b.CE = 'some CE'
 j.resubmit(backend=b)

Note: it is not possible to change the type of the backend in this way.


Class Variable Details [hide private]

application

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9d10>

backend

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab4d0>

do_auto_resubmit

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9e10>

fqid

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab050>

id

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9e90>

info

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9b90>

inputdata

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab450>

inputdir

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab0d0>

inputsandbox

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9f10>

master

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab150>

merger

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9d90>

name

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9c90>

outputdata

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab1d0>

outputdir

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9f90>

outputsandbox

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab350>

splitter

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab2d0>

status

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18a9c10>

subjobs

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab3d0>

time

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x18ab250>