Search in sources :

Example 1 with AssetType

use of ml.comet.experiment.impl.asset.AssetType in project comet-java-sdk by comet-ml.

the class AssetUtilsTest method testToAssetType.

@ParameterizedTest
@CsvSource({ "all, ALL", "unknown, UNKNOWN", "asset, ASSET", "source_code, SOURCE_CODE", "3d-points, POINTS_3D", "embeddings, EMBEDDINGS", "dataframe, DATAFRAME", "dataframe-profile, DATAFRAME_PROFILE", "histogram3d, HISTOGRAM3D", "confusion-matrix, CONFUSION_MATRIX", "curve, CURVE", "notebook, NOTEBOOK", "model-element, MODEL_ELEMENT", "text-sample, TEXT_SAMPLE", "not-existing-type, UNKNOWN" })
public void testToAssetType(String typeName, String expectedName) {
    AssetType assetType = AssetUtils.toAssetType(typeName);
    AssetType expected = Enum.valueOf(AssetType.class, expectedName);
    assertEquals(expected, assetType, String.format("wrong type parsed for name: %s", typeName));
}
Also used : AssetType(ml.comet.experiment.impl.asset.AssetType) CsvSource(org.junit.jupiter.params.provider.CsvSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

AssetType (ml.comet.experiment.impl.asset.AssetType)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 CsvSource (org.junit.jupiter.params.provider.CsvSource)1