Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions pandajedi/jediorder/JobGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,11 +991,11 @@ def doGenerate(
simul: bool = False,
taskParamMap: dict[str, Any] | None = None,
splitter: JobSplitter | None = None,
) -> tuple[Interaction.StatusCode, list[JobSpec], list[Any], list[Any], dict[int, Any], dict[int, Any]]:
) -> tuple[Interaction.StatusCode, list[JobSpec], list[Any], list[Any], dict[int, Any], dict[int, JediDatasetSpec]]:
# Return for failure. Every caller checks the status before it touches the rest,
# and then only measures, iterates or indexes them, so empty stands in for None
# and spares each of those uses a check it never made
failedRet: tuple[Interaction.StatusCode, list[JobSpec], list[Any], list[Any], dict[int, Any], dict[int, Any]] = (
failedRet: tuple[Interaction.StatusCode, list[JobSpec], list[Any], list[Any], dict[int, Any], dict[int, JediDatasetSpec]] = (
Interaction.SC_FAILED,
[],
[],
Expand Down Expand Up @@ -1025,7 +1025,7 @@ def doGenerate(
useBoundary = taskSpec.useGroupWithBoundaryID()
# loop over all sub chunks
jobSpecList = []
outDsMap: dict[int, Any] = {}
outDsMap: dict[int, JediDatasetSpec] = {}
datasetToRegister = []
oldPandaIDs: list[Any] = []
siteDsMap: dict[str, Any] = {}
Expand Down Expand Up @@ -1794,8 +1794,8 @@ def doGenerate(
# get dataset
if tmpFileSpec.datasetID not in outDsMap:
ds_ok, tmpDataset = self.taskBufferIF.getDatasetWithID_JEDI(taskSpec.jediTaskID, tmpFileSpec.datasetID) # type: ignore[arg-type] # the id is a column, which is declared optional
# not found
if not ds_ok:
# failed, or not found: a missing row comes back as None with ds_ok set
if not ds_ok or tmpDataset is None:
tmpLog.error(f"failed to get DS with datasetID={tmpFileSpec.datasetID}")
return failedRet
outDsMap[tmpFileSpec.datasetID] = tmpDataset # type: ignore[index] # the id is a column, which is declared optional
Expand Down Expand Up @@ -1830,8 +1830,8 @@ def doGenerate(
for tmpFileSpec in tmpFileSpecList:
if tmpFileSpec.datasetID not in outDsMap:
ds_ok, tmpDataset = self.taskBufferIF.getDatasetWithID_JEDI(taskSpec.jediTaskID, tmpFileSpec.datasetID) # type: ignore[arg-type] # the id is a column, which is declared optional
# not found
if not ds_ok:
# failed, or not found: a missing row comes back as None with ds_ok set
if not ds_ok or tmpDataset is None:
tmpLog.error(f"failed to get DS with datasetID={tmpFileSpec.datasetID}")
return failedRet
outDsMap[tmpFileSpec.datasetID] = tmpDataset
Expand Down Expand Up @@ -2254,11 +2254,11 @@ def doGeneratePrePro(
# get dataset
if tmpFileSpec.datasetID not in outDsMap:
ds_ok, tmpDataset = self.taskBufferIF.getDatasetWithID_JEDI(taskSpec.jediTaskID, tmpFileSpec.datasetID) # type: ignore[arg-type] # the id is a column, which is declared optional
# not found
if not ds_ok:
# failed, or not found: a missing row comes back as None with ds_ok set
if not ds_ok or tmpDataset is None:
tmpLog.error(f"doGeneratePrePro failed to get logDS with datasetID={tmpFileSpec.datasetID}")
return failedRet
outDsMap[tmpFileSpec.datasetID] = tmpDataset # type: ignore[assignment]
outDsMap[tmpFileSpec.datasetID] = tmpDataset
# convert to job's FileSpec
tmpDatasetSpec = outDsMap[tmpFileSpec.datasetID]
tmpOutFileSpec = tmpFileSpec.convertToJobFileSpec(tmpDatasetSpec, setType="log")
Expand Down Expand Up @@ -2684,7 +2684,7 @@ def increaseEventServiceConsumers(
nConsumers: int,
nSitesPerJob: int,
parallelOutMap: dict[int, Any],
outDsMap: dict[int, Any],
outDsMap: dict[int, JediDatasetSpec],
oldPandaIDs: list[Any],
taskSpec: JediTaskSpec,
inputChunk: InputChunk,
Expand Down Expand Up @@ -2819,7 +2819,7 @@ def clonePandaJob(

# make jumbo jobs
def makeJumboJobs(
self, pandaJobs: list[JobSpec], taskSpec: JediTaskSpec, inputChunk: InputChunk, simul: bool, outDsMap: dict[int, Any], tmpLog: MsgWrapper
self, pandaJobs: list[JobSpec], taskSpec: JediTaskSpec, inputChunk: InputChunk, simul: bool, outDsMap: dict[int, JediDatasetSpec], tmpLog: MsgWrapper
) -> list[JobSpec]:
jumboJobs: list[Any] = []
# no original
Expand Down