This PR introduces a significant improvement to the Entropy ParamStore. ParamStore can now be configured to use a relational database to store its contents (i.e. Params, Tags and Commits). Using a relational database provides faster response times compared to the existing option of using a JSON file for storage. This holds particularly true around writing commits to disk.
To use the ParamStore with a relational database, use the new url argument when instantiating the ParamStore class. The value for url should be a URL that points to the location of the database.
For example, to connect to a SQLite database file (requires no further installation):
store = ParamStore(url="sqlite:///my_project/.entropy/param_store.db")
To connect to a PostgreSQL database server:
store = ParamStore(url="postgresql://username:password@server/database")
Optionally, you can place the URL in a configuration file called settings.toml inside an Entropy Project's .entropy folder
The PR includes the following breaking changes:
The ParamStore abstract base class has been removed.
The InProcessParamStore class has been renamed ParamStore and moved a new package called entropylab.pipeline.params.
As a result, any Entropy Projects that contain an existing ParamStore JSON file will need to be upgraded. To upgrade such a project, make a backup by copying the project folder to a safe location. In a Terminal or Command Prompt window run the Entropy CLI command: entropy upgrade <path to entropy project folder>.
The ParmStore method list_commits() now matches exactly by given label. Previously it would match when the label argument was contained in a commit label.
This PR introduces a significant improvement to the Entropy ParamStore. ParamStore can now be configured to use a relational database to store its contents (i.e. Params, Tags and Commits). Using a relational database provides faster response times compared to the existing option of using a JSON file for storage. This holds particularly true around writing commits to disk.
To use the ParamStore with a relational database, use the new
url
argument when instantiating theParamStore
class. The value forurl
should be a URL that points to the location of the database.For example, to connect to a SQLite database file (requires no further installation):
To connect to a PostgreSQL database server:
Optionally, you can place the URL in a configuration file called
settings.toml
inside an Entropy Project's.entropy
folderThe PR includes the following breaking changes:
The
ParamStore
abstract base class has been removed.The
InProcessParamStore
class has been renamedParamStore
and moved a new package calledentropylab.pipeline.params
.As a result, any Entropy Projects that contain an existing ParamStore JSON file will need to be upgraded. To upgrade such a project, make a backup by copying the project folder to a safe location. In a Terminal or Command Prompt window run the Entropy CLI command:
entropy upgrade <path to entropy project folder>
.The
ParmStore
methodlist_commits()
now matches exactly by givenlabel
. Previously it would match when thelabel
argument was contained in a commit label.