scipion-pyworkflow 3.10.2__py3-none-any.whl → 3.10.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyworkflow/constants.py CHANGED
@@ -43,7 +43,7 @@ VERSION_1 = '1.0.0'
43
43
  VERSION_1_1 = '1.1.0'
44
44
  VERSION_1_2 = '1.2.0'
45
45
  VERSION_2_0 = '2.0.0'
46
- VERSION_3_0 = '3.10.2'
46
+ VERSION_3_0 = '3.10.4'
47
47
 
48
48
  # For a new release, define a new constant and assign it to LAST_VERSION
49
49
  # The existing one has to be added to OLD_VERSIONS list.
@@ -287,7 +287,7 @@ class ThreadStepExecutor(StepExecutor):
287
287
  # Some nodes/threads do not use gpus so may not be booked and not in the dictionary
288
288
  if gpus is not None:
289
289
  self.gpuDict.pop(node)
290
- self.gpuDict[-node-1] = gpus
290
+ self.gpuDict[-node] = gpus
291
291
  logger.info("GPUs %s freed from step %s" % (gpus, node))
292
292
  else:
293
293
  logger.debug("step id %s not found in GPU slots" % node)
@@ -392,8 +392,6 @@ class QueueStepExecutor(ThreadStepExecutor):
392
392
  self.submitDict = submitDict
393
393
  # Command counter per thread
394
394
  self.threadCommands = {}
395
- for threadId in range(nThreads):
396
- self.threadCommands[threadId] = 0
397
395
 
398
396
  if nThreads > 1:
399
397
  self.runJobs = ThreadStepExecutor.runSteps
@@ -411,6 +409,15 @@ class QueueStepExecutor(ThreadStepExecutor):
411
409
 
412
410
  logger.debug("Updated gpus ids rebase starting from 0: %s per thread" %self.gpuDict)
413
411
 
412
+ def getThreadJobId(self, stepId):
413
+ """ Returns the job id extension assigned to each thread/step """
414
+ if not stepId in self.threadCommands:
415
+ self.threadCommands[stepId] = 0
416
+
417
+ self.threadCommands[stepId] += 1
418
+
419
+ return self.threadCommands[stepId]
420
+
414
421
  def runJob(self, log, programName, params, numberOfMpi=1, numberOfThreads=1, env=None, cwd=None, executable=None):
415
422
  threadId = threading.current_thread().thId
416
423
  submitDict = dict(self.hostConfig.getQueuesDefault())
@@ -418,8 +425,8 @@ class QueueStepExecutor(ThreadStepExecutor):
418
425
  submitDict['JOB_COMMAND'] = process.buildRunCommand(programName, params, numberOfMpi,
419
426
  self.hostConfig, env,
420
427
  gpuList=self.getGpuList())
421
- self.threadCommands[threadId] += 1
422
- subthreadId = '-%s-%s' % (threadId, self.threadCommands[threadId])
428
+ threadJobId = self.getThreadJobId(threadId)
429
+ subthreadId = '-%s-%s' % (threadId, threadJobId)
423
430
  submitDict['JOB_NAME'] = submitDict['JOB_NAME'] + subthreadId
424
431
  submitDict['JOB_SCRIPT'] = os.path.abspath(removeExt(submitDict['JOB_SCRIPT']) + subthreadId + ".job")
425
432
  submitDict['JOB_LOGS'] = os.path.join(getParentFolder(submitDict['JOB_SCRIPT']), submitDict['JOB_NAME'])
@@ -362,17 +362,15 @@ class Protocol(Step):
362
362
  # prerequisites of steps, but is easier to keep it
363
363
  stepsExecutionMode = STEPS_SERIAL
364
364
 
365
- @classmethod
366
- def modeSerial(cls):
365
+ def modeSerial(self):
367
366
  """ Returns true if steps are run one after another"""
368
367
  # Maybe this property can be inferred from the
369
368
  # prerequisites of steps, but is easier to keep it
370
- return cls.stepsExecutionMode == STEPS_SERIAL
369
+ return self.stepsExecutionMode == STEPS_SERIAL
371
370
 
