Joseph Loss
04/28/2021, 6:31 AM# fnPortfolioOptimization()
from prefect import Client
client = Client(api_token = %TOKEN%)
client.login_to_tenant(tenant_slug='pwcm')
with Flow('test2') as flow:
lookback_periods = Parameter("lookback_periods", default=[3, 5, 7])
percent_change = Parameter("percent_change", default = [.05, 0.07, 0.1])
lookback_days_rsi = Parameter("lookback_days_rsi", default = 20)
rsi_overbought = Parameter("rsi_overbought", default=0.75)
fnRunAlgo(lookback_periods, percent_change, lookback_days_rsi, rsi_overbought)
prefect.utilities.exceptions.ClientError: Malformed response received from Cloud - please ensure that you have an API token properly configured.
I've tried a custom service-account token, as well as my user api key, neither work when calling flow.register(project_name) or client.register(flow, project_name)Kevin Kho
prefect auth login -t %TOKEN%
?Kevin Kho
client = Client()
will automatically log-in if you configured with the command line. To clear potentially stale tokens, you can do rm -rf ~/.prefect/client
Joseph Loss
04/29/2021, 5:16 PMJoseph Loss
04/29/2021, 5:16 PMJoseph Loss
04/29/2021, 5:19 PMKevin Kho