Skip to content

Commit

Permalink
fix: remove parent_id from create_experiment (#9068)
Browse files Browse the repository at this point in the history
Follow up for #8927
Since parent id is mostly used internally, and can be confusing for end user when exposed, we decide to remove it from SDK function create_experiment

(cherry picked from commit 1e45918)
  • Loading branch information
gt2345 authored and determined-ci committed Mar 28, 2024
1 parent 61958ef commit d2e3a5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions harness/determined/common/experimental/determined.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def create_experiment(
config: Union[str, pathlib.Path, Dict],
model_dir: Optional[Union[str, pathlib.Path]] = None,
includes: Optional[Iterable[Union[str, pathlib.Path]]] = None,
parent_id: Optional[int] = None,
project_id: Optional[int] = None,
template: Optional[str] = None,
) -> experiment.Experiment:
Expand All @@ -139,8 +138,6 @@ def create_experiment(
model_dir(string, optional): directory containing model definition. (default: ``None``)
includes(Iterable[Union[str, pathlib.Path]], optional): Additional files or
directories to include in the model definition. (default: ``None``)
parent_id(int, optional): If specified, the created experiment will use the model
definition from the parent experiment. (default: ``None``)
project_id(int, optional): The id of the project this experiment should belong to.
(default: ``None``)
template(string, optional): The name of the template for the experiment.
Expand Down Expand Up @@ -176,7 +173,6 @@ def create_experiment(
activate=True,
config=config_text,
modelDefinition=model_context,
parentId=parent_id,
projectId=project_id,
template=template,
)
Expand Down
7 changes: 1 addition & 6 deletions harness/determined/experimental/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def create_experiment(
config: Union[str, pathlib.Path, Dict],
model_dir: Optional[str] = None,
includes: Optional[Iterable[Union[str, pathlib.Path]]] = None,
parent_id: Optional[int] = None,
project_id: Optional[int] = None,
template: Optional[str] = None,
) -> Experiment:
Expand All @@ -178,8 +177,6 @@ def create_experiment(
config: Experiment config filename (.yaml) or a dict.
model_dir: Directory containing model definition.
includes: Additional files or directories to include in the model definition.
parent_id: If specified, the created experiment will use the model definition
from the parent experiment.
project_id: The id of the project this experiment should belong to.
template: The name of the template for the experiment.
See :ref:`config-template` for more details.
Expand All @@ -188,9 +185,7 @@ def create_experiment(
An :class:`~determined.experimental.client.Experiment` of the created experiment.
"""
assert _determined is not None
return _determined.create_experiment(
config, model_dir, includes, parent_id, project_id, template
)
return _determined.create_experiment(config, model_dir, includes, project_id, template)


@_require_singleton
Expand Down

0 comments on commit d2e3a5c

Please sign in to comment.