Skip to content

Commit dbea7de

Browse files
Docs Writer edit (#20)
* Improve file metadescriptions * Overview doc: Start copyedit * Sentence case headings for more modern feel * More capitalization changes, minor copyedits * Simplify Overview page structure * Install: Copyedit and formatting improvements * Copyedit "your first pipeline" * Core concepts: Dramatically simplify structure * Copyedit app studio doc * Simplify and copyedit components, pipelines persistence * Copyedit Hugging Face doc * Fix typo Co-authored-by: Camiel vs <[email protected]> --------- Co-authored-by: Camiel vs <[email protected]>
1 parent f3e7d08 commit dbea7de

20 files changed

+533
-805
lines changed
Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: adding-components
33
title: Adding Components to Pipelines
4-
description: How to add components to your pipeline workspace
4+
description: Discover methods to add components to TangleML pipelines including file upload, URL import, drag-and-drop, and the standard library.
55
---
66

77
import { ImageAnnotation } from "@site/src/components/ImageAnnotation";
@@ -11,15 +11,10 @@ import { ImageAnnotation } from "@site/src/components/ImageAnnotation";
1111
Components are the building blocks of your ML pipelines in TangleML. This guide covers the different methods to add components to your pipeline workspace.
1212

1313

14-
### 1. Upload Component File
14+
### Upload component file
1515

1616
Upload a YAML component file directly from your computer to add it to your user components library.
1717

18-
:::tip
19-
Uploaded components are immediately available in your User Components library and can be reused across different pipelines.
20-
:::
21-
22-
2318
<ImageAnnotation src={require("./assets/AddingComponents_File.png").default} alt="Import from URL screenshot">
2419

2520
1. Click on the **File** option in the component panel
@@ -29,81 +24,71 @@ Uploaded components are immediately available in your User Components library an
2924
</ImageAnnotation>
3025

3126

32-
### 2. Import from URL
27+
### Import from URL
3328

34-
Import components from publicly accessible URLs, particularly useful for GitHub-hosted components.
35-
36-
:::tip
37-
This method works great with raw GitHub URLs, allowing you to import components directly from repositories.
38-
:::
29+
Import components from publicly accessible URLs.
3930

4031
<ImageAnnotation src={require("./assets/AddingComponents_URL.png").default} alt="Import from URL screenshot">
4132

4233

43-
1. Select the **URL** option
44-
2. Enter the publicly accessible URL to the YAML file
45-
3. The browser will automatically download and validate the component
46-
4. If valid, it will be added to your User Components library
34+
1. Select the **URL** option.
35+
2. Enter the publicly accessible URL to the YAML file.
36+
3. The browser will automatically download and validate the component.
37+
4. If valid, it will be added to your user components library.
4738

4839
</ImageAnnotation>
4940

41+
:::tip
42+
This method works great with raw GitHub URLs, allowing you to import components directly from repositories.
43+
:::
5044

45+
### In-app component editor
5146

52-
### 3. In-App Component Editor
53-
54-
Create and edit components directly in your browser using the built-in editor.
55-
56-
:::info
57-
Learn more about the [In-App Component Editor](/docs/component-development/in-app-editor).
58-
:::
47+
Create and edit Components directly in your browser using the [In-App Component Editor](/docs/component-development/in-app-editor):
5948

6049
<ImageAnnotation src={require("./assets/AddingComponents_New.png").default} alt="In-App Component Editor screenshot">
6150

62-
1. Click on the **New** button in the "Add component" dialog
51+
1. Click on the **New** button in the **Add component** dialog
6352
2. Select the component template you want to use
6453
3. The editor will open and you can start editing the component
65-
4. Once you're done, click the **Save** button to save the component. The component will be added to your User Components library.
54+
4. Once you're done, click the **Save** button to save the component. The component will be added to your user components library.
6655

6756
</ImageAnnotation>
6857

6958

7059

71-
### 4. Drag and Drop YAML Files
60+
### Drag and drop YAML files
7261

7362
Simply drag a YAML component file from your file system and drop it directly onto the canvas.
7463

7564
<video src={require("./assets/AddingComponents_Drop.mov").default} autoPlay loop muted playsInline style={{ width: "100%" }}>
7665
Your browser does not support the video tag.
7766
</video>
7867

79-
### 5. Import from Other Pipelines
68+
### Import from other pipelines
8069

81-
Reuse components from your existing pipelines by importing them into your User Components library.
70+
Reuse components from your existing pipelines by importing them into your user components library.
8271

8372
<video src={require("./assets/AddingComponents_AddFromPipeline.mov").default} autoPlay loop muted playsInline style={{ width: "100%" }}>
8473
Your browser does not support the video tag.
8574
</video>
8675

87-
### 6. Using Standard Library Components
76+
### Using standard library components
8877

89-
Access components from the Standard Library for tasks shared within the TangleML instance.
90-
91-
:::tip
92-
All components in the Standard Library are well documented with implementation details you can inspect by clicking the component info dialog and checking the **Implementation** tab.
93-
:::
78+
Access components from the standard library for tasks shared within the TangleML instance:
9479

95-
<ImageAnnotation src={require("./assets/AddingComponents_StandardLibrary.png").default} alt="Import from Standard Library screenshot">
80+
<ImageAnnotation src={require("./assets/AddingComponents_StandardLibrary.png").default} alt="Import from standard library screenshot">
9681

97-
1. Expand the **Standard Library** folder in the left panel, Components section.
82+
1. Expand the **Standard Library** folder in the left panel, **Components** section.
9883
2. Select the component you want to add.
9984
3. Drag the component onto the canvas.
10085

101-
</ImageAnnotation>
86+
:::tip
87+
Components in the standard library are documented with implementation details you can inspect by clicking the component info dialog and checking the **Implementation** tab.
88+
:::
10289

103-
### 7. Shared Components Library
90+
</ImageAnnotation>
10491

105-
Access components from the Shared Components Library for tasks shared within the TangleML instance.
92+
### Shared components library
10693

107-
:::info
108-
Learn more about the [Shared Components Library](/docs/component-development/published-components-library).
109-
:::
94+
Access components from the [shared components library](/docs/component-development/published-components-library) for tasks shared within the TangleML instance.
-71.1 KB
Loading

docs/component-development/creating-components-generic.mdx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Creating Components
3-
description: A comprehensive guide to building pipeline components using different programming languages
3+
description: Complete guide to create TangleML components using Python, JavaScript, or any containerized language with YAML specifications.
44
---
55

66
import Tabs from "@theme/Tabs";
@@ -24,7 +24,7 @@ A component consists of two essential parts:
2424
Components can be written in any language that runs in a container. The key is proper containerization and defining clear input/output interfaces.
2525
:::
2626

27-
## Step 1. Designing a Component
27+
## Step 1. Designing a component
2828

2929
When TangleML executes a component, it starts a container image in a Kubernetes Pod.
3030
Your component’s inputs are passed in as command-line arguments.
@@ -53,9 +53,9 @@ It is recommended that you use this pattern only when the data must be put into
5353
If your component is built with Python, libraries such as [argparse](https://docs.python.org/3/library/argparse.html) and [absl.flags](https://abseil.io/docs/python/guides/flags) make it easier to read your component's inputs.
5454
- Your component's code can be implemented in any language, as long as it can run in a container image.
5555

56-
### Component Design Principles
56+
### Component design principles
5757

58-
So as a summary, when designing components, remember these core principles:
58+
So as a summary, when designing Components, remember these core principles:
5959

6060
1. **Composability** - Design your components with composability in mind:
6161
- Think about upstream and downstream components
@@ -79,7 +79,7 @@ So as a summary, when designing components, remember these core principles:
7979
- Your code must accept arguments from the command line.
8080
- Use standard argument parsing libraries for your language.
8181

82-
### Example Component Design
82+
### Example component design
8383

8484
TangleML supports any language that can run in a container. This example demonstrates how to create a component in multiple languages.
8585
This program reads from an input file and writes lines which pass a threshold to an output file.
@@ -348,9 +348,9 @@ You can skip building the container image eveyr time you make a code change by u
348348
necessary, revise your application and Dockerfile until your application
349349
works as expected in the container.
350350

351-
### Local Testing
351+
### Local testing
352352

353-
Test your component locally before deploying:
353+
Test your Component locally before deploying:
354354

355355
```bash
356356
docker run -v $(pwd)/test-data:/data \
@@ -360,9 +360,9 @@ docker run -v $(pwd)/test-data:/data \
360360
--threshold 0.5
361361
```
362362

363-
## Step 3: Define Component Specification
363+
## Step 3: Define Component specification
364364

365-
### Define Component Metadata
365+
### Define Component metadata
366366

367367
Start your component specification by defining basic metadata. This helps users understand what your component does.
368368

@@ -382,13 +382,13 @@ Use clear, descriptive names that indicate the component's purpose. Include vers
382382
383383
### Define Component Inputs
384384
385-
Inputs are the data and parameters your component needs to function. Each input must specify its name and can include type, description, and default values.
385+
Inputs are the data and parameters your Component needs to function. Each input must specify its name and can include type, description, and default values.
386386
387387
:::info
388388
[Read more about the Full InputSpec schema](/docs/reference/schema#inputspec).
389389
:::
390390
391-
#### Basic Input Definition
391+
#### Basic Input definition
392392
393393
```yaml
394394
inputs:
@@ -397,7 +397,7 @@ inputs:
397397
type: Data
398398
```
399399
400-
#### Input with Default Value
400+
#### Input with default value
401401
402402
```yaml
403403
inputs:
@@ -424,9 +424,9 @@ Large datasets should always be passed as [file paths](/docs/reference/schema#in
424424
425425
### Define Component Outputs
426426
427-
Outputs define what your component produces. Unlike inputs, outputs don't have default values, but they must specify where the component will write its results.
427+
Outputs define what your Component produces. Unlike inputs, outputs don't have default values, but they must specify where the component will write its results.
428428
429-
#### Basic Output Definition
429+
#### Basic Output definition
430430
431431
```yaml
432432
outputs:
@@ -435,7 +435,7 @@ outputs:
435435
type: Data
436436
```
437437
438-
#### Multiple Outputs Example
438+
#### Multiple Outputs example
439439
440440
```yaml
441441
outputs:
@@ -456,15 +456,15 @@ outputs:
456456
type: Data
457457
```
458458
459-
### Define Container Implementation
459+
### Define Container implementation
460460
461-
The implementation section specifies how to execute your component. It includes the container image and the command to run.
461+
The implementation section specifies how to execute your Component. It includes the container image and the command to run.
462462
463463
:::info
464464
[Read more about the Full ContainerImplementation schema](/docs/reference/schema#containerspec).
465465
:::
466466
467-
#### Basic Container Implementation
467+
#### Basic Container implementation
468468
469469
```yaml
470470
implementation:
@@ -473,7 +473,7 @@ implementation:
473473
command: ["python", "/app/process.py"]
474474
```
475475
476-
#### Container with Input/Output Placeholders
476+
#### Container with Input/Output placeholders
477477
478478
The command section uses placeholders that are replaced at runtime with actual values:
479479
@@ -500,7 +500,7 @@ implementation:
500500
]
501501
```
502502

503-
#### Understanding Placeholders
503+
#### Understanding placeholders
504504

505505
There are three types of placeholders you can use in the command:
506506

@@ -540,7 +540,7 @@ There are three types of placeholders you can use in the command:
540540
The placeholder names must exactly match the input/output names defined in your component's interface.
541541
:::
542542

543-
#### Container with Arguments
543+
#### Container with arguments
544544

545545
Sometimes you need to separate the command from its arguments:
546546

@@ -560,9 +560,9 @@ implementation:
560560
]
561561
```
562562

563-
#### Container with Environment Variables
563+
#### Container with environment variables
564564

565-
You can also pass inputs through environment variables:
565+
You can also pass Inputs through environment variables:
566566

567567
```yaml
568568
implementation:
@@ -581,9 +581,9 @@ implementation:
581581
```
582582
583583
584-
## Component Specification
584+
## Component specification
585585
586-
Regardless of the implementation language, all components share the same YAML specification format.
586+
Regardless of the implementation language, all Components share the same YAML specification format.
587587
588588
:::info
589589
[Read more about the Full ComponentSpec schema](/docs/reference/schema).

docs/component-development/creating-components.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
id: creating-components
33
title: Lightweight Python Components
4+
description: Create TangleML Python components without building Docker images using the Oasis CLI tool and inline code generation.
45
---
56

67
import { ImageAnnotation } from "@site/src/components/ImageAnnotation";
@@ -11,12 +12,12 @@ For Python developers, TangleML offers a special feature - **lightweight compone
1112
Learn more about the Oasis CLI tool in the [Oasis CLI Manual](/docs/component-development/oasis-cli-manual) section.
1213
:::
1314

14-
## Lightweight Python Components
15+
## Lightweight Python components
1516

1617
Instead of [the conventional approach](/docs/component-development/creating-components-generic) where you write code, containerize it, publish to a registry, and manually create YAML configuration files, Oasis CLI tool automates this entire process.
1718
You simply write your Python code and run a single command - the system automatically generates the YAML specification running code as a command, eliminating the need to manage Docker images or registries.
1819

19-
This approach called "Lightweight Python Components" and it dramatically reduces the time from code to component, allowing you to iterate faster and focus on the code logic rather than infrastructure.
20+
This approach called "Lightweight Python components" and it dramatically reduces the time from code to component, allowing you to iterate faster and focus on the code logic rather than infrastructure.
2021

2122

2223
```yaml
@@ -32,15 +33,15 @@ implementation:
3233
# Generated wrapper code handles I/O
3334
```
3435
35-
## Tutorial: Creating a Lightweight Python Component
36+
## Tutorial: Creating a lightweight Python component
3637
3738
This guide walks you through creating a TangleML component that performs regex-based text replacement. The component reads an input text file, replaces all substrings matching a given regex pattern, and writes the result to an output file.
3839
3940
:::info
40-
To learn more about Components in TangleML, check the [Component Architecture](/docs/core-concepts/what-are-components) page.
41+
To learn more about components in TangleML, check the [component architecture](/docs/core-concepts/what-are-components) page.
4142
:::
4243
43-
### Step 1: Create the Component Function
44+
### Step 1: Create the component function
4445
4546
:::info
4647
You may use a [quick start](/docs/component-development/oasis-cli-manual#quick-start) from the Oasis CLI Manual.
@@ -144,7 +145,7 @@ This notation is used by the Oasis CLI tool to generate the proper component spe
144145

145146
<img src={require("./assets/CreatingComponent_Details.png").default} alt="Metadata" style={{width: "50%", borderRadius: "6px"}} />
146147

147-
### Step 2: Generate the Component Specification
148+
### Step 2: Generate the component specification
148149

149150
Run the command:
150151

@@ -382,7 +383,7 @@ Notice, that Oasis CLI tool generated additional code to handle component inputs
382383
```
383384

384385

385-
### Step 3: Running the Component
386+
### Step 3: Running the component
386387

387388
To use the component, drop it into your pipeline and configure the inputs. Click "Submit Run" to execute the pipeline.
388389

@@ -518,7 +519,7 @@ def some_func(
518519
...
519520
```
520521

521-
### Input and Output Types
522+
### Input and Output types
522523

523524
While low-level TangleML does not enforce any types, the Oasis CLI generator (`components.create_component_from_func`) provides support for six basic Python types:
524525

0 commit comments

Comments
 (0)