src/ray/raylet/lib/python/common_extension.cc
PyObject *PyTask_from_string(PyObject *self, PyObject *args) {
  const char *data;
  int size;
  if (!PyArg_ParseTuple(args, "s#", &data, &size)) {
    return NULL;
  }
  PyTask *result = PyObject_New(PyTask, &PyTaskType);
  result = (PyTask *)PyObject_Init((PyObject *)result, &PyTaskType);
  result->task_spec = new ray::raylet::TaskSpecification(std::string(data, size));
  /* The created task does not include any execution dependencies. */
  result->execution_dependencies = new std::vector<ObjectID>();
  /* TODO(pcm): Use flatbuffers validation here. */
  return (PyObject *)result;
}
/**
 * Convert a string to a Ray task specification Python object.
 *
 * This is called from Python like
 *
 * task = raylet.task_from_string("...")
 *
 * @param task_string String representation of the task specification.
 * @return Python task specification object.
 */
Convert a string to a Ray task specification Python object.
This is called from Python like



@param task_string String representation of the task specification.
@return Python task specification object.
Convert a string to a Ray task specification Python object . This is called from Python like @param task_string String representation of the task specification . @return Python task specification object .
PyObject *PyTask_from_string(PyObject *self, PyObject *args) {
  const char *data;
  int size;
  if (!PyArg_ParseTuple(args, "s#", &data, &size)) {
    return NULL;
  }
  PyTask *result = PyObject_New(PyTask, &PyTaskType);
  result = (PyTask *)PyObject_Init((PyObject *)result, &PyTaskType);
  result->task_spec = new ray::raylet::TaskSpecification(std::string(data, size));
  result->execution_dependencies = new std::vector<ObjectID>();
  return (PyObject *)result;
}
PyObject * PyTask_from_string ( PyObject * self , PyObject * args ) { const char * data ; int size ; if ( ! PyArg_ParseTuple ( args , " " , & data , & size ) ) { return NULL ; } PyTask * result = PyObject_New ( PyTask , & PyTaskType ) ; result = ( PyTask * ) PyObject_Init ( ( PyObject * ) result , & PyTaskType ) ; result -> task_spec = new ray :: raylet :: TaskSpecification ( std :: string ( data , size ) ) ; result -> execution_dependencies = new std :: vector < ObjectID > ( ) ; return ( PyObject * ) result ; }
Convert a string to a Ray task specification Python object.
Convert a string to a Ray task specification Python object .
/* The created task does not include any execution dependencies. */ /* TODO(pcm): Use flatbuffers validation here. */