Alien-XGBoost

 view release on metacpan or  search on metacpan

xgboost/dmlc-core/doc/Doxyfile  view on Meta::CPAN


INHERIT_DOCS           = YES

# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
# a new page for each member. If set to NO, the documentation of a member will
# be part of the file/class/namespace that contains it.

SEPARATE_MEMBER_PAGES  = NO

# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.

TAB_SIZE               = 8

# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
# put the command \sideeffect (or @sideeffect) in the documentation, which
# will result in a user-defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.

xgboost/dmlc-core/doc/Doxyfile  view on Meta::CPAN


# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test

EXCLUDE_SYMBOLS        =

# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).

EXAMPLE_PATH           =

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.

EXAMPLE_PATTERNS       =

xgboost/dmlc-core/doc/Doxyfile  view on Meta::CPAN


SOURCE_BROWSER         = NO

# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.

INLINE_SOURCES         = NO

# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.

STRIP_CODE_COMMENTS    = YES

# If the REFERENCED_BY_RELATION tag is set to YES
# then for each documented function all documented
# functions referencing it will be listed.

REFERENCED_BY_RELATION = NO

# If the REFERENCES_RELATION tag is set to YES

xgboost/doc/Doxyfile  view on Meta::CPAN

INHERIT_DOCS           = YES

# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
# new page for each member. If set to NO, the documentation of a member will be
# part of the file/class/namespace that contains it.
# The default value is: NO.

SEPARATE_MEMBER_PAGES  = NO

# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
# uses this value to replace tabs by spaces in code fragments.
# Minimum value: 1, maximum value: 16, default value: 4.

TAB_SIZE               = 8

# This tag can be used to specify a number of aliases that act as commands in
# the documentation. An alias has the form:
# name=value
# For example adding
# "sideeffect=@par Side Effects:\n"
# will allow you to put the command \sideeffect (or @sideeffect) in the

xgboost/doc/Doxyfile  view on Meta::CPAN

# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# AClass::ANamespace, ANamespace::*Test
#
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*

EXCLUDE_SYMBOLS        =

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
# command).

EXAMPLE_PATH           =

# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
# *.h) to filter out the source-files in the directories. If left blank all
# files are included.

EXAMPLE_PATTERNS       =

xgboost/doc/Doxyfile  view on Meta::CPAN


SOURCE_BROWSER         = NO

# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
# The default value is: NO.

INLINE_SOURCES         = NO

# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
# special comment blocks from generated source code fragments. Normal C, C++ and
# Fortran comments will always remain visible.
# The default value is: YES.

STRIP_CODE_COMMENTS    = YES

# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
# function all documented functions referencing it will be listed.
# The default value is: NO.

REFERENCED_BY_RELATION = NO

xgboost/jvm-packages/xgboost4j/src/main/scala/ml/dmlc/xgboost4j/scala/rabit/handler/RabitWorkerHandler.scala  view on Meta::CPAN

import akka.actor._
import akka.util.ByteString
import ml.dmlc.xgboost4j.scala.rabit.util.{AssignedRank, RabitTrackerHelpers}

import scala.concurrent.{Await, Future}
import scala.concurrent.duration._
import scala.util.Try

/**
  * Actor to handle socket communication from worker node.
  * To handle fragmentation in received data, this class acts like a FSM
  * (finite-state machine) to keep track of the internal states.
  *
  * @param host IP address of the remote worker
  * @param worldSize number of total workers
  * @param tracker the RabitTrackerHandler actor reference
  */
private[scala] class RabitWorkerHandler(host: String, worldSize: Int, tracker: ActorRef,
                                        connection: ActorRef)
  extends FSM[RabitWorkerHandler.State, RabitWorkerHandler.DataStruct]
    with ActorLogging with Stash {

xgboost/jvm-packages/xgboost4j/src/test/scala/ml/dmlc/xgboost4j/scala/rabit/RabitTrackerConnectionHandlerTest.scala  view on Meta::CPAN


    // send mock magic number
    fsm ! Tcp.Received(magic)
    connProbe.expectMsg(Tcp.Write(magic))

    fsm.stateName shouldEqual RabitWorkerHandler.AwaitingCommand
    fsm.stateData shouldEqual RabitWorkerHandler.StructTrackerCommand
    // ResumeReading should be seen once state transitions
    connProbe.expectMsg(Tcp.ResumeReading)

    // send mock tracker command in fragments: the handler should be able to handle it.
    val bufRank = ByteBuffer.allocate(8).order(ByteOrder.nativeOrder())
    bufRank.putInt(0).putInt(worldSize).flip()

    val bufJobId = ByteBuffer.allocate(5).order(ByteOrder.nativeOrder())
    bufJobId.putInt(1).put(Array[Byte]('0')).flip()

    val bufCmd = ByteBuffer.allocate(9).order(ByteOrder.nativeOrder())
    bufCmd.putInt(5).put("start".getBytes()).flip()

    fsm ! Tcp.Received(ByteString.fromByteBuffer(bufRank))
    fsm ! Tcp.Received(ByteString.fromByteBuffer(bufJobId))

    // the state should not change for incomplete command data.
    fsm.stateName shouldEqual RabitWorkerHandler.AwaitingCommand

    // send the last fragment, and expect message at tracker actor.
    fsm ! Tcp.Received(ByteString.fromByteBuffer(bufCmd))
    trackerProbe.expectMsg(WorkerStart(0, worldSize, "0"))

    val linkMap = new LinkMap(worldSize)
    val assignedRank = linkMap.assignRank(0)
    trackerProbe.reply(assignedRank)

    connProbe.expectMsg(Tcp.Write(ByteString.fromByteBuffer(
      assignedRank.toByteBuffer(worldSize)
    )))

xgboost/jvm-packages/xgboost4j/src/test/scala/ml/dmlc/xgboost4j/scala/rabit/RabitTrackerConnectionHandlerTest.scala  view on Meta::CPAN

    fsm.stateData shouldEqual RabitWorkerHandler.StructTrackerCommand
    // ResumeReading should be seen once state transitions
    connProbe.expectMsg(Tcp.ResumeReading)

    val printCmd = WorkerTrackerPrint(0, 4, "print", "hello world!")
    fsm ! Tcp.Received(printCmd.encode)

    trackerProbe.expectMsg(printCmd)
  }

  it should "handle fragmented print command without throwing exception" in {
    val trackerProbe = TestProbe()
    val connProbe = TestProbe()

    val fsm = TestFSMRef(new RabitWorkerHandler("localhost", 4,
      trackerProbe.ref, connProbe.ref))
    fsm.stateName shouldEqual RabitWorkerHandler.AwaitingHandshake

    fsm ! Tcp.Received(magic)
    connProbe.expectMsg(Tcp.Write(magic))

    fsm.stateName shouldEqual RabitWorkerHandler.AwaitingCommand
    fsm.stateData shouldEqual RabitWorkerHandler.StructTrackerCommand
    // ResumeReading should be seen once state transitions
    connProbe.expectMsg(Tcp.ResumeReading)

    val printCmd = WorkerTrackerPrint(0, 4, "0", "fragmented!")
    // 4 (rank: Int) + 4 (worldSize: Int) + (4+1) (jobId: String) + (4+5) (command: String) = 22
    val (partialMessage, remainder) = printCmd.encode.splitAt(22)

    // make sure that the partialMessage in itself is a valid command
    val partialMsgBuf = ByteBuffer.allocate(22).order(ByteOrder.nativeOrder())
    partialMsgBuf.put(partialMessage.asByteBuffer)
    RabitWorkerHandler.StructTrackerCommand.verify(partialMsgBuf) shouldBe true

    fsm ! Tcp.Received(partialMessage)
    fsm ! Tcp.Received(remainder)

xgboost/jvm-packages/xgboost4j/src/test/scala/ml/dmlc/xgboost4j/scala/rabit/RabitTrackerConnectionHandlerTest.scala  view on Meta::CPAN


    // send mock magic number
    fsm ! Tcp.Received(magic)
    connProbe.expectMsg(Tcp.Write(magic))

    fsm.stateName shouldEqual RabitWorkerHandler.AwaitingCommand
    fsm.stateData shouldEqual RabitWorkerHandler.StructTrackerCommand
    // ResumeReading should be seen once state transitions
    connProbe.expectMsg(Tcp.ResumeReading)

    // send mock tracker command in fragments: the handler should be able to handle it.
    val bufCmd = ByteBuffer.allocate(26).order(ByteOrder.nativeOrder())
    bufCmd.putInt(0).putInt(worldSize).putInt(1).put(Array[Byte]('0'))
      .putInt(5).put("start".getBytes())
      // spilled-over data
      .putInt(0).flip()

    // send data with 4 extra bytes corresponding to the next state.
    fsm ! Tcp.Received(ByteString.fromByteBuffer(bufCmd))

    trackerProbe.expectMsg(WorkerStart(0, worldSize, "0"))



( run in 0.720 second using v1.01-cache-2.11-cpan-b16cb0d3907 )