-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement Preferences facility to handle different download strategies & cache locations #151
Comments
Created issue for tracking progress on this new facility |
I think code could be leaner using properties directly vs preferences. See Alternate Code below Probably the best would be to locate the actual class in a subpackage, e.g. “bot.instance.Preferences”. Then can have a root folder function called “getPreferences” that simply calls the getSingleton factory function. The user can then view object directly; and can assign it to an output var if they want to set it. The last part has to be taught probably, but is pretty lightweight. Alternate Code
|
Note that the suggested default cache directory (see comment in #149) could be implemented right in the property definition line, either inline or by calling a local function |
In my first test of the MATLAB Online case, the only available preference showing by default is the cache directory. Are some preferences not shown based on detected environment?? The "DownloadFrom" and "UseCacheOnCloud" preferences seem pertinent here too. I was able to set it even though it didn't appear. I could that S3 item file retrieval is faster than API download. Nice! |
Should likely rename |
This was probably an effect of preferences being added to the preference group "on demand". This will be fixed in an upcoming commit, where all the preferences are initialized with their default values on the first-time construction of the Preference singleton instance. |
This is a good point. I have found yet another scenario where it should be possible to mount the S3 bucket as a file system on a local machine. I am not sure if there are any benefits, and when I tested it, my Mac became unresponsive to the point where I had to reboot (this might be related to the libraries I used). I think this (local mount) could be interesting to look into with regards to using h5read directly with files in an S3 bucket. Accessing files using e.g dir / copyfile / h5 read using the s3 protocol (s3://...) appears to have some significant delays, and maybe this would be faster if the bucket is mounted locally. |
|
@ehennestad If you move towards an object-based representation of the preferences (vs |
Minor detail. Since the preferences are available via a root-level function ( For future consideration: could make a subpackage called |
Todo:
|
@vijayiyer05 Suggestion to move |
Starting this conversation again as we can now add a Preference for how to access data ( @vijayiyer05 ) Option 1: Download and cache entire files in a local directory. Option 2: Read data (individual linked file properties) directly from h5/nwb files stored at remote locations (S3 bucket) (Option 3: Read data (individual linked properties) as in Option 2 and cache these values in local cache) Working name for this Preference: Note: This is currently mostly relevant for ophys sessions from the Visual Behavior Dataset where I have used the new HasLinkedFile/LinkedFile classes. |
Alternative preference name:
If true files are downloaded and cached, if false files are read directly from remote location |
No description provided.
The text was updated successfully, but these errors were encountered: