AI-multimodal / aimmdb

BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

If dataset (or value in general) does not exist, no warning provided #24

Open matthewcarbone opened 2 years ago

matthewcarbone commented 2 years ago

@kleinhenz I have come across an interesting quirk when using the client.

from tiled.client import from_uri
CLIENT = from_uri("https://aimm.lbl.gov/api")

CLIENT["dataset"]["mmc"]
# <Node {'element', 'uid', 'sample', 'edge'}>
# As expected

CLIENT["dataset"]["dddd"]
# <Node {'element', 'uid', 'sample', 'edge'}>
# ?

Similarly,

CLIENT["dataset"]["nmc"]["edge"]["of-tomorrow"]
# <Node {'element', 'uid', 'sample'}>

I think it might be prudent to warn the user when they've queried a key-value pair that doesn't make sense. What do you think?

Also, is this a possible tiled issue or an aimmdb one?

kleinhenz commented 2 years ago

I agree this is confusing/unexpected. This one is an aimmdb problem. Issuing a warning or error is probably a good idea.