scipion-pyworkflow 3.10.1__py3-none-any.whl → 3.10.3__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.1'
46
+ VERSION_3_0 = '3.10.3'
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)
@@ -337,7 +337,7 @@ class ThreadStepExecutor(StepExecutor):
337
337
  for node in nodesFinished:
338
338
  step = runningSteps.pop(node) # remove entry from runningSteps
339
339
  freeNodes.append(node) # the node is available now
340
- self.freeGpusSlot(node)
340
+ self.freeGpusSlot(step.getObjId())
341
341
  # Notify steps termination and check if we should continue
342
342
  doContinue = stepFinishedCallback(step)
343
343
  if not doContinue:
@@ -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'])
@@ -1934,7 +1934,9 @@ class Protocol(Step):
1934
1934
  'JOB_CORES': self.numberOfMpi.get() * self.numberOfThreads.get(),
1935
1935
  'JOB_HOURS': 72,
1936
1936
  'GPU_COUNT': len(self.getGpuList()),
1937
- 'QUEUE_FOR_JOBS': 'N'
1937
+ 'QUEUE_FOR_JOBS': 'N',
1938
+ 'SCIPION_PROJECT': self.getProject().getShortName(),
1939
+ 'SCIPION_PROTOCOL': self.getRunName()
1938
1940
  }
1939
1941
  d.update(queueParams)
1940
1942
  return d
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scipion-pyworkflow
3
- Version: 3.10.1
3
+ Version: 3.10.3
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=y5mtef1j-asVkv2s0owbC0DSDwbbd4Vtxv_ToMdoNJ8,7448
3
+ pyworkflow/constants.py,sha256=Mq5KWfW83_LPOusFBXKyZN7d3AAgholg7WcKjM1dFmQ,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=tLqMm4Bmr8G8Ni4oNidCHG9oswHAwvfORABQe3F3u-w,17758
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=yOvF9QCjIgDzcxr7qMEG3F6ymtW1ocw1KxiKGddOcPw,97560
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.1.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
135
- scipion_pyworkflow-3.10.1.dist-info/METADATA,sha256=hzV_49aH0z8vvHf3pNd0kAK7e8YQNpVyg4-H-hO-LeA,4682
136
- scipion_pyworkflow-3.10.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
137
- scipion_pyworkflow-3.10.1.dist-info/dependency_links.txt,sha256=D7r_CPRjYRtBb3q_OBocTdsaeXI5TwnYMu5ri0JFtzs,84
138
- scipion_pyworkflow-3.10.1.dist-info/entry_points.txt,sha256=oR-zwsOICjEPINm-FWVPp-RfnpXZanVal4_XG6BWkkQ,127
139
- scipion_pyworkflow-3.10.1.dist-info/top_level.txt,sha256=PzyJteyenJwLjAeSFP7oYrTN_U71GABQwET8oLZkh9k,27
140
- scipion_pyworkflow-3.10.1.dist-info/RECORD,,
134
+ scipion_pyworkflow-3.10.3.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
135
+ scipion_pyworkflow-3.10.3.dist-info/METADATA,sha256=jERcL0F07HCz0u3s_dfRVMNIK5_scsbw9oai4TlQ9SI,4682
136
+ scipion_pyworkflow-3.10.3.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
137
+ scipion_pyworkflow-3.10.3.dist-info/dependency_links.txt,sha256=D7r_CPRjYRtBb3q_OBocTdsaeXI5TwnYMu5ri0JFtzs,84
138
+ scipion_pyworkflow-3.10.3.dist-info/entry_points.txt,sha256=oR-zwsOICjEPINm-FWVPp-RfnpXZanVal4_XG6BWkkQ,127
139
+ scipion_pyworkflow-3.10.3.dist-info/top_level.txt,sha256=PzyJteyenJwLjAeSFP7oYrTN_U71GABQwET8oLZkh9k,27
140
+ scipion_pyworkflow-3.10.3.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