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

plotters example #50

Merged
merged 11 commits into from
May 15, 2024
Merged

plotters example #50

merged 11 commits into from
May 15, 2024

Conversation

HyperCodec
Copy link
Owner

No description provided.

@HyperCodec HyperCodec self-assigned this Apr 16, 2024
@HyperCodec HyperCodec added the enhancement New feature or request label Apr 16, 2024 — with GitHub Codespaces
Copy link
Owner Author

@HyperCodec HyperCodec left a comment

Choose a reason for hiding this comment

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

Weird error about unsafe predicate at runtime. Also doesn't currently support other features.

@HyperCodec
Copy link
Owner Author

HyperCodec commented Apr 16, 2024

thread 'main' panicked at library/core/src/panicking.rs:215:5: unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread caused non-unwinding panic. aborting. Aborted (core dumped)

appears to be part of plotters because it makes it completely through the training phase.

@HyperCodec
Copy link
Owner Author

opened plotters-rs/plotters#573, awaiting reply.

@HyperCodec
Copy link
Owner Author

HyperCodec commented May 11, 2024

I have the same problem when I use the lib under docker bookworm with rust 1.78 but the problem doesn't appear on MacOS.

While waiting for the patch, I've found an alternative which consists in using the SVGBackend and not the BitmapBackend. Apparently the bug is linked specifically to BitMapBackend.

After all, SVG renderings are of better quality.

This should allow development once again.

@HyperCodec
Copy link
Owner Author

Commencing development now that I have my codespace usage reset

@HyperCodec
Copy link
Owner Author

Hangs during training phase, I don't think it used to do that before the change. Not exactly sure how this happened but probably has something to do with the mutex.

@HyperCodec
Copy link
Owner Author

When I run with LLDB, it finished training pretty much instantly and then I get the following:

thread 'main' panicked at examples/plot.rs:103:59:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/panicking.rs:141:5
   3: core::option::unwrap_failed
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/option.rs:1984:5
   4: core::option::Option<T>::unwrap
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/option.rs:932:21
Training...
Training complete, collecting data and building chart...
thread 'main' panicked at examples/plot.rs:103:59:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/panicking.rs:141:5
   3: core::option::unwrap_failed
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/option.rs:1984:5
   4: core::option::Option<T>::unwrap
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/option.rs:932:21
   5: plot::main
             at ./examples/plot.rs:103:24
   6: core::ops::function::FnOnce::call_once
             at /rustc/0d8b3346a3992ab11ea35ff0fb95a6864b91f797/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@HyperCodec
Copy link
Owner Author

HyperCodec commented May 15, 2024

This example technically works now, but it still doesn't learn. Will also probably need to check the other examples to make sure they are also learning.

@HyperCodec
Copy link
Owner Author

I think I'll just make a separate issue and pull request that patches the learning of all these examples, as I think this might become a pretty long process.

@HyperCodec
Copy link
Owner Author

temporary disabled branch detection ruleset, not sure why it decided to stop working recently. there is absolutely a successful testing deployment.

@HyperCodec HyperCodec merged commit ca58022 into dev May 15, 2024
3 checks passed
@HyperCodec HyperCodec deleted the plotters-example branch May 15, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant