criteo / tf-yarn

Train TensorFlow models on YARN in just a few lines of code!
Apache License 2.0
86 stars 28 forks source link

Ensure ExperimentFn is executable before submitting #11

Closed superbobry closed 4 years ago

superbobry commented 6 years ago

This is a simple UX improvement which would allow for early error detection. The idea is to check if the experiment_fn passed to run_on_yarn can be executed in the configured environment by calling

$ path/to/env/bin/python -c "load_fn(...)()"

on the edge node prior to submitting.

jdlesage commented 5 years ago

Currently the main source of failures is serialization. I suggest to limit the validation on serialization first.

In order to have E2E tests, we also continue the work on mocking the skein cluster. Could be another solution to test experiment function.

superbobry commented 5 years ago

Currently the main source of failures is serialization.

Could you elaborate on that please? Which failures you are referring to?

jdlesage commented 5 years ago

dill (or cloud-pickle) serializes everything that is needed by the python function. For non-trivial functions, it brings problems. Here 2 examples we met:

In tf-yarn, I would like to specify to the pickler which objects are provided remotely (logger, configuration, python packages, etc.) on the executor and limit the serialization.

There is another solution we are investigating to solve this problem. Tensorflow python functions generate gRPC communication using protobuf scheme. These functions solve the serialization problem. So the solution will be to only instantiate tensorflow training servers then execute the ExperimentFn function on the driver. That's the idea behind this new example: https://github.com/criteo/tf-yarn/blob/master/examples/distributed.py

jdlesage commented 5 years ago

Created a ticket about the serialization test: https://github.com/criteo/tf-yarn/issues/32