Skip to content

Commit 09ea0c8

Browse files
authored
rename the trial to experiment (#174)
* rename the trial to experiment Signed-off-by: kerthcet <kerthcet@gmail.com> * update comment Signed-off-by: kerthcet <kerthcet@gmail.com> --------- Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent 58c99e5 commit 09ea0c8

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

alphatrion/storage/metastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def create_experiment(
110110
raise NotImplementedError("Subclasses must implement this method.")
111111

112112
@abstractmethod
113-
def get_experiment(self, exp_id: uuid.UUID) -> Experiment | None:
113+
def get_experiment(self, experiment_id: uuid.UUID) -> Experiment | None:
114114
raise NotImplementedError("Subclasses must implement this method.")
115115

116116
@abstractmethod

alphatrion/storage/sql_models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Experiment(Base):
132132
meta = Column(
133133
MutableDict.as_mutable(JSON),
134134
nullable=True,
135-
comment="Additional metadata for the trial",
135+
comment="Additional metadata for the experiment",
136136
)
137137
params = Column(
138138
MutableDict.as_mutable(JSON),
@@ -145,12 +145,14 @@ class Experiment(Base):
145145
nullable=False,
146146
comment="Type of the experiment",
147147
)
148-
duration = Column(Float, default=0.0, comment="Duration of the trial in seconds")
148+
duration = Column(
149+
Float, default=0.0, comment="Duration of the experiment in seconds"
150+
)
149151
status = Column(
150152
Integer,
151153
default=Status.PENDING,
152154
nullable=False,
153-
comment="Status of the trial, \
155+
comment="Status of the experiment, \
154156
0: UNKNOWN, 1: PENDING, 2: RUNNING, 9: COMPLETED, \
155157
10: CANCELLED, 11: FAILED",
156158
)

alphatrion/storage/sqlstore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ def create_project(
275275
session.add(new_proj)
276276
session.commit()
277277

278-
exp_id = new_proj.uuid
278+
proj_id = new_proj.uuid
279279
session.close()
280280

281-
return exp_id
281+
return proj_id
282282

283283
# Soft delete the project now.
284284
def delete_project(self, project_id: uuid.UUID):

0 commit comments

Comments
 (0)