372
- @classmethod
373
- def modeParallel(cls):
371
+ def modeParallel(self):
374
372
  """ Returns true if steps are run in parallel"""
375
- return not cls.modeSerial()
373
+ return not self.modeSerial()
376
374
 
377
375
  def __init__(self, **kwargs):
378
376
  Step.__init__(self, **kwargs)
@@ -1934,7 +1932,9 @@ class Protocol(Step):
1934
1932
  'JOB_CORES': self.numberOfMpi.get() * self.numberOfThreads.get(),
1935
1933
  'JOB_HOURS': 72,
1936
1934
  'GPU_COUNT': len(self.getGpuList()),
1937
- 'QUEUE_FOR_JOBS': 'N'
1935
+ 'QUEUE_FOR_JOBS': 'N',
1936
+ 'SCIPION_PROJECT': self.getProject().getShortName(),
1937
+ 'SCIPION_PROTOCOL': self.getRunName()
1938
1938
  }
1939
1939
  d.update(queueParams)
1940
1940
  return d
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scipion-pyworkflow
3
- Version: 3.10.2
3
+ Version: 3.10.4
4
4
  Summary: Simple workflow platform used in scientific applications, initially developed within the Scipion framework for image processing in Electron Microscopy.
5
5
  Home-page: https://github.com/scipion-em/scipion-pyworkflow
6
6
  Author: J.M. De la Rosa Trevin, Roberto Marabini, Grigory Sharov, Josue Gomez Blanco, Pablo Conesa, Yunior Fonseca Reyna
@@ -1,6 +1,6 @@
1
1
  pyworkflow/__init__.py,sha256=Wr-MVKMQJy_Cy-rpPPB0-pyv8-8tx7GPPaLSNBrV1AI,1246
2
2
  pyworkflow/config.py,sha256=_sq6YCRfcfE4WUNXLShgbICbBeTSLpD2KmPVapR1Wos,22306
3
- pyworkflow/constants.py,sha256=GG3_xDU181oUFld0DkGbvKq5lN606DjaCLnOsuVMDDQ,7448
3
+ pyworkflow/constants.py,sha256=EQ2RVEc4QdYO0vJVp-wW22WdBw5Yt1STFTlLJXgMBAQ,7448
4
4
  pyworkflow/exceptions.py,sha256=3VFxuNJHcIWxRnLPR0vYg0RFAQMmxPBJZLZSi87VI8E,507
5
5
  pyworkflow/object.py,sha256=yX3tBUuBssCI8aWGlTmyEKzFE59dJq_7NqllouVzMk0,55069
6
6
  pyworkflow/plugin.py,sha256=JJm5plPyOnPAR4To6I5rXVIBda-1Dg-53zicdnLSrac,28858
@@ -67,12 +67,12 @@ pyworkflow/project/scripts/stop.py,sha256=vCeCxkwPCoUkLbna5HCxKWJ1hrsI4U19Sg9JD4
67
67
  pyworkflow/protocol/__init__.py,sha256=bAdIpvUW4GAYdIuv92DZ44-OEkZ7lTtnp1S9T5cwtVs,1413
68
68
  pyworkflow/protocol/bibtex.py,sha256=mCUk1Hp5Vp_i2lozDM1BQNOw10e_RSu86oXvrR63sOA,2122
69
69
  pyworkflow/protocol/constants.py,sha256=DfuCs7eub-mLHJjEpHlIG9BW3fUpRwfTVwMYytNWv6U,3392
70
- pyworkflow/protocol/executor.py,sha256=x3v1q4NyF--iLMOMS2qsVpOEy-nge9IDuzWLllx5Tis,17769
70
+ pyworkflow/protocol/executor.py,sha256=qWm5Baf8snMzS0DyvjeyPIBPqkYgfiRqDOUt_8kqTYg,17960
71
71
  pyworkflow/protocol/hosts.py,sha256=B9ENNclqYe75CPqAMOoPjwn-r3ST6HxTewXtsK_zWks,10453
