Skip to content

plotters example - #50

Merged
HyperCodec merged 11 commits into
devfrom
plotters-example
May 15, 2024
Merged

plotters example#50
HyperCodec merged 11 commits into
devfrom
plotters-example

Conversation

@HyperCodec

Copy link
Copy Markdown
Owner

No description provided.

@HyperCodecHyperCodec self-assigned this Apr 16, 2024
@HyperCodecHyperCodec added the enhancement New feature or request label Apr 16, 2024 — with GitHub Codespaces

@HyperCodecHyperCodec left a comment

Copy link
Copy Markdown
OwnerAuthor

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

HyperCodec commented Apr 16, 2024

Copy link
Copy Markdown
OwnerAuthor

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
Copy Markdown
OwnerAuthor

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

@HyperCodec

HyperCodec commented May 11, 2024

Copy link
Copy Markdown
OwnerAuthor

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
Copy Markdown
OwnerAuthor

Commencing development now that I have my codespace usage reset

@HyperCodec

Copy link
Copy Markdown
OwnerAuthor

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
Copy Markdown
OwnerAuthor

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

HyperCodec commented May 15, 2024

Copy link
Copy Markdown
OwnerAuthor

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
Copy Markdown
OwnerAuthor

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
Copy Markdown
OwnerAuthor

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 devMay 15, 2024
@HyperCodec
HyperCodec deleted the plotters-example branch May 15, 2024 13:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@HyperCodec