question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tensorflow + metaflow = Can't pickle datasets/models

See original GitHub issue

I’m trying to put some word embeddings exercise into metaflow to avoid running training or downloading/transforming the datasets every time I run the scripts

Specifically:

2020-02-16 13:04:40.669 [1581858157185440/get_dataset_batches/2 (pid 21)] tensorflow.python.framework.errors_impl.InternalError: Tensorflow type 21 not convertible to numpy dtype

Metaflow’s checkpointing is the perfect answer for this instead of me manually coding all the saving/loading logic

However I can’t seem to checkpoint a lot of common tensorflow steps with metaflow, I’m aware you use tensorflow internally, I assume together with metaflow, do you have any solution for this kind of problems?

I’ve produced a repository where the whole issue is documented and reproducible in a dockerised manner, you can check it out here

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sandman21dancommented, Feb 16, 2020

Is this something like tempfile.SpooledTemporaryFile or is there a Metaflow method/util to go from file into the self scope of a step?

0reactions
savingoyalcommented, Mar 4, 2020

@sandman21dan Please reopen this issue if you have more to add.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Metaflow/community - metaflow_org/community - Gitter
I'm trying to use metaflow to train a tensorflow model called UniRep on aws. I'm thinking the easiest method is to pack it...
Read more >
Python Beam can't pickle/dill a large Tensorflow Model
Yes -- storing the model as a field on the DoFn requires it to be serialized in order to get that code onto...
Read more >
Use Keras with Metaflow - Outerbounds
Since Keras models are not serializable with Pickle and Metaflow uses Pickle to serialize artifacts, ... Load the model and evaluate it on...
Read more >
SAP AI Core
Metaflow Python Library for SAP AI Core. ... Artifacts (such as datasets, models) are copied to and from the hyperscaler storage.
Read more >
Metaflow, Netflix's Python framework for data science, is now ...
Airflow ships with a pretty rich UI. Metaflow seems to be anti-UI, and provides a novel Notebook-oriented workflow interaction model. Metaflow ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found