Skip to content

Commit

Permalink
Merge pull request #3 from Tauffer-Consulting/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
vinicvaz authored May 7, 2024
2 parents 291d2d4 + 0997ca7 commit bc2ba91
Show file tree
Hide file tree
Showing 22 changed files with 498 additions and 269 deletions.
281 changes: 225 additions & 56 deletions .domino/compiled_metadata.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,279 @@
{
"ExampleSimplePiece": {
"name": "ExampleSimplePiece",
"ProphetTrainModelPiece": {
"name": "ProphetTrainModelPiece",
"dependency": {
"dockerfile": null,
"requirements_file": "requirements_0.txt"
},
"tags": [
"Example"
"Prophet"
],
"style": {
"node_label": "Simple Piece",
"node_label": "Prophet Train",
"node_type": "default",
"node_style": {
"backgroundColor": "#ebebeb"
},
"useIcon": true,
"icon_class_name": "fas fa-database",
"icon_class_name": "icon-park-outline:robot-one",
"iconStyle": {
"cursor": "pointer"
}
},
"description": "This is an example of a simple Domino Piece",
"description": "Piece to train a prophet model",
"container_resources": {
"requests": {
"cpu": "100m",
"memory": "128Mi"
"cpu": 100,
"memory": 128
},
"limits": {
"cpu": "500m",
"memory": "512Mi"
"cpu": 500,
"memory": 512
}
},
"input_schema": {
"title": "InputModel",
"type": "object",
"$defs": {
"GrowthTrend": {
"enum": [
"linear",
"logistic",
"flat"
],
"title": "GrowthTrend",
"type": "string"
},
"SeasonalityMode": {
"enum": [
"additive",
"multiplicative"
],
"title": "SeasonalityMode",
"type": "string"
}
},
"properties": {
"distribution_name": {
"description": "Name of the distribution to sample from",
"input_data_file": {
"description": "Path to the input data file. Accepted formats: `.csv`, `.json`. Should use the following format: `ds` (datetime), `y` (target).",
"title": "Input Data File",
"type": "string"
},
"growth_trend": {
"allOf": [
{
"$ref": "#/definitions/DistributionType"
"$ref": "#/$defs/GrowthTrend"
}
]
],
"default": "linear",
"description": "The growth trend of the data. Options are `linear`, `logistic` and `flat`. Default is `linear`."
},
"distribution_mean": {
"title": "Distribution Mean",
"description": "Distribution mean",
"type": "number"
"changepoints": {
"anyOf": [
{
"items": {
"format": "date",
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "List of dates at which to include potential changepoints. If not specified, potential changepoints are selected automatically.",
"title": "Changepoints"
},
"distribution_sd": {
"title": "Distribution Sd",
"description": "Distribution standard deviation",
"default": 1.0,
"exclusiveMinimum": 0.0,
"type": "number"
"n_changepoints": {
"default": 25,
"description": " Number of potential changepoints to include. Not used if input `changepoints` is supplied.",
"maximum": 1000,
"minimum": 0,
"title": "N Changepoints",
"type": "integer"
},
"seasonality_mode": {
"allOf": [
{
"$ref": "#/$defs/SeasonalityMode"
}
],
"default": "additive",
"description": "The seasonality mode of the data. Options are `additive` and `multiplicative`. Default is `additive`."
}
},
"required": [
"distribution_name",
"distribution_mean"
"input_data_file"
],
"definitions": {
"DistributionType": {
"title": "DistributionType",
"description": "An enumeration.",
"enum": [
"gaussian",
"poisson"
],
"title": "InputModel",
"type": "object"
},
"output_schema": {
"properties": {
"prophet_model_file_path": {
"description": "Path to the file containing the trained model.",
"title": "Prophet model path",
"type": "string"
}
},
"required": [
"prophet_model_file_path"
],
"title": "OutputModel",
"type": "object"
},
"secrets_schema": null,
"source_url": "https://github.com/Tauffer-Consulting/timeseries_domino_pieces/tree/main/pieces/ProphetTrainModelPiece"
},
"GetYahooFinanceDataPiece": {
"name": "GetYahooFinanceDataPiece",
"dependency": {
"dockerfile": null,
"requirements_file": "requirements_0.txt"
},
"tags": [
"Example"
],
"style": {
"node_label": "Get Yahoo Finance Data",
"node_type": "default",
"node_style": {
"backgroundColor": "#ebebeb"
},
"useIcon": true,
"icon_class_name": "fa-solid:database",
"iconStyle": {
"cursor": "pointer"
}
},
"description": "This piece gets data from Yahoo Finance.",
"container_resources": {
"requests": {
"cpu": 100,
"memory": 128
},
"limits": {
"cpu": 500,
"memory": 512
}
},
"input_schema": {
"properties": {
"ticker": {
"description": "Ticker of the stock to get data from.",
"title": "Ticker",
"type": "string"
},
"start_date": {
"description": "Start date of the data to get.",
"format": "date",
"title": "Start Date",
"type": "string"
},
"end_date": {
"description": "End date of the data to get.",
"format": "date",
"title": "End Date",
"type": "string"
}
},
"required": [
"ticker",
"start_date",
"end_date"
],
"title": "InputModel",
"type": "object"
},
"output_schema": {
"properties": {
"data_path": {
"description": "Path to the file containing the trained model.",
"title": "Data Path",
"type": "string"
}
},
"required": [
"data_path"
],
"title": "OutputModel",
"type": "object",
"type": "object"
},
"secrets_schema": null,
"source_url": "https://github.com/Tauffer-Consulting/timeseries_domino_pieces/tree/main/pieces/GetYahooFinanceDataPiece"
},
"ProphetPredictPiece": {
"name": "ProphetPredictPiece",
"dependency": {
"dockerfile": null,
"requirements_file": "requirements_0.txt"
},
"tags": [
"Prophet"
],
"style": {
"node_label": "Prophet Predict",
"node_type": "default",
"node_style": {
"backgroundColor": "#ebebeb"
},
"useIcon": true,
"icon_class_name": "icon-park-outline:robot-one",
"iconStyle": {
"cursor": "pointer"
}
},
"description": "Piece to predict using Prophet",
"container_resources": {
"requests": {
"cpu": 100,
"memory": 128
},
"limits": {
"cpu": 500,
"memory": 512
}
},
"input_schema": {
"properties": {
"message": {
"title": "Message",
"description": "Output message to log",
"prophet_model_path": {
"description": "Path to the file containing the trained model.",
"title": "Prophet Model Path",
"type": "string"
},
"sample_result": {
"title": "Sample Result",
"description": "The result of this Piece's processing",
"type": "string"
"periods": {
"description": "Number of periods to forecast.",
"title": "Periods",
"type": "integer"
}
},
"required": [
"message",
"sample_result"
]
"prophet_model_path",
"periods"
],
"title": "InputModel",
"type": "object"
},
"secrets_schema": {
"title": "SecretsModel",
"type": "object",
"output_schema": {
"properties": {
"EXAMPLE_OPERATOR_SECRET_1": {
"title": "Example Operator Secret 1",
"description": "A secret necessary to run this Piece",
"forecast_data_path": {
"description": "Path to the file containing the forecast data.",
"title": "Forecast Data Path",
"type": "string"
},
"forecast_figure_path": {
"description": "Path to the file containing the results figure.",
"title": "Forecast Figure Path",
"type": "string"
}
},
"required": [
"EXAMPLE_OPERATOR_SECRET_1"
]
}
"forecast_data_path",
"forecast_figure_path"
],
"title": "OutputModel",
"type": "object"
},
"secrets_schema": null,
"source_url": "https://github.com/Tauffer-Consulting/timeseries_domino_pieces/tree/main/pieces/ProphetPredictPiece"
}
}
10 changes: 5 additions & 5 deletions .domino/dependencies_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"requirements_file": "requirements_0.txt"
},
"pieces": [
"ExampleSimplePiece"
"ProphetTrainModelPiece",
"GetYahooFinanceDataPiece",
"ProphetPredictPiece"
],
"secrets": [
"EXAMPLE_OPERATOR_SECRET_1"
],
"source_image": "ghcr.io/enter-your-registry-name-here/enter-your-repository-name-here:0.1.0-group0"
"secrets": [],
"source_image": "ghcr.io/tauffer-consulting/timeseries_domino_pieces:development-group0"
}
}
6 changes: 3 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[repository]
# The name of the github organization / person owner, e.g. tauffer-consulting.
# Must be in lower-case letters
REGISTRY_NAME = "enter-your-registry-name-here"
REGISTRY_NAME = "tauffer-consulting"

# The name of this Pieces repository
REPOSITORY_NAME = "enter-your-repository-name-here"
REPOSITORY_LABEL = "enter-your-repository-label-here"
REPOSITORY_NAME = "timeseries_domino_pieces"
REPOSITORY_LABEL = "Time Series Domino Pieces"

# The version of this Pieces release
# Attention: changing this will create a new release
Expand Down
13 changes: 0 additions & 13 deletions dependencies/Dockerfile_1

This file was deleted.

5 changes: 4 additions & 1 deletion dependencies/requirements_0.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
numpy==1.23.5
prophet==1.1.5
pandas==2.1.3
plotly==5.18.0
yfinance==0.2.38
Loading

0 comments on commit bc2ba91

Please sign in to comment.