Skip to content

Commit

Permalink
Fix typos in the documentation strings of the tfjs-core directory (#8413
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gaikwadrahul8 authored Oct 10, 2024
1 parent 8206e95 commit 8d594e3
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions tfjs-core/scripts/cloud_funcs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This directory contains the following Google Cloud Functions.

### `trigger_nightly`
Programatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler at 3am EST every day (configurable via the Cloud Scheduler UI).
Programmatically triggers a Cloud Build on master. This function is called by the Cloud Scheduler at 3am EST every day (configurable via the Cloud Scheduler UI).
You can also trigger the function manually via the Cloud UI.

Command to re-deploy:
Expand Down Expand Up @@ -45,6 +45,6 @@ gcloud functions deploy sync_reactnative \
The pipeline looks like this:

1) At 3am, Cloud Scheduler writes to `nightly` topic
2) That triggers the `nightly` function, which starts a build programatically
2) That triggers the `nightly` function, which starts a build programmatically
3) That build runs and writes its status to `cloud-builds` topic
4) That triggers the `send_email` function, which sends email and chat with the build status.
2 changes: 1 addition & 1 deletion tfjs-core/src/backends/complex_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function complexWithEvenIndex(complex: Float32Array):
}

/**
* Extracts odd indexed comple values in the given array.
* Extracts odd indexed complete values in the given array.
* @param complex The complex tensor values
*/
export function complexWithOddIndex(complex: Float32Array):
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/backends/einsum_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function checkEinsumDimSizes(
*
* @param summedDims indices to the dimensions being summed over.
* @param idDims A look up table for the dimensions present in each input
* tensor. Each consituent array contains indices for the dimensions in the
* tensor.Each constituent array contains indices for the dimensions in the
* corresponding input tensor.
*
* @return A map with two fields:
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/backends/non_max_suppression_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function intersectionOverUnion(boxes: TypedArray, i: number, j: number) {

// A Gaussian penalty function, this method always returns values in [0, 1].
// The weight is a function of similarity, the more overlap two boxes are, the
// smaller the weight is, meaning highly overlapping boxe will be significantly
// smaller the weight is,meaning highly overlapping boxes will be significantly
// penalized. On the other hand, a non-overlapping box will not be penalized.
function suppressWeight(iouThreshold: number, scale: number, iou: number) {
const weight = Math.exp(scale * iou * iou);
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class Engine implements TensorTracker, DataMover {
/**
* Initializes a backend by looking up the backend name in the factory
* registry and calling the factory method. Returns a boolean representing
* whether the initialization of the backend suceeded. Throws an error if
* whether the initialization of the backend succeeded. Throws an error if
* there is no backend in the factory registry.
*/
private initializeBackend(backendName: string):
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/engine_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describe('Backend registration', () => {
throw new Error('failed to create async2');
}, 101 /* priority */);

// Await for the library to find the best backend that succesfully
// Await for the library to find the best backend that successfully
// initializes.
await tf.ready();
expect(tf.backend()).toEqual(testBackend);
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/browser_files_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describeWithFlags('browserDownloads', BROWSER_ENVS, () => {
// Verify that the default file names are used.
expect(jsonAnchor.download).toEqual('model.json');
expect(jsonAnchor.clicked).toEqual(1);
// The weight file should not have been downoaded.
// The weight file should not have been downloaded.
expect(weightDataAnchor.download).toEqual(undefined);
expect(weightDataAnchor.clicked).toEqual(0);

Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/composite_array_buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class CompositeArrayBuffer {
start = end;
}

// Set the byteLenghth
// Set the byteLength
if (this.shards.length === 0) {
this.byteLength = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ IORouterRegistry.registerLoadRouter(httpRouter);
* The following GitHub Gist
* https://gist.github.com/dsmilkov/1b6046fd6132d7408d5257b0976f7864
* implements a server based on [flask](https://github.com/pallets/flask) that
* can receive the request. Upon receiving the model artifacts via the requst,
* can receive the request. Upon receiving the model artifacts via the request,
* this particular server reconstitutes instances of [Keras
* Models](https://keras.io/models/model/) in memory.
*
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/io/indexed_db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ IORouterRegistry.registerLoadRouter(indexedDBRouter);
*
* @param modelPath A unique identifier for the model to be saved. Must be a
* non-empty string.
* @returns An instance of `BrowserIndexedDB` (sublcass of `IOHandler`),
* @returns An instance of `BrowserIndexedDB` (subclass of `IOHandler`),
* which can be used with, e.g., `tf.Model.save`.
*/
export function browserIndexedDB(modelPath: string): IOHandler {
Expand Down
4 changes: 2 additions & 2 deletions tfjs-core/src/jasmine_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface TestFilter {
* Tests that have the substrings specified by the include or startsWith
* will be included in the test run, unless one of the substrings specified
* by `excludes` appears in the name.
* @param customInclude Function to programatically include a test.
* @param customInclude Function to programmatically include a test.
* If this function returns true, a test will immediately run. Otherwise,
* `testFilters` is used for fine-grained filtering.
*
Expand All @@ -124,7 +124,7 @@ export function setupTestFilters(
* Filter method that returns boolean, if a given test should run or be
* ignored based on its name. The exclude list has priority over the
* include list. Thus, if a test matches both the exclude and the include
* list, it will be exluded.
* list, it will be excluded.
*/
// tslint:disable-next-line: no-any
const specFilter = (spec: any) => {
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/depthwise_conv2d_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ describeWithFlags('depthwiseConv2d gradients', ALL_ENVS, () => {
[[[1, 1], [1, 1], [0, 0]], [[0, 1], [1, 1], [1, 1]]],
[[[1, 0], [1, 1], [0, 0]], [[0, 1], [1, 0], [0, 0]]]
]);
// result of convolution operatoin
// result of convolution operation
result = tf.tensor4d([
[
[[2, 8, 8, 7, 2, 2], [6, 3, 1, 1, 0, 0]],
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/ops/ragged_tensor_to_tensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import {op} from './operation';
* "ROW_SPLITS": the row_splits tensor from the ragged tensor.
* "VALUE_ROWIDS": the value_rowids tensor from the ragged tensor.
* "FIRST_DIM_SIZE": if value_rowids is used for the first dimension, then
* it is preceeded by "FIRST_DIM_SIZE". The tensors are in the order of
* it is preceded by "FIRST_DIM_SIZE". The tensors are in the order of
* the dimensions.
* @return A Tensor. Has the same type as values.
* @doc {heading: 'Operations', subheading: 'Ragged'}
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class SerializationMap {
*
* @param cls The class to be registered. It must have a public static member
* called `className` defined and the value must be a non-empty string.
* @param pkg The pakcage name that this class belongs to. This used to define
* @param pkg The package name that this class belongs to. This used to define
* the key in GlobalCustomObject. If not defined, it defaults to `Custom`.
* @param name The name that user specified. It defaults to the actual name of
* the class as specified by its static `className` property.
Expand Down
2 changes: 1 addition & 1 deletion tfjs-core/src/tensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ Object.defineProperty(Tensor, Symbol.hasInstance, {

export function getGlobalTensorClass() {
// Use getGlobal so that we can augment the Tensor class across package
// boundaries becase the node resolution alg may result in different modules
// boundaries because the node resolution alg may result in different modules
// being returned for this file depending on the path they are loaded from.
return getGlobal('Tensor', () => {
return Tensor;
Expand Down

0 comments on commit 8d594e3

Please sign in to comment.