72
72
  pyworkflow/protocol/launch.py,sha256=7WKAiHma2tSuhqK4xVnxD_SnVt7Y5qyDFdQwTo8BLF0,11267
73
73
  pyworkflow/protocol/package.py,sha256=L6x3HHKtbrhDQRJHD07SG3DQKNMGaRQ0ROoLEY3SuRQ,1444
74
74
  pyworkflow/protocol/params.py,sha256=gP6QImgULvzCr-f0iseArIp1bjXm1JuUr9padmuMs7M,25901
75
- pyworkflow/protocol/protocol.py,sha256=K-srKr4D220JLwYcDfAAlfBsAvrqf55gnyCZsSTt3uc,97442
75
+ pyworkflow/protocol/protocol.py,sha256=AyeC_J_fA6Y_wgsJQNhbGO2g27zQZUwt9ezAoV8h9WM,97530
76
76
  pyworkflow/resources/Imagej.png,sha256=nU2nWI1wxZB_xlOKsZzdUjj-qiCTjO6GwEKYgZ5Risg,14480
77
77
  pyworkflow/resources/chimera.png,sha256=AKCuwMqmZo0Cg2sddMUjBWUhmAq-nPsAVCBpVrYNeiQ,815
78
78
  pyworkflow/resources/fa-exclamation-triangle_alert.png,sha256=31_XvRu0CkJ2dvHSpcBAR43378lIJTWwiag_A7SuUQc,585
@@ -131,10 +131,10 @@ pyworkflowtests/tests/test_protocol_export.py,sha256=z18nKPkOnrYLMU8KqcnVsF6-ylQ
131
131
  pyworkflowtests/tests/test_protocol_output.py,sha256=8gnIFMRNmwPnIBRCG29WHJB6mqK4FLGn1jiXHtTD6pY,5980
132
132
  pyworkflowtests/tests/test_streaming.py,sha256=vOH-bKCM-fVUSsejqNnCX5TPXhdUayk9ZtJHsNVcfCY,1615
133
133
  pyworkflowtests/tests/test_utils.py,sha256=_pTYGCuXC7YNMdCBzUYNfSBCR3etrHsxHfIhsQi4VPc,7465
134
- scipion_pyworkflow-3.10.2.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
135
- scipion_pyworkflow-3.10.2.dist-info/METADATA,sha256=-H5H84If9BMyHHX3bBRSZGwyJurbKwmlsUOHyi8U3_Y,4682
136
- scipion_pyworkflow-3.10.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
137
- scipion_pyworkflow-3.10.2.dist-info/dependency_links.txt,sha256=D7r_CPRjYRtBb3q_OBocTdsaeXI5TwnYMu5ri0JFtzs,84
138
- scipion_pyworkflow-3.10.2.dist-info/entry_points.txt,sha256=oR-zwsOICjEPINm-FWVPp-RfnpXZanVal4_XG6BWkkQ,127
139
- scipion_pyworkflow-3.10.2.dist-info/top_level.txt,sha256=PzyJteyenJwLjAeSFP7oYrTN_U71GABQwET8oLZkh9k,27
140
- scipion_pyworkflow-3.10.2.dist-info/RECORD,,
134
+ scipion_pyworkflow-3.10.4.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
135
+ scipion_pyworkflow-3.10.4.dist-info/METADATA,sha256=e8izqpLT9VEfQO9i0SVwrQo_iDqr8mmX0Sy_2zU7rSc,4682
136
+ scipion_pyworkflow-3.10.4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
137
+ scipion_pyworkflow-3.10.4.dist-info/dependency_links.txt,sha256=D7r_CPRjYRtBb3q_OBocTdsaeXI5TwnYMu5ri0JFtzs,84
138
+ scipion_pyworkflow-3.10.4.dist-info/entry_points.txt,sha256=oR-zwsOICjEPINm-FWVPp-RfnpXZanVal4_XG6BWkkQ,127
139
+ scipion_pyworkflow-3.10.4.dist-info/top_level.txt,sha256=PzyJteyenJwLjAeSFP7oYrTN_U71GABQwET8oLZkh9k,27
140
+ scipion_pyworkflow-3.10.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5