Project

General

Profile

Create a campaign » History » Version 6

Version 5 (Vito Di Benedetto, 06/25/2019 03:20 PM) → Version 6/7 (Anna Mazzacane, 11/01/2019 11:19 AM)

h1. Create a campaign

To create a POMS campaign by using POMS configuration files created by the XML converter, the command is:
<pre>
Project.py --create_campaign --ini_file ${USER}_<UserAnalysis>.ini --cfg_file ${USER}_<UserAnalysis>.cfg
</pre>

It is needed to have a valid certificate or proxy.
The command @kx509@ will check if a valid certificate or proxy is available available, if not, one will be nbe created

An output example of the POMS Campaign creation is the following:

<pre>
$ Project.py --create_campaign --ini_file vito_UserAnalysis.ini --cfg_file vito_UserAnalysis.cfg
2019-06-14 16:38:53,124 - INFO - uploading cfg: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.cfg
2019-06-14 16:38:53,148 - INFO - uploaded ini /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.ini
u'status: 201 Created'
u'campaign_stage_ids: '
[ [3679, u'bnb_pandora'],
[3675, u'bnb_trajcluster'],
[3680, u'extbnb_pandora'],
[3676, u'extbnb_trajcluster'],
[3678, u'overlay_testing_pandora'],
[3674, u'overlay_testing_trajcluster'],
[3677, u'overlay_training_pandora'],
[3673, u'overlay_training_trajcluster']]
u'message: OK'
u'campaign_id: 3493'
</pre>

This shows campaign stages id for each stage, and the campaign id for the POMS Campaign just created.

In case in a previous POMS campaign creation a @LoginSetup@ and or a @JobType@ with the same name have already been created, there will be a warning, the POMS Campaign will be created using the existing @LoginSetup@ and @JobType@.
This is shown in the following example:
<pre>
$ Project.py --create_campaign --ini_file vito_demo_v2.ini --cfg_file vito_demo_v2.cfg
2019-06-14 17:02:49,378 - INFO - uploading cfg: /uboone/app/users/vito/poms_cfg/vito_demo_v2.cfg
2019-06-14 17:02:49,404 - INFO - uploaded ini /uboone/app/users/vito/poms_cfg/vito_demo_v2.ini
u'status: 201 Created'
u'campaign_stage_ids: '
[ [3687, u'bnb_pandora'],
[3683, u'bnb_trajcluster'],
[3688, u'extbnb_pandora'],
[3684, u'extbnb_trajcluster'],
[3686, u'overlay_testing_pandora'],
[3682, u'overlay_testing_trajcluster'],
[3685, u'overlay_training_pandora'],
[3681, u'overlay_training_trajcluster']]
u'message: '
[ u"Warning: LoginSetup 'vito_login' already exists and will not change.",
u"Warning: JobType 'vito_demo_jobtype' already exists and will not change."]
u'campaign_id: 3494'
</pre>

POMS requires campaign name to be unique. In case a POMS Campaign with the same name already exist in POMS, the campaign creation will be aborted:
<pre>
$ Project.py --create_campaign --ini_file vito_UserAnalysis.ini --cfg_file vito_UserAnalysis.cfg
2019-06-14 17:05:45,822 - INFO - uploading cfg: /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.cfg
2019-06-14 17:05:45,848 - INFO - uploaded ini /uboone/app/users/vito/poms_cfg/vito_UserAnalysis.ini
u'status: 400 Bad Request'
u'message: '
[u"Error: Campaign 'vito_UserAnalysis' already exists!"]
</pre>

h1. Campaign details

To get info about existing POMS Campaigns there is the following command:
<pre>
Project.py --show_campaigns
</pre>

A typical output looks like this:
<pre>
$ Project.py --show_campaigns
{'view_active' : True,
'view_analysis' : True,
'view_inactive' : None,
'view_mine' : True,
'view_others' : None,
'view_production' : None,
'campaigns' : [

{ 'campaign_name' : 'vito_UserAnalysis',
'campaign_id' : 3493,
'active' : True,
'username' : vito,
'creator_role' : 'analysis',
'experiment' : 'uboone',
'session_experiment' : 'uboone',
'session_role' : 'analysis',
'tags' : None,
'stages' : [
{ 'stage_name' : 'overlay_training_trajcluster', 'stage_id' : 3673},
{ 'stage_name' : 'overlay_testing_trajcluster', 'stage_id' : 3674},
{ 'stage_name' : 'bnb_trajcluster', 'stage_id' : 3675},
{ 'stage_name' : 'extbnb_trajcluster', 'stage_id' : 3676},
{ 'stage_name' : 'overlay_training_pandora', 'stage_id' : 3677},
{ 'stage_name' : 'overlay_testing_pandora', 'stage_id' : 3678},
{ 'stage_name' : 'bnb_pandora', 'stage_id' : 3679},
{ 'stage_name' : 'extbnb_pandora', 'stage_id' : 3680}
]

},
{ 'campaign_name' : 'vito_demo_v2',
'campaign_id' : 3494,
'active' : True,
'username' : vito,
'creator_role' : 'analysis',
'experiment' : 'uboone',
'session_experiment' : 'uboone',
'session_role' : 'analysis',
'tags' : None,
'stages' : [
{ 'stage_name' : 'overlay_training_trajcluster', 'stage_id' : 3681},
{ 'stage_name' : 'overlay_testing_trajcluster', 'stage_id' : 3682},
{ 'stage_name' : 'bnb_trajcluster', 'stage_id' : 3683},
{ 'stage_name' : 'extbnb_trajcluster', 'stage_id' : 3684},
{ 'stage_name' : 'overlay_training_pandora', 'stage_id' : 3685},
{ 'stage_name' : 'overlay_testing_pandora', 'stage_id' : 3686},
{ 'stage_name' : 'bnb_pandora', 'stage_id' : 3687},
{ 'stage_name' : 'extbnb_pandora', 'stage_id' : 3688}
]

}
] }

</pre>

To get details of stages for a specific POMS Campaign the command is:
<pre>
Project.py --show_campaign_stages --campaign vito_UserAnalysis
{'view_active' : True,
'view_analysis' : True,
'view_inactive' : None,
'view_mine' : True,
'view_others' : None,
'view_production' : None,
'campaign_id' : 3493,
'experiment' : 'uboone',
'session_experiment' : 'uboone',
'session_role' : 'analysis',
'username' : 'vito' ,
'creator_role' : 'analysis',
'campaign_stages' : [
{ 'stage_name' : 'overlay_training_trajcluster',
'stage_id' : 3673,
'stage_type' : 'test',
'completion_pct' : 95,
'completion_type' :'complete',
'created' : '2019-06-14T16:58:53',
'cs_last_split' : None,
'cs_split_dimensions' : None,
'cs_split_type' : None,
'dataset' : None,
'hold_experimenter_id' : None,
'role_held_with' : None,
'job_type_id' : 770,
'login_setup_id' : 438,
'merge_overrides' : None,
'param_overrides' : [[u'--stage ', u'overlay_training_trajcluster'], [u'-Oglobal.sam_dataset=', u'overlay_v12_training']],
'updated' : None,
'updater' : None
},
{ 'stage_name' : 'overlay_testing_trajcluster',
'stage_id' : 3674,
'stage_type' : 'test',
'completion_pct' : 95,
'completion_type' :'complete',
'created' : '2019-06-14T16:58:53',
'cs_last_split' : None,
'cs_split_dimensions' : None,
'cs_split_type' : None,
'dataset' : None,
'hold_experimenter_id' : None,
'role_held_with' : None,
'job_type_id' : 770,
'login_setup_id' : 438,
'merge_overrides' : None,
'param_overrides' : [[u'--stage ', u'overlay_testing_trajcluster'], [u'-Oglobal.sam_dataset=', u'%(dataset)s']],
'updated' : None,
'updater' : None
},

[...]

] }

</pre>