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

finder.model_id failing on MetLife cluster #59

Open
mspector opened this issue Jun 28, 2021 · 3 comments
Open

finder.model_id failing on MetLife cluster #59

mspector opened this issue Jun 28, 2021 · 3 comments
Assignees

Comments

@mspector
Copy link

Reference: https://github.com/IndicoDataSolutions/Indico-Solutions-Toolkit/blob/main/examples/find_related_ids.py

Snippet:

my_config = IndicoConfig(
    host='metliferis-dev.indico.domains',
    api_token_path='/home/michael/indico_api_token.txt',
)
client = IndicoClient(config=my_config)

finder = FindRelated(client)
related = finder.model_id(469)
print(related["model_group_id"])

Error:
IndicoRequestError: Status: 400, Error: DataLoader must be constructed with a function which accepts Iterable<key> and returns Future<Iterable<value>>, but the function did not return a Future of a Iterable with the same length as the Iterable of keys.

@mspector
Copy link
Author

Looks like something related to workflows. Full stack trace:

---------------------------------------------------------------------------
IndicoRequestError                        Traceback (most recent call last)
<ipython-input-4-0c627fff8d10> in <module>
      1 finder = FindRelated(client)
----> 2 related = finder.model_id(469)
      3 print(related["model_group_id"])

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico_toolkit/indico_wrapper/find_related.py in model_id(self, model_id)
     89         model_groups = self.graphQL_request(query)["modelGroups"]["modelGroups"]
     90         relevant_group = self._match_model_group_and_model_id(model_groups, model_id)
---> 91         workflow_data = self._get_workflow_data(dataset_id=[relevant_group["datasetId"]])
     92         workflow_id = self._match_workflow_and_model_group(workflow_data, relevant_group["id"])
     93         return {

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico_toolkit/indico_wrapper/find_related.py in _get_workflow_data(self, dataset_id, workflow_id)
    125         else:
    126             variables = {"workflowIds": [workflow_id]}
--> 127         res = self.graphQL_request(query, variables)
    128         return res["workflows"]["workflows"]
    129 

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico_toolkit/indico_wrapper/indico_wrapper.py in graphQL_request(self, graphql_query, variables)
     61 
     62     def graphQL_request(self, graphql_query: str, variables: dict = None):
---> 63         return self.client.call(
     64             GraphQLRequest(query=graphql_query, variables=variables)
     65         )

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico/client/client.py in call(self, request)
     64             return self._handle_request_chain(request)
     65         elif request and isinstance(request, HTTPRequest):
---> 66             return self._http.execute_request(request)

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico/http/client.py in execute_request(self, request)
     74 
     75     def execute_request(self, request: HTTPRequest):
---> 76         return request.process_response(
     77             self._make_request(
     78                 method=request.method.value.lower(), path=request.path, **request.kwargs

~/anaconda/envs/metlife/lib/python3.8/site-packages/indico/client/request.py in process_response(self, response)
     40         if errors:
     41             extras = {"locations": [error.pop("locations", None) for error in errors]}
---> 42             raise IndicoRequestError(
     43                 error="\n".join(error["message"] for error in errors),
     44                 code=400,

@jonaskaz jonaskaz self-assigned this Jun 30, 2021
@jonaskaz
Copy link
Contributor

Unable to replicate on the same model_id. Error appears to be nondeterministic, perhaps ops related.

@mspector
Copy link
Author

@jonaskaz , could you explain how you came to the conclusion that the error is nondeterministic?

I'm able to reproduce it every time. You're free to close this issue if you'd like, but from my perspective, it remains broken.

I'm happy to help test if you suspect that there is some environment problem on my end. Just let me know.

@jonaskaz jonaskaz reopened this Jul 29, 2021
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

2 participants