-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect with minio-driver? #199
Comments
When you are running with oteapi, it cannot find the 'http://www.ontotrans.eu/0.1/inputEntity' entity. Have you appended the search path to |
This is a very good point. But I am not sure how it should be implemented. The oteapi-dlite parse strategy just call the underlying dlite storage plugin with the options provided. Most storage plugins will complain and fail if they are given an unknown option. I guess that we first should establish a standard vocabulary shared by dlite plugins, such that the identifiers Any other suggestions for how to implement this? |
Hi @jesper-friis , you are correct the {
"uuid": "a7a9b39e-a38d-5446-83c3-2fdf45546795",
"uri": "http://www.ontotrans.eu/0.1/inputEntity",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "",
"dimensions": {},
"properties": {
"blooming_duration": {
"type": "float32",
"description": "Time in seconds spent in the blooming mill"
},
"blooming_total_passes": {
"type": "float32",
"description": "Total number of passes in the blooming stand, should always be an even number"
},
"c": {
"type": "float32",
"description": "Carbon content in the tundish"
},
"flitzer_duration": {
"type": "float32",
"description": "Time in seconds spent in the Flitzer"
},
"mn": {
"type": "float32",
"description": "Manganese content in the tundish"
},
"pyro_bp2_temp_max": {
"type": "float32",
"description": "Maximum temperature measured at pyrometer BP2 after rolling in the blooming stand has finished"
},
"qst_duration": {
"type": "float32",
"description": "Time in seconds spent in the QST"
},
"qst_entry_temp_estimate": {
"type": "float32",
"description": "Estimated entry temperature in the QST"
},
"qst_flow_rate_total": {
"type": "float32",
"description": "Total water flow"
},
"qst_water_temp_entry": {
"type": "float32",
"description": "Water temperature"
},
"tandem_duration": {
"type": "float32",
"description": "Time in seconds spent in the tandem mill"
},
"v": {
"type": "float32",
"description": "Vanadium content in the tundish"
}
}
} When I change the code to the following pattern, the instance is loaded from the minio without problems: from oteapi_dlite.strategies.parse import DLiteParseStrategy, DLiteParseResourceConfig
access_key = "otadmin"
secret_key = "otadmin123"
ids = {"input_entity_definition": "a7a9b39e-a38d-5446-83c3-2fdf45546795", "dataset": "d71531a5-a6a4-4252-abef-8c2fdf89c416"}
session = {}
for label, instance_key in ids.items():
config = {
"downloadUrl": "http://minio:9000", # does not seem to be needed here?
"mediaType": "minio", # also does not seem to explicity be needed here?
"configuration": {
"driver": "minio",
"location": "minio:9000",
"id": instance_key,
"options": f"access_key={access_key};secret_key={secret_key};secure=False",
"label": label,
},
}
config = DLiteParseResourceConfig(**config)
parse = DLiteParseStrategy(parse_config=config)
session = parse.get(session)
print(session) Is this due to the case that the I would like to avoid using the |
This is a good question indeed. Maybe it makes sense to map the attributes of the |
No. The EntityScheme is hard-coded at C-level into DLite (as are the BasicMetadataSchema and the CollectionEntity). |
Sorry, I don't understand the change. But maybe it is related to inconsistent uuids? In DLite, if an instance has an uri (which is the case of all metadata), then its uuid is calculated as a hash of this uri. You can use the |
Yes, this would be a quick solution that could be applied until we have something more scalable. We could add a PR on this, with a reference to my above suggestion for a more scalable solution. |
I understand this wish. I added a suggestion (issue #148) to otelib to address this. For now, I think the easiest solution is that you set DLITE_STORAGES in the docker compose file that runs the oteapi services. |
@jesper-friis, to me it seems that what @MBueschelberger intends to point out is that he has to manually load the |
I am currently running into the issue, that I am not able to connect with dlite to an Minio-instance through the oteapi plugin, but I am actually successful if I use dlite directly.
Here is my docker-compose:
This is my test-instance:
First of all, I tried to store the the instance with the driver directly:
This was obviously successful, since I can fetch the instance again with this id:
The printed instance looks like this (as expected):
However, when I try to fetch the instance through oteapi-dlite with following config...
... I get the following traceback:
Since I actually saved the metadata in the script shown previously, I am not sure why the plugin is not able to fetch the instance with through the given configuration.
Obviously, the arguments in the
options
-string in the driver-config need to be;
-separated instead of,
-separated, as it is written in the attribute description.Additionally, it would be great if the plugin would use the
user
/password
attributes of theResourceConfig
(inherited from theSecretConfig
) in the oteapi for later passing it to theaccess_key
andsecret_key
in theoptions
-string of the driver.The text was updated successfully, but these errors were encountered: