Skip to content

Cannot save experiments while a update task is active #45

Description

@nhpackard

Occasionally the API hangs with message "Cannot save experiments while a update task is active".

Conditions for recreation of the are currently unclear. I typically can execute a couple generations, then the error appears, and the session cannot move forward.

Error occurs after a call like:

newgen = daptics.put_experiments_csv(
    DapticsExperimentsType.DESIGNED_WITH_OPTIONAL_EXTRAS,
    csv_experiments_file)

but error is also generated by calls like:

# Do the experiment:
# simulated experimental response
space = daptics.get_experimental_space()
design = daptics.design
experiments = daptics.random_experiments_with_responses(space, design)
expsim = daptics.simulate_experiment_responses(experiments)

Curiously, if the last example is executed without the last line, the error is not generated.

The full error is:

---------------------------------------------------------------------------
GraphQLError                              Traceback (most recent call last)
Input In [53], in <cell line: 1>()
----> 1 newgen = daptics.put_experiments_csv(
      2     DapticsExperimentsType.DESIGNED_WITH_OPTIONAL_EXTRAS,
      3     csv_experiments_file)

File ~/Projects/daptics-api/python_client/daptics_client/daptics_client.py:2120, in DapticsClient.put_experiments_csv(self, experiments_type, fname)
   2118 else:
   2119     raise CsvNoDataRowsError(fname)
-> 2120 return self.put_experiments(experiments_type, experiments)

File ~/Projects/daptics-api/python_client/daptics_client/daptics_client.py:2025, in DapticsClient.put_experiments(self, experiments_type, experiments)
   2023 else:
   2024     data, errors = self.call_api(doc, vars)
-> 2025 self._raise_exception_on_error(data, errors)
   2027 if 'putExperiments' in data and data['putExperiments'] is not None:
   2028     task_id = data['putExperiments']['taskId']

File ~/Projects/daptics-api/python_client/daptics_client/daptics_client.py:856, in DapticsClient._raise_exception_on_error(self, data, errors)
    853 if not self._successful(data):
    854     if errors:
    855         # This is what gql does with errors
--> 856         raise GraphQLError(str(errors[0]['message']))
    857     else:
    858         raise GraphQLError('Unknown error')

GraphQLError: Cannot save experiments while a update task is active.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions