Repository: dezoito/ollama-grid-search
Issue: Read-only file system (os error 30) on MacOS
Root cause: Architectural Constraint

I just tried ollama-grid-search for the first time. I'm using MacOS 14.4 and I'm using v0.1.0 of Ollama Grid Search.

For each permutation it takes a while, during which ollama keeps my GPU busy, and then displays: 
`Read-only file system (os error 30)` before moving on to the next permutation. It doesn't display the results of the inferences, just the error messages.

I can't tell where it is trying to write, but on MacOS, the root of the filesystem (/) is read only

Thank you for taking the time to let me know.

Out of curiosity, in what folder is the executable installed on your OS? 

The log files should be written to a ". /logs" relative to the executable, and since that worked on the other two OSes I incorrectly assumed it would work on Macs too.

Let me do some research on how Tauri could save files to something like an "app data" folder and I'll update this once it's fixed. 

Nice tool!
Same here on Arch Linux using the .AppImage from a directory that contains all my AppImages. 

Edit: here there isn't any `*logs*` directory pertaining to this tool
The logs are printed on the shell console where the AppImage started from.
![image](https://github.com/dezoito/ollama-grid-search/assets/6537434/897d5b69-126f-479e-8efd-1b319a4ca65b)

The log shows the config, then a warning, then continue with the normal "Fetching models" update main loop:
![image](https://github.com/dezoito/ollama-grid-search/assets/6537434/26a631e8-56a4-43d2-96b5-5fa80af66971)


Thank you,
Piero

Thank you @PieBru.

I think I got it... 

I'll create the release candidates in a moment and make sure I test all of them... should be done this afternoon if I don't hit any snags, but - as all devs like to say - it works on my computer now ;)

@dezoito  Thanks

On MacOS, applications are typically added to /Applications, which seems writable, but the OS may be protecting to some degree. In any case though, not a great place to store data :)

By Apple's guidelines, most persistent, user-specific data that the user isn't expected to interact with outside of your app should be stored in an application specific directory in ~/Library/Application. The application specific subdirectory can just be the same as the name of your application bundle, though I think there is a more rigorous convention that is less likely to have collisions.

Data that the user might expect to use independently of your application should go into an app-specific or user chosen subdirectory in ~/Documents. For example, if your app generates text or json files with the results of a grid search that the user might want to use elsewhere.

Temp files should go in /tmp. There is an API for getting a unique, runtime-specific subdirectory.

Apple's documentation on the matter:
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW14

Often cross platform apps don't honor any of this and instead create an application specific directory in ~/. This is often prefixed by a period (ie .ollama-grid-search) so that it is hidden under ordinary circumstances.



@easp , @PieBru,

I tested each release installer for each platform and they all worked, but the only Mac I have available is still using MacOS 12.7.

Could you guys give this another and check if it now works for you as well?

> On MacOS, applications are typically added to /Applications, which seems writable, but the OS may be protecting to some degree. In any case though, not a great place to store data :)

Yes, I was trying to save to a folder relative to the binary, regrettably.

Tauri has an API dedicated to storing application files, but understanding how it works wasn't very straight forward.

In case anyone else developing a Tauri app sees this, this is the issue that eventually helped me:

https://github.com/tauri-apps/tauri/discussions/5557

Again, I appreciate the effort in testing the app and helping me sort this issue.

No more errors now.
With only one model selected and more than one values in one or more params lists, I would expect more than one test will be performed, one for each "grid" of params. Instead:
![image](https://github.com/dezoito/ollama-grid-search/assets/6537434/0728857f-88d9-450a-94b6-6bc008961887)

You just discovered an input validation bug, thank you!

Try separating values by commas, please.

I did it with commas this morning, it works with commas.
Thank you!

Fixed the issue that was allowing space delimited lists to pass parameter validation.

(added a few discreet UI tweaks as well).

Closing this issue, but please LMK if any problems persist