Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

[Question] How to use URI in Metrics? #133

Open
gabrielwen opened this issue Oct 7, 2019 · 5 comments
Open

[Question] How to use URI in Metrics? #133

gabrielwen opened this issue Oct 7, 2019 · 5 comments

Comments

@gabrielwen
Copy link

It's not clear how to use URI in Metrics but it seems to be an important field (required, actually). If we use values to pass metrics like score or median error, do we still need an URI pointing to some data?

@zhenghuiwang
Copy link
Contributor

URI is required for all types of artifacts and metrics is one of them.

URI points to the storage location of the a metrics while values can provide a summary or complete metrics values. For example, you can have a metrics with URI pointing to a CSV file with values being the overall score.

If the whole metrics are captured by values, the URI seems useless. I guess you can put some placeholder into URI.

@karlschriek
Copy link

As far as I can see, the values field isn't even used. The ml-metadata Artifact signature kubeflow.org/alpha/metrics that is relevant here doesn't have a values property.

Also the under the Artifact of class kubeflow.metadata.Metrics the function def serialization(...) is used to prepare the class properties for upload into the metastore. values is currently completely ignored here.

@zhenghuiwang
Copy link
Contributor

Also the under the Artifact of class kubeflow.metadata.Metrics the function def serialization(...) is used to prepare the class properties for upload into the metastore. values is currently completely ignored here.

values is not ignored: it is handled in this statement of serialization:

            _ALL_META_PROPERTY_NAME:
                mlpb.Value(string_value=json.dumps(self.__dict__)),

values is a dictionary but MLMD property type can only be string, int, and double type. The workaround here is to save all metrics properties to a special MLMD property.

@karlschriek
Copy link

Ok, now I see! The entire self.__dict__ gets converted to string. Thanks for the explanation

@jtfogarty
Copy link

/kind question
/area engprod
/priority p2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants