Skip to content

Commit 109da7c

Browse files
committed
Reviewer feedback: docs and err msgs
1 parent bc8a46d commit 109da7c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

smartsim/experiment.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ def get_status(self, *records: Record) -> tuple[JobStatus | InvalidJobStatus, ..
234234
"""Get the status of jobs launched through the `Experiment` from the
235235
record returned when calling `Experiment.start`.
236236
237-
The `Experiment` will map the launched id of the record back to the
237+
The `Experiment` will map the record id of the record back to the
238238
launcher that started the job and request a status update. The order of
239-
the returned statuses exactly matches the order of the records.
239+
the returned statuses matches the order of the records.
240240
241241
If the `Experiment` cannot find any launcher that started the job
242242
associated with the launched job id, then a
@@ -448,9 +448,9 @@ def stop(self, *records: Record) -> tuple[JobStatus | InvalidJobStatus, ...]:
448448
respective of the order of the calling arguments.
449449
"""
450450
if not records:
451-
raise ValueError("No records provided")
451+
raise ValueError("No records provided. No jobs will be stopped.")
452452
if not all(isinstance(record, Record) for record in records):
453-
raise TypeError("record argument was not of type Record")
453+
raise TypeError("Record argument was not of type `Record`.")
454454
ids = tuple(record.launched_id for record in records)
455455
by_launcher = self._launch_history.group_by_launcher(set(ids), unknown_ok=True)
456456
id_to_stop_stat = (

smartsim/launchable/job.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def __str__(self) -> str: # pragma: no cover
164164

165165
@t.final
166166
class Record:
167-
"""A Record object to track a launched job along with its assigned
168-
launch ID.
167+
"""An object composed of a unique identifier for a launched job, and a copy
168+
of the job that was launched.
169169
"""
170170

171171
def __init__(self, launch_id: LaunchedJobID, job: Job) -> None:
@@ -198,6 +198,6 @@ def __str__(self) -> str:
198198
Launch Record:
199199
Launched Job ID:
200200
{self.launched_id}
201-
Laucnehd Job:
201+
Launched Job:
202202
{textwrap.indent(str(self._job), " ")}
203203
""")

0 commit comments

Comments
 (0)