You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, any time I'm trying to create a new context type, I get the following message back:
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1030 16:06:27.180933 245175808 rdbms_metadata_access_object.cc:686] No property is defined for the Type
Despite this, everything works fine. The problem is that the logs accumulate really quickly, especially when running the suite of tests.
Is there any way to avoid this warning?
Here is a snippet of code that reproduces the problem:
Hi, @svpino . The warning is because you are creating a context_type without any properties and your context_type is not a simple type. See the detail root cause in [1]. This is the default behavior.
If you want to avoid this warning, one simple way is to create your own branch in ml_metadata, comment out line 685-686 and build the ml_metadata from source as instructed in [2]. In this way, your ml_metadata library will not raise these warnings.
Please let me know if you have any other questions.
connection_config=ConnectionConfig()
connection_config.fake_database.SetInParent()
store=metadata_store.MetadataStore(connection_config)
context_type=ContextType()
context_type.name="sample"# Get rid of the warning by defining a property.context_type.properties["sample"] =1context_type_id=store.put_context_type(context_type)
Honestly, I'm not quite sure about the implications of adding that property, but it gets rid of the warning. This is probably a good opportunity to improve the documentation of the library around this topic.
I'm using ml-metadata in one of my projects.
For some reason, any time I'm trying to create a new context type, I get the following message back:
Despite this, everything works fine. The problem is that the logs accumulate really quickly, especially when running the suite of tests.
Is there any way to avoid this warning?
Here is a snippet of code that reproduces the problem:
The text was updated successfully, but these errors were encountered: