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

Add option stream for computing signature #33

Merged
merged 6 commits into from
Jun 2, 2023
Merged

Conversation

anh-tong
Copy link
Owner

@anh-tong anh-tong commented Jun 2, 2023

The update in this PR allows signax.signature to support stream option.

signax.signature(path, depth, stream=True) will compute signature for stream data. That is, suppose that we have a stream data $\mathbf{x} = (x_1, x_2, \dots, x_n)$, and $\mathbf{x}_k = (x_1, x_2, \dots, x_k)$. With stream=True, the function will return

$$(Sig(\mathbf{x}_2), Sig(\mathbf{x}_3, \dots, Sig(\mathbf{x}_n))$$

Some minor updates:

  • using jaxtyping for type anotation (but not clear how we can anotate the type of list[Array] with specific dimension of tensor algebera yet)
  • Remove SignatureCombine (it is better to just call signax.signature_combine)
  • Add LogSignatureTransform module (with stream option)

@anh-tong anh-tong requested a review from phinate June 2, 2023 07:50
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #33 (c42ab29) into main (caf998f) will increase coverage by 5.54%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   87.31%   92.85%   +5.54%     
==========================================
  Files           7        7              
  Lines         205      224      +19     
==========================================
+ Hits          179      208      +29     
+ Misses         26       16      -10     
Impacted Files Coverage Δ
src/signax/tensor_ops.py 98.33% <ø> (ø)
src/signax/module.py 100.00% <100.00%> (+30.43%) ⬆️
src/signax/signatures.py 100.00% <100.00%> (+2.00%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@phinate phinate left a comment

Choose a reason for hiding this comment

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

LGTM! As said in slack, we can do a proper jaxtyping PR later to make sure we're hitting all the right checks with shape-correctness!

@phinate phinate merged commit d684532 into main Jun 2, 2023
@phinate phinate deleted the signature-for-stream-data branch June 2, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants