Skip to content
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

External protos #278

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ half = "1.3.0"
protobuf = "=2.17.0"
# Enables conversions between ndarray::Array objects and tensorflow::Tensor
ndarray = { version = "0.13.1", optional = true }
tensorflow-protos-rs = { version = "0.2", features = ["config", "function", "saved_model", "resource_handle", "variable", "verifier_config", "versions"]}


[dev-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Pre-release

1. Generate protos
1. Run `cd tensorflow-proto-codegen; cargo run -- $PATH_TO_TENSORFLOW $PWD/..`
1. Update Cargo.toml to ensure version of protobuf exactly equals version of protoc_rust used
1. Generate ops
1. Run `cd tensorflow-op-codegen; cargo run -- $PATH_TO_TENSORFLOW $PWD/..`
Expand All @@ -10,7 +9,7 @@

## Releasing

Note that any crate not mentioned here (e.g. tensorflow-proto-codegen, tensorflow-op-codegen) is internal-only and should *not* be published to crates.io.
Note that any crate not mentioned here (e.g. tensorflow-op-codegen) is internal-only and should *not* be published to crates.io.

1. Check out a clean copy. Note that `cargo publish` packages up untracked files. Use `--allow-dirty` at your peril.
1. Fetch from the main repo
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ use std::slice;
use std::str::Utf8Error;
use tensorflow_sys as tf;

pub(crate) mod protos {
pub use tensorflow_protos_rs::*;
}

////////////////////////

/// Will panic if `msg` contains an embedded 0 byte.
Expand Down Expand Up @@ -172,8 +176,6 @@ macro_rules! c_enum {

////////////////////////

mod protos;

mod buffer;
use crate::buffer::Buffer;

Expand Down
7 changes: 1 addition & 6 deletions src/ops/ops_impl.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// DO NOT EDIT. Generated by tensorflow-op-codegen/src/main.rs.
#![allow(
non_snake_case,
trivial_casts,
unused_parens,
unused_qualifications
)]
#![allow(non_snake_case, trivial_casts, unused_parens, unused_qualifications)]

/// Builder for the `Abort` operation.
#[derive(::std::fmt::Debug, ::std::default::Default)]
Expand Down
17 changes: 0 additions & 17 deletions src/protos.rs

This file was deleted.

Loading