alchemiscale icon indicating copy to clipboard operation
alchemiscale copied to clipboard

Use `pydantic` models for encoding `SynchronousComputeService` settings

Open dotsdl opened this issue 2 years ago • 2 comments

Currently, SynchronousComputeService takes its intensive settings in via kwargs on its __int__ method, with extensive settings on its start method (e.g. max number of tasks, max run time). This is okay, but we may be better served by creating a general settings pydantic model with nested init and start settings models for these two methods.

This would allow us to:

  • validate inputs in the models themselves
  • expand the models via inheritance for e.g. the AsynchronousComputeService
  • keep all settings in a single object within an initialized compute service for easy export and remixing, such as in the test suite

dotsdl avatar Mar 28 '23 07:03 dotsdl

Could also use the pydantic model as the basis for producing a sample config file on demand via the CLI.

dotsdl avatar Mar 31 '23 02:03 dotsdl

Addressing this in #218.

dotsdl avatar Feb 29 '24 17:02 dotsdl