/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Configuration information for Amazon SageMaker Debugger system monitoring, framework profiling, and storage paths. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProfilerConfig implements Serializable, Cloneable, StructuredPojo { /** ** Path to Amazon S3 storage location for system and framework metrics. *
*/ private String s3OutputPath; /** ** A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. *
*/ private Long profilingIntervalInMilliseconds; /** *
* Configuration information for capturing framework metrics. Available key strings for different profiling options
* are DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the SageMaker and
* Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*
* Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it
* off, set to True
.
*
* Path to Amazon S3 storage location for system and framework metrics. *
* * @param s3OutputPath * Path to Amazon S3 storage location for system and framework metrics. */ public void setS3OutputPath(String s3OutputPath) { this.s3OutputPath = s3OutputPath; } /** ** Path to Amazon S3 storage location for system and framework metrics. *
* * @return Path to Amazon S3 storage location for system and framework metrics. */ public String getS3OutputPath() { return this.s3OutputPath; } /** ** Path to Amazon S3 storage location for system and framework metrics. *
* * @param s3OutputPath * Path to Amazon S3 storage location for system and framework metrics. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfilerConfig withS3OutputPath(String s3OutputPath) { setS3OutputPath(s3OutputPath); return this; } /** ** A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. *
* * @param profilingIntervalInMilliseconds * A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. */ public void setProfilingIntervalInMilliseconds(Long profilingIntervalInMilliseconds) { this.profilingIntervalInMilliseconds = profilingIntervalInMilliseconds; } /** ** A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. *
* * @return A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. */ public Long getProfilingIntervalInMilliseconds() { return this.profilingIntervalInMilliseconds; } /** ** A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. *
* * @param profilingIntervalInMilliseconds * A time interval for capturing system metrics in milliseconds. Available values are 100, 200, 500, 1000 (1 * second), 5000 (5 seconds), and 60000 (1 minute) milliseconds. The default value is 500 milliseconds. * @return Returns a reference to this object so that method calls can be chained together. */ public ProfilerConfig withProfilingIntervalInMilliseconds(Long profilingIntervalInMilliseconds) { setProfilingIntervalInMilliseconds(profilingIntervalInMilliseconds); return this; } /** *
* Configuration information for capturing framework metrics. Available key strings for different profiling options
* are DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the SageMaker and
* Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*
DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the
* SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*/
public java.util.Map
* Configuration information for capturing framework metrics. Available key strings for different profiling options
* are DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the SageMaker and
* Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*
DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the
* SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*/
public void setProfilingParameters(java.util.Map
* Configuration information for capturing framework metrics. Available key strings for different profiling options
* are DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the SageMaker and
* Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
*
DetailedProfilingConfig
, PythonProfilingConfig
, and
* DataLoaderProfilingConfig
. The following codes are configuration structures for the
* ProfilingParameters
parameter. To learn more about how to configure the
* ProfilingParameters
parameter, see Use the
* SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProfilerConfig withProfilingParameters(java.util.Map
* Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it
* off, set to True
.
*
True
.
*/
public void setDisableProfiler(Boolean disableProfiler) {
this.disableProfiler = disableProfiler;
}
/**
*
* Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it
* off, set to True
.
*
True
.
*/
public Boolean getDisableProfiler() {
return this.disableProfiler;
}
/**
*
* Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it
* off, set to True
.
*
True
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProfilerConfig withDisableProfiler(Boolean disableProfiler) {
setDisableProfiler(disableProfiler);
return this;
}
/**
*
* Configuration to turn off Amazon SageMaker Debugger's system monitoring and profiling functionality. To turn it
* off, set to True
.
*
True
.
*/
public Boolean isDisableProfiler() {
return this.disableProfiler;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getS3OutputPath() != null)
sb.append("S3OutputPath: ").append(getS3OutputPath()).append(",");
if (getProfilingIntervalInMilliseconds() != null)
sb.append("ProfilingIntervalInMilliseconds: ").append(getProfilingIntervalInMilliseconds()).append(",");
if (getProfilingParameters() != null)
sb.append("ProfilingParameters: ").append(getProfilingParameters()).append(",");
if (getDisableProfiler() != null)
sb.append("DisableProfiler: ").append(getDisableProfiler());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProfilerConfig == false)
return false;
ProfilerConfig other = (ProfilerConfig) obj;
if (other.getS3OutputPath() == null ^ this.getS3OutputPath() == null)
return false;
if (other.getS3OutputPath() != null && other.getS3OutputPath().equals(this.getS3OutputPath()) == false)
return false;
if (other.getProfilingIntervalInMilliseconds() == null ^ this.getProfilingIntervalInMilliseconds() == null)
return false;
if (other.getProfilingIntervalInMilliseconds() != null
&& other.getProfilingIntervalInMilliseconds().equals(this.getProfilingIntervalInMilliseconds()) == false)
return false;
if (other.getProfilingParameters() == null ^ this.getProfilingParameters() == null)
return false;
if (other.getProfilingParameters() != null && other.getProfilingParameters().equals(this.getProfilingParameters()) == false)
return false;
if (other.getDisableProfiler() == null ^ this.getDisableProfiler() == null)
return false;
if (other.getDisableProfiler() != null && other.getDisableProfiler().equals(this.getDisableProfiler()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getS3OutputPath() == null) ? 0 : getS3OutputPath().hashCode());
hashCode = prime * hashCode + ((getProfilingIntervalInMilliseconds() == null) ? 0 : getProfilingIntervalInMilliseconds().hashCode());
hashCode = prime * hashCode + ((getProfilingParameters() == null) ? 0 : getProfilingParameters().hashCode());
hashCode = prime * hashCode + ((getDisableProfiler() == null) ? 0 : getDisableProfiler().hashCode());
return hashCode;
}
@Override
public ProfilerConfig clone() {
try {
return (ProfilerConfig) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.sagemaker.model.transform.ProfilerConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}