-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change naming pattern Previous: internal/ckpts/model.go # db access internal/ckpts/controller.go # business logic internal/ckpts/view.go # api layer Current: internal/ckpts/ckpts.go # db access internal/ckpts/api.go # api layer The reason for the change was that there's basically nothing that's really in the model layer; bun handles all the database code all we really need to do is business logic (ckpts.go). The view layer is commonly called "api_*" in our system and terminates REST endpoints; it's only really responsible for converting to/from wire format (protobuf).
- Loading branch information
1 parent
03c68f3
commit 8b35cf5
Showing
15 changed files
with
764 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# git grep -liE 'from (raw_|)checkpoints' static/srv internal | ||
|
||
DONE: static/srv/get_checkpoint.sql | ||
DONE: static/srv/get_checkpoints_for_trial.sql | ||
DONE: static/srv/get_model_version.sql | ||
|
||
static/srv/get_checkpoints_for_experiment.sql | ||
static/srv/get_model_versions.sql | ||
static/srv/get_trial.sql | ||
static/srv/get_trial_metrics.sql | ||
static/srv/insert_model_version.sql | ||
static/srv/proto_get_trial_workloads.sql | ||
static/srv/update_model_version.sql | ||
internal/db/postgres_trial.go | ||
internal/db/postgres_experiments.go | ||
|
||
static/srv/get_checkpoint.sql | ||
internal/api_checkpoint.go::GetCheckpoint() | ||
moved to internal/ckpts/api.go::Server.GetCheckpoint() | ||
Replaced with ckpts.ByUUID() | ||
internal/api_model.go::PostModelVersion() | ||
Used only to verify checkpoint existence and state==COMPLETED. | ||
Replaced with new method ckpts.State(), which only touches the | ||
checkpoints tables (or at least, there's an XXX to make it so) | ||
|
||
static/srv/get_checkpoints_for_trial.sql | ||
internal/api_trials.go::GetTrialCheckpoints() | ||
moved to internal/ckpts/api.go::Server.GetTrialCheckpoints() | ||
Replaced with a Count/Limit.Offset.Scan pattern in a bun.Tx | ||
was a 404 possible with no checkpoints? It's not clear to me. | ||
|
||
# this was included indirectly, to make get_model_verision easier | ||
static/srv/get_model.sql | ||
internal/api_model.go::GetModel() | ||
replaced with models.ByName() | ||
|
||
static/srv/get_model_version.sql | ||
internal/api_model.go::GetModelVerison() | ||
replaced with models.ByNameTx, models.VersionTx, ckpts.ByIDTx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.