-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove inputs and container artifacts for local mode trainer #4978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
5d4d8d7
e50d681
171ae9d
205f878
2dcd3af
199c91c
cf7657b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,8 @@ class ModelTrainer(BaseModel): | |
local_container_root (Optional[str]): | ||
The local root directory to store artifacts from a training job launched in | ||
"LOCAL_CONTAINER" mode. | ||
remove_inputs_and_container_artifacts (Optional[bool]): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This option seems to be specifically for local mode? Can we not just do the cleanup for local mode by default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 Is there any advantage we provide by keeping the artifacts stored? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the users may need to check the environment variables and hyperparameters in each container to debug |
||
Whether to remove inputs and container artifacts after training. | ||
""" | ||
|
||
model_config = ConfigDict(arbitrary_types_allowed=True, extra="forbid") | ||
|
@@ -227,6 +229,7 @@ class ModelTrainer(BaseModel): | |
hyperparameters: Optional[Dict[str, Any]] = {} | ||
tags: Optional[List[Tag]] = None | ||
local_container_root: Optional[str] = os.getcwd() | ||
remove_inputs_and_container_artifacts: Optional[bool] = True | ||
|
||
# Created Artifacts | ||
_latest_training_job: Optional[resources.TrainingJob] = PrivateAttr(default=None) | ||
|
@@ -646,7 +649,7 @@ def train( | |
hyper_parameters=string_hyper_parameters, | ||
environment=self.environment, | ||
) | ||
local_container.train(wait) | ||
local_container.train(wait, self.remove_inputs_and_container_artifacts) | ||
|
||
def create_input_data_channel( | ||
self, channel_name: str, data_source: DataSourceType, key_prefix: Optional[str] = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
temporary_folders