This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transform_timestamp_to_features(timestamp): | |
# Convert timestamp to datetime | |
dt = pd.to_datetime(timestamp) | |
# Initialize a dictionary to store features | |
features = {} | |
# Date Features | |
features["year"] = dt.year | |
features["quarter"] = dt.quarter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• Installing prophet (1.1.3): Failed | |
ChefBuildError | |
Backend subprocess exited when trying to invoke build_wheel | |
running bdist_wheel | |
running build | |
running build_py | |
creating build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ conda install -c conda-forge pip | |
$ conda install -c conda-forge 'lightgbm>=3.3.3' | |
$ conda install -c conda-forge cmdstan | |
$ export PROPHET_REPACKAGE_CMDSTAN=False | |
$ export PRECOMPILED_HEADERS=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: test-proxy-deploy | |
spec: | |
volumes: | |
- name: secret-volume | |
secret: | |
secretName: cloud_sql_key_secret | |
containers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Id":"value", | |
"prediction":"value", | |
"status-code":200 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"message":"OK", | |
"method":"POST", | |
"status-code":200, | |
"timestamp":"2022-01-01T00:00:00.000000", | |
"url":"http://0.0.0.0:1201/predict", | |
"data":{ | |
"prediction":[ | |
{ | |
"input_text":"Flash crashes is a scenario where the price of stocks plunges but then quickly recovers.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importação da biblioteca do Boto3 e | |
# criação de sessão para acesso aos recursos | |
import boto3 | |
sessao_boto = boto3.Session(region_name='us-east-1') | |
# Função para pegar a "ROLE" (papel) de execução | |
# IAM dos recursos no Sage Maker | |
from sagemaker import get_execution_role | |
ROLE = get_execution_role() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
sys.path.append(os.getcwd() + os.sep + os.pardir) | |
import random | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sagemaker | |
from sagemaker.processing import Processor | |
from sagemaker.network import NetworkConfig | |
from sagemaker.session import Session | |
from time import strftime, gmtime | |
sagemaker_session = Session() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import boto3 | |
COMPUTE_ENVIRONMENT_VERSION = 'v0_01' | |
aws_iam_boto_client \ | |
= boto3.client('iam') | |
aws_batch_boto_client \ | |
= boto3.client('batch') |
NewerOlder