AI-multimodal / aimmdb

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

Add FEFF schema #41

Open msegal347 opened 2 years ago

msegal347 commented 2 years ago

Updated FEFF schemas.

Outstanding:

-Incorporating metadata in xmu.dat

-validate schema

matthewcarbone commented 2 years ago

Actually @jmaruland I'd also like your thoughts on the above comments if you have the time. Want to be sure we're doing this correctly! Thank you!

danielballan commented 2 years ago

Not sure. Seems like marking both xas and FEFF could be useful depending on the context. Can we think of sensible key names to place each of those values in?

matthewcarbone commented 2 years ago

Sorry Dan what do you mean by this?

Can we think of sensible key names to place each of those values in?

My only comment is that $\mathrm{FEFF} \subset \mathrm{XAS}$, in case that matters.

jmaruland commented 2 years ago

It feels that FEFF could contain additional required information that might not be necessary or required in XAS. Why not define FEFF as a child of XAS? I am doing something similar with the Document schemas for this writer module that Dan and I use here to experiment with tiled. Is this similar to what are trying to describe here? https://github.com/jmaruland/databroker/blob/master/databroker/experimental/schemas.py#L24-L28 https://github.com/jmaruland/databroker/blob/master/databroker/experimental/schemas.py#L31-L37 https://github.com/jmaruland/databroker/blob/master/databroker/experimental/schemas.py#L87-L88

matthewcarbone commented 2 years ago

It feels that FEFF could contain additional required information that might not be necessary or required in XAS. Why not define FEFF as a child of XAS?

I think this is the way to go.

I am doing something similar with the Document schemas for this writer module that Dan and I use here to experiment with tiled. Is this similar to what are trying to describe here?

Yeah this is precisely what we're after, I think. I need to double check the XAS schema to still make sure it make sense, but at least in principle this is exactly how we should do it.

msegal347 commented 1 year ago

@danielballan @jmaruland @x94carbone

I'm still running into problems successfully writing the feff data and metadata to the client server, if you have a chance can you see what I'm doing wrong?

I've been trying to get the ingestion to work in the ingest_feff notebook. The dataframe and metadata seem to be outputting correctly, but when I use "client["uid"].write_dataframe" it's unsuccessful. I've tried write_sample as well, but I'm missing something here. Any help would be greatly appreciated!

Here's the output:

`timeout Traceback (most recent call last) File c:\Users\msega\anaconda3\envs\aimm\lib\site-packages\httpcore_exceptions.py:8, in map_exceptions(map) 7 try: ----> 8 yield 9 except Exception as exc: # noqa: PIE786

File c:\Users\msega\anaconda3\envs\aimm\lib\site-packages\httpcore\backends\sync.py:26, in SyncStream.read(self, max_bytes, timeout) 25 self._sock.settimeout(timeout) ---> 26 return self._sock.recv(max_bytes)

timeout: timed out

During handling of the above exception, another exception occurred:

ReadTimeout Traceback (most recent call last) File c:\Users\msega\anaconda3\envs\aimm\lib\site-packages\httpx_transports\default.py:60, in map_httpcore_exceptions() 59 try: ---> 60 yield 61 except Exception as exc: # noqa: PIE-786

File c:\Users\msega\anaconda3\envs\aimm\lib\site-packages\httpx_transports\default.py:218, in HTTPTransport.handle_request(self, request) 217 with map_httpcore_exceptions(): --> 218 resp = self._pool.handle_request(req) 220 assert isinstance(resp.stream, typing.Iterable) ... 74 raise 76 message = str(exc) ---> 77 raise mapped_exc(message) from exc

ReadTimeout: timed out`

matthewcarbone commented 1 year ago

@msegal347 have you tried what Juan suggested and just try to inherit the existing XAS schema? I feel like if XAS works then inheriting it and adding a few properties might be easier than making our own new schema. Thoughts?