Skip to content

Commit

Permalink
Some small fix for documentation. (VertaAI#954)
Browse files Browse the repository at this point in the history
* Some doc fix.

* More fix.

* Fix new branch doc.
  • Loading branch information
nhatsmrt authored Jul 9, 2020
1 parent 71a2a11 commit 43a8855
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import scala.collection.mutable.HashMap
import scala.util.{Failure, Success, Try}
import scala.concurrent.ExecutionContext

/** Base class for dataset versioning */
trait Dataset extends Blob {
protected val contents: HashMap[String, FileMetadata] // for deduplication and comparing
val enableMDBVersioning: Boolean // whether to version the blob with ModelDB
Expand All @@ -22,7 +23,7 @@ trait Dataset extends Blob {
private[verta] var downloadFunction: Option[(String, String, File) => Try[Unit]] = None
private[verta] var blobPath: Option[String] = None // path to the blob in the commit

/** Downloads componentPath from this dataset if ModelDB-managed versioning was enabled
/** Downloads componentPath from this dataset if ModelDB-managed versioning was enabled.
* Currently, only support downloading to a specific path
* @param componentPath Original path of the file or directory in this dataset to download
* @param downloadToPath Path to download to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import scala.collection.mutable.HashMap
import scala.util.{Failure, Success, Try}
import scala.annotation.tailrec

/** Captures metadata about files
/** Captures metadata about files.
* To create a new instance, use the constructor taking a list of paths (each is a string) or a single path:
* {{{
* val pathList = List("some-path1", "some-path2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import scala.annotation.tailrec

import java.io.{File, FileOutputStream}

/** Captures metadata about S3 objects
/** Captures metadata about S3 objects.
* Please set up AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables before use.
* To create a new instance, use the constructor taking a list of S3 Locations or a single location
* {{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import java.net.{URL, URI}

import scala.util.{Try, Success, Failure}

/** A location in S3
/** A location in S3.
* To initialize, pass in an S3 path and (optionally) a version ID:
* {{{
* val S3Location: Try[S3Location] = S3Location("some-path-1")
* }}}
*/
class S3Location(
val bucketName: String,
val key: Option[String] = None,
val key: Option[String] = None,
val versionID: Option[String] = None
) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ExperimentRun(val clientSet: ClientSet, val expt: Experiment, val run: Mod
)).map(_ => {})
}

/** Logs a metric to this Experiment Run
/** Logs a metric to this Experiment Run.
* If the metadatum of interest might recur, logObservation() should be used instead
* @param key Name of the metric
* @param value Value of the metric
Expand Down
14 changes: 7 additions & 7 deletions client/scala/src/main/scala/ai/verta/repository/Commit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import scala.concurrent.duration.Duration
import java.io.{File, FileInputStream, FileOutputStream, ByteArrayInputStream}
import java.nio.file.{Files, StandardCopyOption}

/** Commit within a ModelDB Repository
/** Commit within a ModelDB Repository.
* There should not be a need to instantiate this class directly; please use Repository.getCommit methods
*/
class Commit(
Expand Down Expand Up @@ -57,7 +57,7 @@ class Commit(
}
)

/** Adds blob to this commit at path
/** Adds blob to this commit at path.
* If path is already in this Commit, it will be updated to the new blob
* @param path Location to add blob to
* @param blob Instance of Blob subclass.
Expand Down Expand Up @@ -243,7 +243,7 @@ class Commit(
}


/** Creates a branch at this Commit and returns the checked-out branch
/** Creates a branch at this Commit and returns the checked-out branch.
* If the branch already exists, it will be moved to this commit.
* @param branch branch name
* @return if not saved, a failure; otherwise, this commit as the head of `branch`
Expand Down Expand Up @@ -271,7 +271,7 @@ class Commit(
).map(_ => ())
}

/** Merges a branch headed by other into this commit
/** Merges a branch headed by other into this commit.
* This method creates and returns a new Commit in ModelDB, and assigns a new ID to this object
* @param other Commit to be merged
* @param message Description of the merge. If not provided, a default message will be used
Expand Down Expand Up @@ -302,7 +302,7 @@ class Commit(
)
}

/** Helper function to convert the versioning commit instance to commit instance
/** Helper function to convert the versioning commit instance to commit instance.
* If the current instance has a branch associated with it, the new commit will become the head of the branch.
* Useful for createCommit, merge, and revert
* @param versioningCommit the versioning commit instance
Expand Down Expand Up @@ -341,7 +341,7 @@ class Commit(
}

/** Reverts other.
* This method creates and returns a new Commit in ModelDB, and assigns a new ID to this object
* This method creates and returns a new Commit in ModelDB, and assigns a new ID to this object.
* Currently reverting a merge commit is not supported. Unexpected behavior might occur.
* @param other Base for the revert. If not provided, this commit will be reverted
* @param message Description of the revert. If not provided, a default message will be used
Expand Down Expand Up @@ -401,7 +401,7 @@ class Commit(
* @param message error message if this commit is not saved
* @return Failure if the commit is not saved. Success otherwise
*/
def checkSaved(message: String): Try[Unit] = {
private[verta] def checkSaved(message: String): Try[Unit] = {
if (!saved)
Failure(new IllegalCommitSavedStateException(message))
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ai.verta.swagger._public.modeldb.versioning.model.VersioningRepository
import scala.concurrent.ExecutionContext
import scala.util.{Failure, Success, Try}

/** ModelDB Repository
/** ModelDB Repository.
* There should not be a need to instantiate this class directly; please use Client's getOrCreateRepository
*/
class Repository(private val clientSet: ClientSet, private val repo: VersioningRepository) {
Expand Down

0 comments on commit 43a8855

Please sign in to comment.