Skip to content

Version 0.4.0 not loading models from S3 #429

Closed
@dennisTS

Description

@dennisTS

Dear TF team,

we are experiencing a weird issue with the latest version of TensorFlow for Java - after upgrade it stopped loading models from S3.

Here's an example setup:

Java 8, a single dependency:

    <dependency>
      <groupId>org.tensorflow</groupId>
      <artifactId>tensorflow-core-platform</artifactId>
      <version>0.4.0</version>
    </dependency>

A single class:

import org.tensorflow.SavedModelBundle;

public class App {

  public static void main(String[] args) {
    SavedModelBundle.load("s3://some/location", "serve");
  }
}

Environment variable: AWS_REGION=eu-central-1

Outcome:

2022-03-09 20:53:24.893857: I external/org_tensorflow/tensorflow/cc/saved_model/reader.cc:43] Reading SavedModel from: s3://some/location
2022-03-09 20:53:24.893896: I external/org_tensorflow/tensorflow/cc/saved_model/loader.cc:283] SavedModel load for tags { serve }; Status: fail: NOT_FOUND: Could not find SavedModel .pb or .pbtxt at supplied export directory path: s3://some/location. Took 49 microseconds.
Exception in thread "main" org.tensorflow.exceptions.TensorFlowException: Could not find SavedModel .pb or .pbtxt at supplied export directory path: s3://some/location
	at org.tensorflow.internal.c_api.AbstractTF_Status.throwExceptionIfNotOK(AbstractTF_Status.java:101)
	at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:623)
	at org.tensorflow.SavedModelBundle.access$000(SavedModelBundle.java:67)
	at org.tensorflow.SavedModelBundle$Loader.load(SavedModelBundle.java:97)
	at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:357)
	at App.main(App.java:6)

Either of the changes below "fixes" the issue:

  • changing from S3 to local
  • changing from 0.4.0 to 0.3.3

Question: has anything changed since the previous version? Are we missing some important point that would make integration with S3 possible?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions