Skip to content
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

fix: Add missing attributes to local resourceconfig #4999

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/sagemaker/local/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,12 @@
"""
config_path = os.path.join(self.container_root, host, "config")

resource_config = {"current_host": host, "hosts": self.hosts}
resource_config = {

Check warning on line 476 in src/sagemaker/local/image.py

View check run for this annotation

Codecov / codecov/patch

src/sagemaker/local/image.py#L476

Added line #L476 was not covered by tests
"current_host": host,
"hosts": self.hosts,
"network_interface_name": "eth0",
"current_instance_type": self.instance_type,
}
_write_json_file(os.path.join(config_path, "resourceconfig.json"), resource_config)

processing_job_config = {
Expand Down Expand Up @@ -519,7 +524,12 @@
"""
config_path = os.path.join(self.container_root, host, "input", "config")

resource_config = {"current_host": host, "hosts": self.hosts}
resource_config = {
"current_host": host,
"hosts": self.hosts,
"network_interface_name": "eth0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this always eth0 or can this be customized

Copy link
Contributor Author

@benieric benieric Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is eth0 but not sure if can be customized. Even on platform training job can not customize.

"current_instance_type": self.instance_type,
}

json_input_data_config = {}
for c in input_data_config:
Expand Down
Loading