Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix chart artifact to have db key (#441)
- Loading branch information
Showing
3 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import mlrun.artifacts | ||
|
||
|
||
def test_artifacts_export_required_fields(): | ||
artifact_classes = [ | ||
mlrun.artifacts.Artifact, | ||
mlrun.artifacts.ChartArtifact, | ||
mlrun.artifacts.PlotArtifact, | ||
mlrun.artifacts.DatasetArtifact, | ||
mlrun.artifacts.ModelArtifact, | ||
mlrun.artifacts.TableArtifact, | ||
] | ||
|
||
required_fields = [ | ||
"key", | ||
"kind", | ||
"db_key", | ||
] | ||
|
||
for artifact_class in artifact_classes: | ||
for required_field in required_fields: | ||
assert required_field in artifact_class._dict_fields |