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

Fix max_page_size parameter on get_previously_aggregated_workflow_ids method of Aggregator class #28

Closed
kheal opened this issue Nov 26, 2024 · 1 comment

Comments

@kheal
Copy link
Contributor

kheal commented Nov 26, 2024

Dependent on addressing microbiomedata/nmdc-runtime#797 .

See #FIXME tag in generate_metap_agg.py script. We should enable some pagination (once feasible) on the initial gathering of previously-aggregated workflow IDs.

Current:

        """Function to return all ids of workflow execution ids that have already been aggregated.

        Uses the aggregation_filter attribute to filter the results for subclasses.

        Returns
        -------
        list
            List of workflow ids that have already been aggregated
        """
        agg_col = self.get_results(
            collection="functional_annotation_agg",
            filter=self.aggregation_filter,
            #FIXME: Using max_page_size of 0 may not work as we scale up the functional_annotation_agg collection - see issue: 
            # https://github.com/microbiomedata/nmdc-runtime/issues/797
            max_page_size=0,
            fields="was_generated_by",
        )
        ids = list(set([x["was_generated_by"] for x in agg_col]))
        return ids

Desired:

        """Function to return all ids of workflow execution ids that have already been aggregated.

        Uses the aggregation_filter attribute to filter the results for subclasses.

        Returns
        -------
        list
            List of workflow ids that have already been aggregated
        """
        agg_col = self.get_results(
            collection="functional_annotation_agg",
            filter=self.aggregation_filter,
            max_page_size=1000,
            fields="was_generated_by",
        )
        ids = list(set([x["was_generated_by"] for x in agg_col]))
        return ids
@kheal
Copy link
Contributor Author

kheal commented Dec 3, 2024

This has been fixed!

@kheal kheal closed this as completed Dec 3, 2024
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

No branches or pull requests

1 participant