Skip to content

Added FirebaseMlException and Logging round 1. #2259

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

Merged
merged 7 commits into from
Jan 6, 2021
Merged

Conversation

annzimmer
Copy link
Contributor

No description provided.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 15, 2020

Coverage Report

Affected SDKs

  • firebase-ml-modeldownloader

    SDK overall coverage changed from 87.93% (cdc8e88) to 83.80% (ac542ad1) by -4.13%.

    Click to show coverage changes in 16 files.
    Filename Base (cdc8e88) Head (ac542ad1) Diff
    AutoFirebaseMlLogEventEncoder.java ? 100.00% ?
    AutoValue_FirebaseMlLogEvent.java ? 57.45% ?
    AutoValue_FirebaseMlLogEvent_ModelDownloadLogEvent.java ? 65.82% ?
    AutoValue_FirebaseMlLogEvent_ModelDownloadLogEvent_ModelOptions.java ? 62.96% ?
    AutoValue_FirebaseMlLogEvent_ModelDownloadLogEvent_ModelOptions_ModelInfo.java ? 64.58% ?
    AutoValue_FirebaseMlLogEvent_SystemInfo.java ? 63.33% ?
    CustomModelDownloadService.java 87.76% 86.41% -1.35%
    DataTransportMlEventSender.java ? 100.00% ?
    FirebaseMlException.java ? 57.14% ?
    FirebaseMlLogEvent.java ? 95.38% ?
    FirebaseMlLogger.java ? 89.16% ?
    FirebaseModelDownloader.java 89.42% 89.62% +0.20%
    FirebaseModelDownloaderRegistrar.java 93.10% 88.57% -4.53%
    ModelFileDownloadService.java 89.81% 89.73% -0.08%
    ModelFileManager.java 74.60% 78.95% +4.34%
    SharedPreferencesUtil.java 98.97% 99.17% +0.20%

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (ac542ad1) is created by Prow via merging commits: cdc8e88 f4d85e8.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-ml-modeldownloader:
error: Method com.google.firebase.ml.modeldownloader.CustomModel.getFile no longer throws exception java.lang.Exception [ChangedThrows]
error: Method com.google.firebase.ml.modeldownloader.CustomModel.getFile added thrown exception com.google.firebase.ml.modeldownloader.FirebaseMlException [ChangedThrows]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 15, 2020

Binary Size Report

Affected SDKs

  • firebase-ml-modeldownloader

    Type Base (cdc8e88) Head (ac542ad1) Diff
    aar 40.1 kB 79.4 kB +39.2 kB (+97.8%)
    apk (aggressive) 84.5 kB 128 kB +43.3 kB (+51.2%)
    apk (release) 705 kB 784 kB +79.1 kB (+11.2%)

Test Logs

Notes

Head commit (ac542ad1) is created by Prow via merging commits: cdc8e88 f4d85e8.

…al proto. This allows for proper json to proto conversion and in local tests messages now reach the spanner queue.
@annzimmer annzimmer requested a review from rlazo January 5, 2021 15:41
generateProtoTasks {
all().each { task ->
task.builtins {
java { }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add option 'lite' (see firebase-firestore.gradle )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I add that then - JsonFormat.parser().merge fails (based on testLogRequest_jsontToProto) which doesn't use lite option. Can you suggest an alternative?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note - the proto is only for testing and shouldn't affect the sdk sizing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. JsonFormat parser actually requires the full runtime to work. Since it's used for tests, I think you can do the same crashlytics is doing https://github.com/firebase/firebase-android-sdk/blob/master/firebase-crashlytics/firebase-crashlytics.gradle#L88

just use testImplementation instead of androidTestImplementation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed all the androidTestImplementation - these were not used. The encoding was already there for the regular implementation level (and validated it is needed at that level)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK you can just get rid of the whole generateProtoTasks sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears required - gives error when removed:
Execution failed for task ':firebase-ml-modeldownloader:generateDebugUnitTestProto'.
protoc: stdout: . stderr: Missing output directives.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks for following through!

@annzimmer
Copy link
Contributor Author

/test smoke-tests

@annzimmer annzimmer merged commit cdf06e2 into master Jan 6, 2021
schmidt-sebastian pushed a commit that referenced this pull request Jan 9, 2021
* Added FirebaseMlException and Logging round 1.

* Updating files per failed tests.

* Fixing to single junit.

* Updates FirebaseMlLogEvent ModelOption name to Options to make internal proto. This allows for proper json to proto conversion and in local tests messages now reach the spanner queue.

* Add ability to get download id for file progress tracking.

* removing androidTestImplementation - these are not used.
@firebase firebase locked and limited conversation to collaborators Feb 6, 2021
@kaibolay kaibolay deleted the mlLogging2 branch September 14, 2022 17:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants