cc-hpc-itwm / tarantella Goto Github PK
View Code? Open in Web Editor NEWAn Open-Source Distributed Deep Learning Framework
License: GNU General Public License v3.0
An Open-Source Distributed Deep Learning Framework
License: GNU General Public License v3.0
I am installing Tarantella following instruction. After running the command conda create -n tarantella
. I have the following output:
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 22.9.0
latest version: 23.3.1
Please update conda by running
$ conda update -n base -c conda-forge conda
## Package Plan ##
environment location: /opt/conda/envs/tarantella
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate tarantella
#
# To deactivate an active environment, use
#
# $ conda deactivate
Retrieving notices: ...working... done
Then I run the command
conda activate tarantella
then get the output:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
What do I need to do to be able to use conda active
?
Thank you for your amazing work on accelerating distributed DL training. It seems that your work is similar to horovod. I wonder if you could provide any benchmarks on the comparison between tarantella and horovod? Also, it would be great if you could share any technical advantages of tarantella over horovod. Thank you!
Tarantella Version: 0.8.0
When using Tarantella with a model that has multiple inputs the following error occurs:
Traceback (most recent call last):
File "foo.py", line 30, in <module>
model.fit(Xy)
File "/usr/local/tarantella/lib/tarantella/python/tarantella/keras/model.py", line 191, in fit
self._setup_for_execution('fit', x, y, kwargs)
File "/usr/local/tarantella/lib/tarantella/python/tarantella/keras/model.py", line 376, in _setup_for_execution
self._set_input_shapes(x)
File "/usr/local/tarantella/lib/tarantella/python/tarantella/keras/model.py", line 408, in _set_input_shapes
self.input_shapes = [elem_spec.shape for elem_spec in dataset.element_spec[0]]
File "/usr/local/tarantella/lib/tarantella/python/tarantella/keras/model.py", line 408, in <listcomp>
self.input_shapes = [elem_spec.shape for elem_spec in dataset.element_spec[0]]
AttributeError: 'str' object has no attribute 'shape'
import tarantella as tnt
import tensorflow as tf
from tensorflow.keras import Input, Model, layers
def build_model():
input1 = Input(shape=(10,), name='input_1')
input2 = Input(shape=(5,), name='input_2')
embedding = layers.Embedding(1000, 10, input_length=10)(input1)
flatten = layers.Flatten()(embedding)
concat = layers.Concatenate(axis=1)([flatten, input2])
out = layers.Dense(1)(concat)
return Model(inputs=[input1, input2], outputs=out)
def make_dummy_data():
X1 = tf.data.Dataset.from_tensor_slices(tf.random.uniform([100, 10]))
X2 = tf.data.Dataset.from_tensor_slices(tf.random.uniform([100, 5]))
X = tf.data.Dataset.zip((X1, X2)).map(lambda x1, x2: {'input_1': x1, 'input_2': x2})
y = tf.data.Dataset.from_tensor_slices(tf.random.uniform([100, 1]))
return tf.data.Dataset.zip((X, y)).batch(32)
if __name__ == '__main__':
model = build_model()
model = tnt.Model(model)
model.compile(loss='mse')
model.summary()
Xy = make_dummy_data()
model.fit(Xy)
This script was called with tarantella --no-gpu -- script.py
.
The problem seems to be the dictionary that is used in the dataset. To fix this a check could be implemented to see wether the given dataset element is a dictionary.
def _set_input_shapes(self, dataset):
if isinstance(dataset.element_spec, tf.TensorSpec):
self.input_shapes = dataset.element_spec.shape
elif isinstance(dataset.element_spec[0], tf.TensorSpec): # (input, outputs)
self.input_shapes = dataset.element_spec[0].shape
else: # ((input0, ..., input_n), outputs)
if isinstance(dataset.element_spec[0], dict):
self.input_shapes = [elem_spec.shape for elem_spec in dataset.element_spec[0].values()]
else:
self.input_shapes = [elem_spec.shape for elem_spec in dataset.element_spec[0]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.