Commit Graph
11 Commits
Author SHA1 Message Date
Sheikh Bayazid e8a12e04c2 Improve/use shorthand syntax for unwrapping optionals and fix typos (#12369) 2024-05-03 08:50:20 -07:00
Paul Beusterien 4d2b60dc75 Updated to SwiftFormat 0.52.10 (#12125) 2023-11-21 12:12:05 -08:00
Andrew Heard b850d1acbb [ML Model Downloader] Migrate from FLL to CCT logging endpoint (#11837) 2023-10-31 12:33:31 -04:00
Paul Beusterien 5e8790d78a Update to SwiftFormat 0.49.2 (#9239) 2022-01-21 13:03:15 -08:00
manjanac 3cbe00c1b7 Fixes and corrections in telemetry logging (#7525)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Add model name to all log events + minor logging fixes.

* Disable logging in tests

* Disable logging in unit test.
2021-02-16 13:23:38 -08:00
manjanac 9597ffe51b Removes saved path on device (#7439)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Add tests for list models.

* Failable emptying of model directory in tests.

* Remove path from local model info and user defaults.

* Clean up user defaults on delete + add interpreter to test app.

* Replace .absoluteString with .path. This makes model.path work directly with TFLite interpreter.

* Fix paths in tests.

* Unit test for successful get model.

* Rename modelPath to modelURL.

* Use defaults.integer instead of casting to Int.

* Remove force casting.

* Mostly minor fixes that came out of the bugbash (#7462)

* Use appropriate errors for network offline and api disabled.

* Error + test for resourceExhausted.

* Surface backend error message in logs whenever available.

* Add disclaimer to empty directories for testing only.

* Add Firelog events for model info retrieval.

* Add documentation + other minor fixes. (#7465)

* Add docs + clean up ModelDownloader.swift.

* Add docs + clean up ModelDownloadTask.swift.

* Add docs + clean up FileDownloader.swift.

* Add docs + clean up LocalModelInfo.swift. Handle TODO for userdefaults init failure.

* Add docs + clean up RemoteModelInfo.swift, DownloaderUserDefaults.swift.

* Add docs + clean up ModelInfoRetriever.swift.

* Add docs + clean up ModelDownloadConditions.swift.

* Add docs + clean up DeviceLogger.swift.

* Add docs + clean up TelemetryLogger.swift.

* Add docs + clean up ModelFileManager.swift.

* Remove resolved TODOs + other minor fixes.

* Update model download conditions init.

* Fix comment formatting.

* Minor newline formatting.

* Minor comment formatting.

* Add docs for ModelDownloadConditions.

* Basic fix for user defaults race condition.

* Minor updates to tests.

* Minor updates to tests.

* Final fixes (#7471)

* Refactor error parsing in model info response.

* Add Firelog for delete event + minor fixes.

* Temporary - test to check telemetry for delete event.

* Disable backup of model files; handle inability to locate model storage dir.

* Minor fixes.

* Add tflite path extension to model file.
2021-02-10 09:47:07 -08:00
manjanac 11826f1c4d Firelog events (#7404)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Firelog 1/2

* More Firelog + fix sdk version.

* Fix whitespace in proto.
2021-01-29 12:57:38 -08:00
manjanac c64ca06431 More on-device logging and better error handling. (#7397)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Add new error type for expired url + fix tests.

* On-device logging + updates to tests.

* Add new error type for expired url + fix tests.

* On-device logging + updates to tests.

* Revert to enum for ModelFileManager.swift

* Remove GoogleService-Info.plist

* Remove GoogleService-Info.plist

* Improve errors, tests, on-device logging.

* Add device compatibility to check for available space.

* Use CocoaError to check for space constraints.
2021-01-28 13:11:31 -08:00
manjanac ad41e22f1a Device logging w/ GULLogger. (#7348)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Replace device logger with GULLogger.

* Replace device logger with GULLogger.

* Add GoogleUtilities dependency to Package.swift.

* Add GoogleUtilities dependency to Package.swift.

* Add GoogleUtilities dependency to podspec.

* Fix import in DeviceLogger.

* Remove extra new lines.
2021-01-25 17:15:15 -08:00
manjanac d7950ddbe4 Separate error messages into extensions (#7322)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Update error handling.

* Add logging for background download failure.

* Remove empty file.

* Slight refactor of error descriptions + using ISO8601DateFormatter where available.

* Slight refactor error descriptions + adding availability for ISO8601DateFormatter.
2021-01-19 14:28:20 -08:00
manjanac ac4d70ed41 Logging on device and to Firelog (#7281)
* Restores ML Pods after M77.

* Fix Package.swift

* Re-add catalyst to GHA workflow.

* Logging on-device and to Firelog - WIP.

* Logging on-device and to Firelog - WIP.

* Rename AnalyticsLogger to TelemetryLogger + minor fixes.

* Add SwiftProtobuf dependency.

* On-device and Firelog logging - WIP

* Proto files.

* Rename loggers.

* Move protos to Sources.

* Log model download event on device and to Firelog.

* Add TODO to revisit SwiftProtobuf dependency + minor fixes.

* Add SwiftProtobuf dependency to Package.swift.

* TODO to revisit system info + TODO in podspec for SwiftProtobuf dependency.

* Pass app to TelemetryLogger to check for stats enabled flag.

* TODO to replace on device logEvent with GULLogBasic (future PR).
2021-01-14 15:29:04 -08:00