Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

296 scheduler fails unable to find assembly contigs #300

Merged

Conversation

mbthornton-lbl
Copy link
Contributor

@mbthornton-lbl mbthornton-lbl commented Nov 23, 2024

This PR provides fixes to the scheduler responsible for incorrect behaviors around finding new jobs and creating a new entry in the jobs collection
#296

Main cause of failure was a lack of matching workflow_execution db records to their workflow_config by type in workflow_process.py
this was not previously necessary, since each workflow_execution type was in its own collextion.

Other updates include

Test Results running scheduler in local environment with local copy of NMDC DB:

INFO:root:Initializing Scheduler
INFO:root:Found 1 new jobs for nmdc:wfmgan-11-6x59p192.2
INFO:root:JOB RECORD: nmdc:56493f34-a9f7-11ef-b8be-d61879508757

Job Record created in local jobs table:

{
    "_id" : ObjectId("67426cfc21a22e114d84b5c3"),
    "workflow" : {
        "id" : "MAGs: v1.3.12"
    },
    "id" : "nmdc:56493f34-a9f7-11ef-b8be-d61879508757",
    "created_at" : ISODate("2024-11-23T16:02:04.000+0000"),
    "config" : {
        "git_repo" : "https://github.com/microbiomedata/metaMAGs",
        "release" : "v1.3.12",
        "wdl" : "mbin_nmdc.wdl",
        "activity_id" : "nmdc:wfrbt-11-7r0srx57.9",
        "activity_set" : "workflow_execution_set",
        "was_informed_by" : "nmdc:omprc-11-cegmwy02",
        "trigger_activity" : "nmdc:wfmgan-11-6x59p192.2",
        "iteration" : NumberInt(9),
        "input_prefix" : "nmdc_mags",
        "inputs" : {
            "proj" : "{workflow_execution_id}",
            "contig_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_contigs.fna",
            "sam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgas-11-jchk0x71.1/nmdc_wfmgas-11-jchk0x71.1_pairedMapped_sorted.sam.gz",
            "gff_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_functional_annotation.gff",
            "proteins_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_proteins.faa",
            "cog_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_cog.gff",
            "ec_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_ec.tsv",
            "ko_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_ko.tsv",
            "pfam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_pfam.gff",
            "tigrfam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_tigrfam.gff",
            "crispr_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_crt.crisprs",
            "product_names_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_product_names.tsv",
            "gene_phylogeny_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_gene_phylogeny.tsv",
            "lineage_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_scaffold_lineage.tsv",
            "map_file" : "https://data.microbiomedata.org/data/nmdc:omprc-11-cegmwy02/nmdc:wfmgan-11-6x59p192.2/nmdc_wfmgan-11-6x59p192.2_contig_names_mapping.tsv"
        },

    },
    "claims" : [

    ]
}

@mbthornton-lbl mbthornton-lbl linked an issue Nov 23, 2024 that may be closed by this pull request
Copy link
Contributor

@aclum aclum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't appear to be a way to configure which yaml gets passed to sched.py

@aclum aclum self-requested a review November 25, 2024 17:47
Copy link
Contributor

@aclum aclum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not a way to specify what yaml sched.py uses.

@aclum
Copy link
Contributor

aclum commented Nov 25, 2024

Based on your local results there are issues:

  1. the minted typecode is not correct
    "activity_id" : "nmdc:wfrbt-11-7r0srx57.9", <- this should use a mag type code 'wfmag'
  2. "inputs" : {
    "proj" : "{workflow_execution_id}", <- this variable isn't be resolved to an identifier, it should match the activity_id

removed comments about output ID variable resolution, based on prod agent.state files this is expected.

@mbthornton-lbl mbthornton-lbl linked an issue Nov 25, 2024 that may be closed by this pull request
@mbthornton-lbl
Copy link
Contributor Author

mbthornton-lbl commented Nov 25, 2024

Local Testing results

nmdc-omprc-13-01jx8727_mags_job.json

Snippet showing correct activity_id, and proj:
/{
"_id" : ObjectId("6744ca7c4efb93d78d3a3621"),
"workflow" : {
"id" : "MAGs: v1.3.12"
},
"id" : "nmdc:3e65ee02-ab60-11ef-9628-d61879508757",
"created_at" : ISODate("2024-11-25T11:05:32.000+0000"),
"config" : {
"git_repo" : "https://github.com/microbiomedata/metaMAGs",
"release" : "v1.3.12",
"wdl" : "mbin_nmdc.wdl",
"activity_id" : "nmdc:wfmag-12-gk19g016.1",
"activity_set" : "workflow_execution_set",
"was_informed_by" : "nmdc:omprc-13-01jx8727",
"trigger_activity" : "nmdc:wfmgan-11-hg8af485.1",
"iteration" : NumberInt(1),
"input_prefix" : "nmdc_mags",
"inputs" : {
"proj" : "nmdc:wfmag-12-gk19g016.1",
"contig_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_contigs.fna",
"sam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgas-13-6dkenk77.1/nmdc_wfmgas-13-6dkenk77.1_pairedMapped_sorted.bam",
"gff_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_functional_annotation.gff",
"proteins_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_proteins.faa",
"cog_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_cog.gff",
"ec_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_ec.tsv",
"ko_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_ko.tsv",
"pfam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_pfam.gff",
"tigrfam_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_tigrfam.gff",
"crispr_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_crt.crisprs",
"product_names_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_product_names.tsv",
"gene_phylogeny_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_gene_phylogeny.tsv",
"lineage_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_scaffold_lineage.tsv",
"map_file" : "https://data.microbiomedata.org/data/nmdc:omprc-13-01jx8727/nmdc:wfmgan-11-hg8af485.1/nmdc_wfmgan-11-hg8af485.1_contig_names_mapping.tsv"
},

@mbthornton-lbl mbthornton-lbl requested a review from aclum November 25, 2024 19:11
@mbthornton-lbl mbthornton-lbl merged commit 2aec24f into main Nov 25, 2024
1 check passed
@mbthornton-lbl mbthornton-lbl deleted the 296-scheduler-fails-unable-to-find-assembly-contigs branch November 25, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scheduler assigning incorrect ID type for new jobs Scheduler fails Unable to find Assembly Contigs
2 participants