Giter Club home page Giter Club logo

tarantella's People

Contributors

alexa-ca avatar vivek2301 avatar vivek777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tarantella's Issues

Shell has not been properly configured to use 'conda activate'

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?

Any comparison with horovod?

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!

Error when using model with multiple inputs

Error

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'

Code to reproduce

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.

Possible fix

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]]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.