`ImporterNode` to import `Model` artifact
While using ImporterNode to specify Model artifact, the model needs to be placed under serving_model_dir within the source_uri. Using the actual model path, fails to recognize the model.
@sumitbinnani , please provide a link or reference for the code snippet to help us expedite the debugging process.Thanks.
Example:
Let us assume that the model is stored at the path: some_path/serving_model_dir/{saved_model.pb, assets/, variables/}. Then to import the model, this is the expected intuitive behavior.
model = ImporterNode(
instance_name='import_model',
source_uri=''some_path/serving_model_dir",
artifact_type=Model
)
pusher = Pusher(model=model,
push_destination=pusher_pb2.PushDestination(
filesystem=pusher_pb2.PushDestination.Filesystem(base_directory=output_dir)
)
)
However, this fails as the Model artifact assumes that the model is stored within serving_model_dir.
The following snippet works, however, it might not be the best idea to assume that the model is always going to be wrapped within serving_model_dir within the provided path. If this is indeed an expected behavior and is a design choice, we need to update the docs.
model = ImporterNode(
instance_name='import_model',
source_uri=''some_path",
artifact_type=Model
)
pusher = Pusher(model=model,
push_destination=pusher_pb2.PushDestination(
filesystem=pusher_pb2.PushDestination.Filesystem(base_directory=output_dir)
)
)
The importer assumes the input is in supported format, it won't change the format, just register that as an artifact of that type
@sumitbinnani As mentioned above, please register that as an artifact of that type (in supported format). Closing this issue as it has been inactive for a long time.