profile
viewpoint

tensorflow/rust 2757

Rust language bindings for TensorFlow

adamcrume/java-properties 11

A library for reading and writing Java properties files in Rust

adamcrume/jmx-datasource 4

Plugin for MCT that allows users to pull data from remote JMX beans

adamcrume/TailPlot 4

Plots a file, displaying new data as it is generated (analogous to 'tail -f')

adamcrume/ceph 1

Ceph distributed file system

adamcrume/juel 1

Java Unified Expression Language

adamcrume/mct 1

Real-time monitoring and visualization platform

dotnwat/java-legion 1

Java bindings for the Legion Runtime

adamcrume/autobuild-ceph 0

Setup for running gitbuilder for the Ceph project

Pull request review commenttensorflow/rust

External protos

 impl<'l> SessionRunArgs<'l> {         self.run_options = Some(Buffer::from(run_options))     } +    pub fn set_options(&mut self, config: RunOptions) {+        if let Ok(bytes) = config.write_to_bytes() {

This should return the error rather than silently ignore it.

xd009642

comment created time in 2 days

Pull request review commenttensorflow/rust

External protos

 impl<'l> SessionRunArgs<'l> {         self.run_options = Some(Buffer::from(run_options))     } +    pub fn set_options(&mut self, config: RunOptions) {

We should have a consistent naming scheme for the Vec<u8>/&[u8] version, and the protobuf version. A suffix is probably the way to go, e.g. set_run_options and set_run_options_protobuf.

xd009642

comment created time in 2 days

Pull request review commenttensorflow/rust

External protos

 impl<'l> SessionRunArgs<'l> {         self.run_options = Some(Buffer::from(run_options))     } +    pub fn set_options(&mut self, config: RunOptions) {

This should take RunOptions by reference. There's no need to move it into the function, since it's not being stored or moved anywhere.

xd009642

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

issue closedtensorflow/rust

Will 1.15 still work with the version with 2.3 support?

Quick question, with the TF 2.3 PR merged, when this is released will it still be possible to work this with 1.15? Or will I have to upgrade my tensorflow version in my projects?

closed time in 2 days

xd009642

issue commenttensorflow/rust

Will 1.15 still work with the version with 2.3 support?

It should continue to work with 1.15, as long as you stick to features available in 1.15. I haven't manually verified this, though.

By the way, the relevant pull request or mailing list are good places to ask questions.

xd009642

comment created time in 2 days

created tagadamcrume/java-properties

tagv1.2.0

A library for reading and writing Java properties files in Rust

created time in 4 days

created tagadamcrume/java-properties

tagv1.3.0

A library for reading and writing Java properties files in Rust

created time in 4 days

push eventadamcrume/java-properties

Adam Crume

commit sha bd07b61acf5a0d8c1ab0b9fa88784232dd7347c2

Implement Error::source for PropertiesError

view details

Adam Crume

commit sha 0f674b84fd4b50d05afcc90845121f8fd86e8e2d

Clean up code

view details

Adam Crume

commit sha b15259cc620fa794cd24b9a7a7649330df48dc01

Add support for different encoding when writing

view details

Adam Crume

commit sha 9514702c2f6644e415edf0b5bb9528bb741f163e

Bump to version 1.3.0

view details

push time in 4 days

created tagadamcrume/robust-binary-search

tagv0.1.1

Robust Binary Search provides a binary search implementation which is robust against errors during the search.

created time in 5 days

created tagadamcrume/robust-binary-search

tagv0.1.0

Robust Binary Search provides a binary search implementation which is robust against errors during the search.

created time in 5 days

push eventadamcrume/robust-binary-search

Adam Crume

commit sha 3e218284f9e7d59b5f1dcf3399846991f8a048b6

Fix install and run instructions.

view details

Adam Crume

commit sha aba2bc64cbaf8181d1ee436ab92c8daa8e65e2e7

Add Cargo metadata.

view details

push time in 5 days

push eventadamcrume/robust-binary-search

Adam Crume

commit sha 5380f7f400be316e62e9ba9b8ce858848bf16217

Add missing Cargo.toml metadata.

view details

push time in 5 days

MemberEvent

create barnchadamcrume/robust-binary-search

branch : main

created branch time in 6 days

created repositoryadamcrume/robust-binary-search

Robust Binary Search provides a binary search implementation which is robust against errors during the search.

created time in 6 days

issue commenttensorflow/rust

Tensorflow 2.0 support

Yes, it's ready for testing on the master branch.

r-wheeler

comment created time in 8 days

push eventtensorflow/rust

Adam Crume

commit sha 68ed2202c510f74b7da8db61f6e4ce402b0e9038

Upgrade to TensorFlow 2.3.0 Fixes #252

view details

Adam Crume

commit sha 52a645fd92d3eefa1220558373432e4a21d82b0b

Upgrade OS versions used by Travis. We were specifying (or defaulting to) versions which are too old for the TensorFlow prebuilt binaries.

view details

Adam Crume

commit sha 56b15c3fdec0a1e8d1a2d8067990bf157a813c75

Merge pull request #280 from adamcrume/tf2 Upgrade to TensorFlow 2.3.0

view details

push time in 9 days

PR merged tensorflow/rust

Upgrade to TensorFlow 2.3.0

This still needs test_resources/library/macos/test_op.so to be generated by someone with a Mac.

Fixes #252

+14114 -1974

2 comments

14 changed files

adamcrume

pr closed time in 9 days

issue closedtensorflow/rust

Tensorflow 2.0 support

Thanks for the excellent bindings, we have had great success using them. Do you know when tensorflow 2 saved models will be supported?

I have inquired in other channels about the stability of the tensorflow 2.0 C API but not gotten a response.

closed time in 9 days

r-wheeler

issue closedtensorflow/rust

0.16 is still broken on crates.io

Howdy!

I noticed that the issue was already addressed in Git, but the latest version on crates.io is still broken. Would it be possible to publish a 0.16.x that includes that fix to the build script?

closed time in 10 days

photex

issue commenttensorflow/rust

0.16 is still broken on crates.io

I published version 0.16.1, which should fix this.

photex

comment created time in 10 days

created tagtensorflow/rust

tagv0.16.1

Rust language bindings for TensorFlow

created time in 10 days

push eventtensorflow/rust

Adam Crume

commit sha cad4a27add515410f1812e0805f666398b82b56b

Bump to version 0.16.1

view details

push time in 10 days

create barnchtensorflow/rust

branch : v0.16

created branch time in 10 days

push eventtensorflow/rust

Adam Crume

commit sha 1212765840c058f02b75df11dcbc7544df1b185f

Use OS to determine archive extension instead of target environment. Fixes #274

view details

Adam Crume

commit sha 896bbb287dd0ced05c2f081f7b44fa408583b773

Use env::consts::OS to test for Window instead of target_env

view details

Adam Crume

commit sha 7d03aa4b5ce970f2d51158129068e48940db3610

Use CARGO_CFG_TARGET_* variables instead of std::env::consts.

view details

Adam Crume

commit sha 04b88cfde7ab75ab2995dde3a378a6394e16fd14

Merge pull request #277 from adamcrume/master Use OS to determine archive extension instead of target environment.

view details

push time in 10 days

issue closedtensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

When compiling on Windows while using a gnu toolchain, the tensorflow-sys build file will try to download a file for Windows but with Unix compression. It happens here, when choosing the file extension:

https://github.com/tensorflow/rust/blob/c1a1f6bb0cea568ac301d7c58acfab797df18d63/tensorflow-sys/build.rs#L160-L163

These line assume that msvc will be Windows, and gnu Unix, however having a gnu toolchain activated on a Windows machine causes the build script to download the file https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-windows-x86_64-1.15.0.tar.gz (notice the "windows" associated with ".tar.gz") which does not exist because the Windows files are zip files.

When looking at the actual files available from tensorflow it seems that the distinction is Windows / unix rather than msvc / gnu.

I have solved this locally by patching the extension lines as follows:

let ext = match os {
    "windows" => ".zip",
    _ => ".tar.gz",
};

and replacing all target_env = "msvc" checks with target_os = "windows" (the not conditions apply correctly to that new boolean).

Am I missing something that would make this break everything on other machines? Otherwise I believe that could be an improvement to the build script, as after this I can compile with both msvc and gnu, whereas before gnu will fail.

closed time in 10 days

Zvax

pull request commenttensorflow/rust

Upgrade to TensorFlow 2.3.0

Thanks! I added it to my pull request.

adamcrume

comment created time in 12 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha 52a645fd92d3eefa1220558373432e4a21d82b0b

Upgrade OS versions used by Travis. We were specifying (or defaulting to) versions which are too old for the TensorFlow prebuilt binaries.

view details

push time in 12 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha bc89b04f09755ad9ca1df7cf94d0a3517424e611

Upgrade OS versions used by Travis. We were specifying (or defaulting to) versions which are too old for the TensorFlow prebuilt binaries.

view details

push time in 12 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha b3f2ffe929563830a8808fee85c1c6476a98f740

Upgrade OS versions used by Travis. We were specifying (or defaulting to) versions which are too old for the TensorFlow prebuilt binaries.

view details

push time in 12 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha fd40fd1de9b207f09b45661bb704c68f805da373

Upgrade OS versions used by Travis. We were specifying (or defaulting to) versions which are too old for the TensorFlow prebuilt binaries.

view details

push time in 12 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha 68ed2202c510f74b7da8db61f6e4ce402b0e9038

Upgrade to TensorFlow 2.3.0 Fixes #252

view details

push time in 12 days

issue closedtensorflow/rust

Support one-hot encoding

One hot encoding is useful for reducing the boilerplate code needed when dealing with categorical data, and many of the other TensorFlow APIs support it (C++ reference).

closed time in 13 days

ChosunOne

issue commenttensorflow/rust

Support one-hot encoding

I assume that the issue is addressed by the new builder code described in the previous comment (which no longer requires the experimental_training feature), so I'm closing this issue. If this doesn't actually address your concern, feel free to re-open this issue.

ChosunOne

comment created time in 13 days

issue commenttensorflow/rust

0.16 is still broken on crates.io

That's an issue with the Windows build, right? The Windows build has some other issues, too, which I'm trying (unsuccessfully, so far) to fix in https://github.com/tensorflow/rust/pull/277. If you have any Windows expertise, I'd really appreciate help in getting https://github.com/tensorflow/rust/issues/274 fixed (which is what that PR is about).

Once we get that working, then I can release 0.16.1.

photex

comment created time in 13 days

issue commenttensorflow/rust

Tensorflow 2.0 support

I have a PR open to upgrade to TensorFlow 2. I could use help from someone with a Mac (regenerating test_resources/library/macos/test_op.so) as well as help from someone on Windows, verifying that it works as expected. In general, lots of testing at HEAD before releasing the next version of the crate would help gain confidence, since this is a major bump.

I'm not sure why I was getting segfaults earlier; this looks like a small change API-wise; the issues were more with packaging and a newer version of bindgen.

It looks like the breaking string changes are coming in 2.4.0.

r-wheeler

comment created time in 13 days

PR opened tensorflow/rust

Upgrade to TensorFlow 2.3.0

This still needs test_resources/library/macos/test_op.so to be generated by someone with a Mac.

Fixes #252

+14112 -1972

0 comment

12 changed files

pr created time in 13 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha 544c0730ae3873837871da34e39a3ce6c41e8fbd

Upgrade to TensorFlow 2.3.0 Fixes #252

view details

push time in 13 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha c2bb09750bc41289ccd51a39e12c0f469a8f3b0f

Upgrade to TensorFlow 2.3.0 Fixes #252

view details

push time in 13 days

create barnchadamcrume/tensorflow-rust

branch : tf2

created branch time in 13 days

pull request commenttensorflow/rust

External protos

I agree that this project should move toward using actual protobuf types and not just Vec<u8>. I know that manually working with protobuf codegen is a headache for most users who want to use protos. I just have concerns about the details and how we get from here to there.

I don't think we want to get rid of the methods which return Vec<u8>, because some users may already be using other protobuf libraries. In fact, this is the main reason why the project hasn't committed to using a particular protobuf library in its API, yet: there hasn't been a clear winner in terms of which protobuf crate to use. protobuf is pretty popular, and it's what we're using internally and seems to work well, but some users may be using prost or something else.

One question I had was whether it made sense for the generated protos to go into the tensorflow crate or a separate one. One benefit in separating them is that code which needs TensorFlow protos but not TensorFlow itself (e.g. something generating Example protos or reading output) could use the proto crate without the tensorflow-sys crate, so that could be a reasonable argument for keeping them separate.

I'd be a bit more comfortable if we feature-gate the use of proto types in the API for now (i.e. a single feature named something like protobuf_protos), at least for a few releases. I'd also be more comfortable if the code were in this Git repo (even if in a separate crate), and if I had publish access on the proto crate. My concern is that if something happens and you're not able to release the proto crate, then the tensorflow crate wouldn't be able to use new protos/fields, and switching to using generated proto code in a different crate would be a breaking change.

By the way, if there is any documentation which is unclear, please file an issue or submit a PR. We should fix bad or incomplete docs.

I'm also definitely interested in having more contributors to the project, especially for the Windows build. I always need help with the Windows build. :(

xd009642

comment created time in 13 days

pull request commenttensorflow/rust

External protos

The doc tests have been broken for a while because of https://github.com/rust-lang/cargo/issues/8531; that's what the shared library errors in Travis are.

What are the benefits of putting the protos in a separate crate, instead of keeping them in the tensorflow crate and just making them public API? I do have some concerns around coordinating releases.

I'll have to think about it more when I've had more sleep.

xd009642

comment created time in 15 days

issue commenttensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

Good point. I switched to using the Cargo environment variables. It'll take more to support cross-compilation when building TensorFlow from source, but this should work for using prebuilt TensorFlow binaries.

If you can fix the Windows build, I'd be happy with either the existing PR being updated or a new one being created.

Zvax

comment created time in 18 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha 7d03aa4b5ce970f2d51158129068e48940db3610

Use CARGO_CFG_TARGET_* variables instead of std::env::consts.

view details

push time in 18 days

issue commenttensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

Yes, that commit.

I think I'll need help from someone developing on Windows. I don't currently have a Windows environment to test in.

Zvax

comment created time in 23 days

issue commenttensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

I added a new commit. Can you try again?

Zvax

comment created time in 24 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha 896bbb287dd0ced05c2f081f7b44fa408583b773

Use env::consts::OS to test for Window instead of target_env

view details

push time in 24 days

issue commenttensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

Can someone on Windows verify that https://github.com/tensorflow/rust/pull/277 fixes the issue?

Zvax

comment created time in 25 days

PR opened tensorflow/rust

Use OS to determine archive extension instead of target environment.

Fixes #274

+28 -12

0 comment

1 changed file

pr created time in 25 days

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha e9e4b489ed66a2d9fbb5f4b610f1e46a3c38e1fd

Merge pull request #271 from adamcrume/master Regenerate protos

view details

Adam Crume

commit sha 68875ca8d51abbaae25224bd14267c936a087d4a

Bump to version 0.16.0

view details

Adam Crume

commit sha e221541afcc8c80c9ebfd1d10e38a8501086d3bf

Update dependencies

view details

Aaron Housh

commit sha 1d958347a21d7ceadf6a9492339491bd12c63f76

Add back std:: to io

view details

Adam Crume

commit sha c1a1f6bb0cea568ac301d7c58acfab797df18d63

Merge pull request #273 from Dispersia/master Add back std:: to io

view details

Adam Crume

commit sha 1212765840c058f02b75df11dcbc7544df1b185f

Use OS to determine archive extension instead of target environment. Fixes #274

view details

push time in 25 days

issue closedtensorflow/rust

Unexpected response code 404 when building

I tried to compile an empty cargo project with this crate as a dependency and I got the following cargo output:

    Updating git repository `https://github.com/tensorflow/rust`
    Updating crates.io index
  Downloaded proc-macro2 v1.0.24
  Downloaded syn v1.0.42
  Downloaded 2 crates (263.0 KB) in 1.35s
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.42
   Compiling num-traits v0.2.12
   Compiling tensorflow-sys v0.19.0 (https://github.com/tensorflow/rust?rev=c1a1f6bb0cea568ac301d7c58acfab797df18d63#c1a1f6bb)
   Compiling quote v1.0.7
   Compiling num-complex v0.3.0
error: failed to run custom build command for `tensorflow-sys v0.19.0 (https://github.com/tensorflow/rust?rev=c1a1f6bb0cea568ac301d7c58acfab797df18d63#c1a1f6bb)`

Caused by:
  process didn't exit successfully: `C:\Documents\Programming\STTT\tensorflow-test\target\debug\build\tensorflow-sys-6ee25f02f6f39960\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=TENSORFLOW_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=TENSORFLOW_STATIC
cargo:rerun-if-env-changed=TENSORFLOW_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
libtensorflow-sys/build.rs:172: binary_url = "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.15.0.tar.gz"
libtensorflow-sys/build.rs:176: base_name = "libtensorflow-cpu-windows-x86_64-1.15.0"
libtensorflow-sys/build.rs:185: file_name = "C:\\Documents\\Programming\\STTT\\tensorflow-test\\target\\debug\\build\\tensorflow-sys-6ad6b640a459953c\\out\\libtensorflow-cpu-windows-x86_64-1.15.0.tar.gz"

--- stderr
thread 'main' panicked at 'Unexpected response code 404 for https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-1.15.0.tar.gz', C:\Users\Karel\.cargo\git\checkouts\rust-3b69c98c297fb376\c1a1f6b\tensorflow-sys\build.rs:199:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish...
error: build failed

The same happens whether I use the latest cargo version (0.16.0) or the latest master commit (c1a1f6bb0cea568ac301d7c58acfab797df18d63).

Did someone remove a hosted artifact somewhere? Or is my target not supported for some reason?

closed time in 25 days

flaghacker

issue commenttensorflow/rust

Unexpected response code 404 when building

This looks like the same problem as #274. Please follow that issue for updates.

flaghacker

comment created time in 25 days

issue commenttensorflow/rust

Tensorflow 2.0 support

I'm working on the upgrade, but I'm running into segfaults, so it's probably not going to be quick and easy.

r-wheeler

comment created time in a month

issue commenttensorflow/rust

0.16 is still broken on crates.io

Can you clarify what's still broken?

photex

comment created time in a month

issue commenttensorflow/rust

Associating the gnu/msvc toolchains with OS's prevents using gnu on Windows

This looks like a straightforward improvement. If you can submit a pull request, I'd be happy to accept it.

Zvax

comment created time in a month

push eventtensorflow/rust

Aaron Housh

commit sha 1d958347a21d7ceadf6a9492339491bd12c63f76

Add back std:: to io

view details

Adam Crume

commit sha c1a1f6bb0cea568ac301d7c58acfab797df18d63

Merge pull request #273 from Dispersia/master Add back std:: to io

view details

push time in 2 months

PR merged tensorflow/rust

Add back std:: to io

Hello, https://github.com/tensorflow/rust/commit/713daef09a22b47ae97d529b8ae43b6866291df5 removed self from io, however it was used under this compilation target. I just added it to the target itself instead of back at the top so it doesn't give unused warnings when not msvc

+1 -1

1 comment

1 changed file

Dispersia

pr closed time in 2 months

pull request commenttensorflow/rust

Add back std:: to io

Whoops, conditional compilation makes things tricky. Thanks!

Dispersia

comment created time in 2 months

push eventtensorflow/rust

Adam Crume

commit sha e221541afcc8c80c9ebfd1d10e38a8501086d3bf

Update dependencies

view details

push time in 2 months

push eventtensorflow/rust

Adam Crume

commit sha 13ce006083b4f719b3959769248ce99e20f838d5

Update the documentation

view details

push time in 2 months

created tagtensorflow/rust

tagv0.16.0

Rust language bindings for TensorFlow

created time in 2 months

push eventtensorflow/rust

Adam Crume

commit sha 68875ca8d51abbaae25224bd14267c936a087d4a

Bump to version 0.16.0

view details

push time in 2 months

push eventtensorflow/rust

Adam Crume

commit sha 7a297d6415b323a7ac12db0e73c48af09b17bec0

Regenerate protos

view details

Adam Crume

commit sha e9e4b489ed66a2d9fbb5f4b610f1e46a3c38e1fd

Merge pull request #271 from adamcrume/master Regenerate protos

view details

push time in 2 months

PR merged tensorflow/rust

Regenerate protos
+12456 -3443

0 comment

27 changed files

adamcrume

pr closed time in 2 months

PR opened tensorflow/rust

Regenerate protos
+12456 -3443

0 comment

27 changed files

pr created time in 3 months

push eventadamcrume/tensorflow-rust

Adam Crume

commit sha b75337e5205226841a062c54d0db16cee610af73

Merge pull request #270 from adamcrume/master Fix test-all for multi-line deprecation attribute

view details

Adam Crume

commit sha 7a297d6415b323a7ac12db0e73c48af09b17bec0

Regenerate protos

view details

push time in 3 months

push eventtensorflow/rust

Adam Crume

commit sha 75856de32cfc1eebce03552cb0c679c44e9a18d1

Fix test-all for multi-line deprecation attribute

view details

Adam Crume

commit sha b75337e5205226841a062c54d0db16cee610af73

Merge pull request #270 from adamcrume/master Fix test-all for multi-line deprecation attribute

view details

push time in 3 months

PR opened tensorflow/rust

Fix test-all for multi-line deprecation attribute
+18 -14

0 comment

2 changed files

pr created time in 3 months

push eventadamcrume/tensorflow-rust

Kyle Kosic

commit sha 8d2b06777f2dbda2996715bcbbc9cf732a77c313

impl TF_GetOpList

view details

Kyle Kosic

commit sha a0ba320fa0063cd8a4bd5695f21d83c3224b2f7d

parse oplist proto

view details

Kyle Kosic

commit sha d38502928356b37b67a54f4c4534780bee4eb58d

remove local test

view details

Kyle Kosic

commit sha d215ed6b2e1774f0aad788114cffd3f04bb60cc4

fix deref

view details

Kyle Kosic

commit sha 4c956b644ec9bdf54fa27a2905f40433f4ce5ecd

Merge branch 'master' of https://github.com/tensorflow/rust into tf-getoplist

view details

Kyle Kosic

commit sha 0350707920aeec145345b37fa43ed0e05d739010

remove added whitespace

view details

Kyle Kosic

commit sha 71dbd943dd36294131a7c1753bd6e83cbe52f92d

fix for TF_Buffer heap allocation; add tests

view details

Kyle Kosic

commit sha 37741e139a39bcc6f6e97667c489161cefa731cb

cargo fmt

view details

Kyle Kosic

commit sha f1c118d54f1dd7474462a7ec05c709580e325ba8

resolve merge conflict

view details

Kyle Kosic

commit sha f22c893b690fd3dd8fd5e1a384ff8b8ab108c7bf

add OpDef and OpList structs

view details

Kyle Kosic

commit sha b297d29f8b7e9370ba6b43d117b27ae9b806dba4

add OpArgDef and OpAttrDef

view details

Kyle Kosic

commit sha e7e63fb00b878fae84627588145811ef2aa98c43

put tests behind feature flag

view details

Kyle Kosic

commit sha 55815e5accaef0b02dea2257e1b6beeadaf19cff

add attr def field

view details

Kyle Kosic

commit sha dc96913cc17574c047042144ce381fef0fb79b60

remove feature flag; fix deallocator issue with TF_Buffer

view details

Kyle Kosic

commit sha 8594a7ffcd467405122b8bfaa495d7ae46145ce4

remove flag around unit test

view details

Adam Crume

commit sha 4df9910d81d0eb588c631d26752b8aef9c708579

Merge pull request #263 from kykosic/tf-getoplist Wrap TF_GetOpList [#166]

view details

Adam Crume

commit sha f89f529255816edd1e6cddfb8d996a884026817a

Merge pull request #265 from adamcrume/master Add Scope::with_device and Scope::with_control_dependencies

view details

Kyle Kosic

commit sha e57aa432b0905b09fdaf669be2bdfb044f591e5e

impl ndarray interop

view details

Kyle Kosic

commit sha f6c9d182b1d04a50f9bd5d003370438c0d3ff909

Merge branch 'master' of https://github.com/tensorflow/rust into ndarray

view details

xd009642

commit sha d20e14356966fee40be30c6d404553836620328d

Remove experimental training feature

view details

push time in 3 months

pull request commenttensorflow/rust

Remove experimental training feature

Thanks!

xd009642

comment created time in 3 months

push eventtensorflow/rust

xd009642

commit sha d20e14356966fee40be30c6d404553836620328d

Remove experimental training feature

view details

xd009642

commit sha f23c87717f55759998de297bea12234ebb6860fc

Respond to review comments

view details

xd009642

commit sha 19b1c65e8df6d4b4ce1442db6e126fd86b4eda74

remove experimental training from xor

view details

xd009642

commit sha bdd21e3e8e7e2729ca7089322bab4eaa1f9c2892

Merge branch 'master' into feature/remove-experimental-train

view details

Adam Crume

commit sha f176286db4685b9df3e168d71293038f83e9aa23

Merge pull request #267 from xd009642/feature/remove-experimental-train Remove experimental training feature

view details

push time in 3 months

PR merged tensorflow/rust

Remove experimental training feature

As discussed on the google groups

+8 -31

6 comments

7 changed files

xd009642

pr closed time in 3 months

PR closed tensorflow/rust

Update README.md

Its only a few targets that require large amounts of memory so its faster to build and crash then to start at --jobs=1 as far as i can tell.

+2 -3

2 comments

1 changed file

AZon8

pr closed time in 3 months

pull request commenttensorflow/rust

Update README.md

Closing this as obsolete. Please send another pull request if you can sign the CLA.

AZon8

comment created time in 3 months

pull request commenttensorflow/rust

Feature: ndarray interop with tensors [#260]

Thanks!

kykosic

comment created time in 3 months

push eventtensorflow/rust

Kyle Kosic

commit sha e57aa432b0905b09fdaf669be2bdfb044f591e5e

impl ndarray interop

view details

Kyle Kosic

commit sha f6c9d182b1d04a50f9bd5d003370438c0d3ff909

Merge branch 'master' of https://github.com/tensorflow/rust into ndarray

view details

Kyle Kosic

commit sha fc80383415faf2d55cf52e2c18f286f325371430

add ndarray to test script; use macro for testing ndarray

view details

Kyle Kosic

commit sha dd4a632d3699c7d445868150c7d4cad88554c41e

fix numbering

view details

Adam Crume

commit sha 1266962afa3264bbc3dd3a1469137ce3c611b930

Merge pull request #268 from kykosic/ndarray Feature: ndarray interop with tensors [#260]

view details

push time in 3 months

PR merged tensorflow/rust

Feature: ndarray interop with tensors [#260]

Introduces an optional feature "ndarray" which provides two From impls:

  • ndarray::ArrayBase<S, D> -> tensorflow:Tensor<S> – This allows converting from the various array types in "ndarray" to a Tensor with syntax:
 let tensor = Tensor::from(array);
  • tensorflow::Tensor<T> -> ndarray::Array<T, Dim<IxDyn>> – This allows converting from a Tensor to an "ndarray" Array with owned data and dynamic dimensionality. (The dynamic dimensionality is necessary as Arrays have additional types for dimensions and is the only way to satisfy the From trait.) The conversion can be performed with:
let array = Array::from(tensor);

Converting to arrays without dynamic dimensionality can be performed by the user with into_dimensionality, otherwise we would have to use multiple TryFrom traits for each dimension type or implement some conversion macro.

Closes #260

+70 -0

1 comment

3 changed files

kykosic

pr closed time in 3 months

issue closedtensorflow/rust

Tensor interop with `ndarray`

I've found working with raw Tensor objects in rust to be somewhat tedious. I think it would be useful to add methods to cast between Tensor structs and ndarray objects similar to how core TensorFlow python has builtin methods for casting with numpy.

The Tensor object could impl directly a Tensor::from_ndarray method and Tensor.to_ndarray method to support this. Alternatively this could be made generic using std::convert::TryFrom and std::convert::TryInto, and implementations can be provided for correct ndarray objects.

Any thoughts, comments, or concerns about this idea?

closed time in 3 months

kykosic

Pull request review commenttensorflow/rust

Feature: ndarray interop with tensors [#260]

 mod tests {         }     } +    #[cfg(feature = "ndarray")]+    #[test]+    fn test_tensor_from_ndarray() {+        let arr = Array::<f64, _>::zeros((1, 1, 1));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[1, 1, 1]).with_values(&[0.0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<f32, _>::zeros((1, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[1, 2]).with_values(&[0.0, 0.0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<i32, _>::zeros((2, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[2, 2]).with_values(&[0, 0, 0, 0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<u8, _>::zeros((3, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[3, 2])+            .with_values(&[0, 0, 0, 0, 0, 0])+            .unwrap();+        assert_eq!(expected, tensor);+    }++    #[cfg(feature = "ndarray")]+    #[test]+    fn test_ndarray_from_tensor() {+        let tensor = Tensor::<f64>::new(&[1, 1, 1]).with_values(&[0.0]).unwrap();+        let arr = Array::from(tensor);+        let expected = Array::<f64, _>::zeros((1, 1, 1)).into_dyn();+        assert_eq!(expected, arr);++        let tensor = Tensor::<f32>::new(&[1, 2])+            .with_values(&[0.0, 0.0])+            .unwrap();+        let arr = Array::from(tensor);+        let expected = Array::<f32, _>::zeros((1, 2)).into_dyn();+        assert_eq!(expected, arr);++        let tensor = Tensor::<i32>::new(&[2, 2])+            .with_values(&[0, 0, 0, 0])+            .unwrap();+        let arr = Array::from(tensor);+        let expected = Array::<i32, _>::zeros((2, 2)).into_dyn();+        assert_eq!(expected, arr);++        let tensor = Tensor::<u8>::new(&[3, 2])+            .with_values(&[0, 0, 0, 0, 0, 0])+            .unwrap();+        let arr = Array::from(tensor);+        let expected = Array::<u8, _>::zeros((3, 2)).into_dyn();+        assert_eq!(expected, arr);+    }

This needs some non-default values, too.

kykosic

comment created time in 3 months

Pull request review commenttensorflow/rust

Feature: ndarray interop with tensors [#260]

 mod tests {         }     } +    #[cfg(feature = "ndarray")]+    #[test]+    fn test_tensor_from_ndarray() {+        let arr = Array::<f64, _>::zeros((1, 1, 1));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[1, 1, 1]).with_values(&[0.0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<f32, _>::zeros((1, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[1, 2]).with_values(&[0.0, 0.0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<i32, _>::zeros((2, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[2, 2]).with_values(&[0, 0, 0, 0]).unwrap();+        assert_eq!(expected, tensor);++        let arr = Array::<u8, _>::zeros((3, 2));+        let tensor = Tensor::from(arr);+        let expected = Tensor::new(&[3, 2])+            .with_values(&[0, 0, 0, 0, 0, 0])+            .unwrap();+        assert_eq!(expected, tensor);+    }

This could use a test with non-default values so we can verify that the tensor values are actually being set.

kykosic

comment created time in 3 months

pull request commenttensorflow/rust

Remove experimental training feature

The tests can also be removed from the test-all script.

xd009642

comment created time in 3 months

Pull request review commenttensorflow/rust

Remove experimental training feature

 use std::ptr; pub struct SavedModelBundle {     /// The loaded session.     pub session: Session,-    /// A meta graph definition as raw protocol buffer.+    /// A meta graph definition as raw protocol buffer. This is deprecated in favour of the+    /// deserialized type

Nit: This is missing a final period.

xd009642

comment created time in 3 months

push eventtensorflow/rust

Adam Crume

commit sha 64486967d4fe781737533b940c517baa33e71fff

Fix bug in Operation::control_inputs

view details

Adam Crume

commit sha d4aa581382aee9df4d2cb63b18521b8faec74939

Log current command in test-all This makes the output easier to read.

view details

Adam Crume

commit sha 215a5a407a1da598cb688e1f09be82cce082018e

Add Scope::new_operation This will let us add properties to Scope with only regular code and not requiring changes to generated code.

view details

Adam Crume

commit sha 46df34ef85bc0833dc1539e98e74d1f67f05cf85

Add Scope::with_device

view details

Adam Crume

commit sha 9ebe0de492e18c6238789f1006f904a4a63d5572

Add Scope::with_control_dependencies

view details

Adam Crume

commit sha f89f529255816edd1e6cddfb8d996a884026817a

Merge pull request #265 from adamcrume/master Add Scope::with_device and Scope::with_control_dependencies

view details

push time in 3 months

pull request commenttensorflow/rust

Wrap TF_GetOpList [#166]

Thanks a lot for the feature work!

kykosic

comment created time in 3 months

push eventtensorflow/rust

Kyle Kosic

commit sha 8d2b06777f2dbda2996715bcbbc9cf732a77c313

impl TF_GetOpList

view details

Kyle Kosic

commit sha a0ba320fa0063cd8a4bd5695f21d83c3224b2f7d

parse oplist proto

view details

Kyle Kosic

commit sha d38502928356b37b67a54f4c4534780bee4eb58d

remove local test

view details

Kyle Kosic

commit sha d215ed6b2e1774f0aad788114cffd3f04bb60cc4

fix deref

view details

Kyle Kosic

commit sha 4c956b644ec9bdf54fa27a2905f40433f4ce5ecd

Merge branch 'master' of https://github.com/tensorflow/rust into tf-getoplist

view details

Kyle Kosic

commit sha 0350707920aeec145345b37fa43ed0e05d739010

remove added whitespace

view details

Kyle Kosic

commit sha 71dbd943dd36294131a7c1753bd6e83cbe52f92d

fix for TF_Buffer heap allocation; add tests

view details

Kyle Kosic

commit sha 37741e139a39bcc6f6e97667c489161cefa731cb

cargo fmt

view details

Kyle Kosic

commit sha f1c118d54f1dd7474462a7ec05c709580e325ba8

resolve merge conflict

view details

Kyle Kosic

commit sha f22c893b690fd3dd8fd5e1a384ff8b8ab108c7bf

add OpDef and OpList structs

view details

Kyle Kosic

commit sha b297d29f8b7e9370ba6b43d117b27ae9b806dba4

add OpArgDef and OpAttrDef

view details

Kyle Kosic

commit sha e7e63fb00b878fae84627588145811ef2aa98c43

put tests behind feature flag

view details

Kyle Kosic

commit sha 55815e5accaef0b02dea2257e1b6beeadaf19cff

add attr def field

view details

Kyle Kosic

commit sha dc96913cc17574c047042144ce381fef0fb79b60

remove feature flag; fix deallocator issue with TF_Buffer

view details

Kyle Kosic

commit sha 8594a7ffcd467405122b8bfaa495d7ae46145ce4

remove flag around unit test

view details

Adam Crume

commit sha 4df9910d81d0eb588c631d26752b8aef9c708579

Merge pull request #263 from kykosic/tf-getoplist Wrap TF_GetOpList [#166]

view details

push time in 3 months

PR merged tensorflow/rust

Wrap TF_GetOpList [#166]

I'm opening this as a draft to get some feedback, as I'm kinda stuck

Issues:

  • Is this Library struct member op_list the correct place/type to store the proto?
  • I'm having issues testing this for correctness. So far, I've tried loading the test library defined for the TF C-API unit test test_op1.so as compiled by bazel (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api_test.cc#L196-L212), but the resulting TF_Buffer always has a size of 0. I believe this test object should have a single OpDef in it. Is there a way we are implementing unit tests for this operation since it has a compiled C++ dependency?

Any advice would be appreciated.

EDIT: This is hopefully ready for review. See comments.

+351 -5

3 comments

4 changed files

kykosic

pr closed time in 3 months

Pull request review commenttensorflow/rust

Wrap TF_GetOpList [#166]

 mod tests {         assert!(get_registered_kernels_for_op("Add").unwrap().len() > 0);     } +    #[test]+    fn test_library_load() {+        // This test is not yet implemented for Windows+        let check_path = match std::env::consts::OS {+            "linux" => Some("test_resources/library/linux/test_op.so"),+            "macos" => Some("test_resources/library/macos/test_op.so"),+            _ => None,+        };+        if let Some(path) = check_path {+            let res = Library::load(path);+            assert!(res.is_ok());+            let lib = res.unwrap();

These three lines can be simplified to just:

let lib = Library::load(path).unwrap();

This also has the advantage of printing out the error details if Library::load fails, rather than just assertion failed: res.is_ok()

kykosic

comment created time in 3 months

more