我喜欢 Supabase,但我们的团队需要使用 PostgreSQL 提供的模式功能 - 不幸的是,到目前为止我们未能成功地使模式发挥作用。
其他信息:
我们已经尝试过:
我们创建了一个新模式并添加了对所有类型身份验证的访问(为什么全部?我们首先想到身份验证可能存在错误):
CREATE SCHEMA Brano;
GRANT USAGE ON SCHEMA Brano TO postgres, anon, authenticated, service_role, dashboard_user;
Run Code Online (Sandbox Code Playgroud)
通过此设置向 API 公开架构:
尝试了以下代码:
var options = {
schema: 'brano'
}
const supabaseUrl = 'supabaseUrl'
const supabaseKey = 'supabaseKey'
const supabaseClient = createClient(supabaseUrl, supabaseKey, options);
const { data, error } = await supabaseClient
.from('test_brano')
.insert([{
data: 123
}]);
Run Code Online (Sandbox Code Playgroud)
得到这个错误:
{
"message":"permission denied for table test_brano", …Run Code Online (Sandbox Code Playgroud)环境:
发生了什么?
我正在尝试通过以下代码使用简单的箱线图plotly.express:
#Basic vizualization
fig = px.box(dataset, y='Rh2')
fig.update_layout(
height=1000
)
Run Code Online (Sandbox Code Playgroud)
第一个错误非常简单:ValueError: Mime type rendering requires nbformat>=4.2.0 but it is not installed我使用此答案解决了该错误。
第二个错误是我现在遇到的错误:
No renderer could be found for mimetype "application/vnd.plotly.v1+json", but one might be available on the Marketplace.
Run Code Online (Sandbox Code Playgroud)
我不知道在这里可以做什么 - 在互联网上没有提到这样的问题(至少我找不到任何)+市场空间也没有帮助!
提前致谢
尝试添加:pio.renderers.default = "vscode"和其他各种内容,但它们不会导致错误,只是空白。
我想添加一个ConversationBufferMemory,pandas_dataframe_agent但到目前为止我还没有成功。
create_pandas_dataframe_agent(llm, df, verbose=True, memory=memory)这不会破坏代码,但不会导致代理记住我之前的问题。pd_agent.agent.llm_chain.memory = memory。这导致了ValueError: One input key expected got ['input', 'agent_scratchpad'] 这是我到目前为止的代码(不起作用):
llm = ChatOpenAI(temperature=0, model_name="gpt-4-0613")
memory = ConversationBufferMemory()
pd_agent = create_pandas_dataframe_agent(llm, df, verbose=True, memory=memory)
#pd_agent.agent.llm_chain.memory = memory #Or if I use this approach the code breaks when calling the .run() methods
pd_agent.run("Look into the data in step 12. Are there any weird patterns? What can we say about this part of the dataset.")
pd_agent.run("What …Run Code Online (Sandbox Code Playgroud) 我想在所有使用库的核心上执行库中Machine Learning的算法。SklearnDaskjoblib
我使用 Dask 编写的 joblib.parallel_backend 代码:
#Fire up the Joblib backend with Dask:
with joblib.parallel_backend('dask'):
model_RFE = RFE(estimator = DecisionTreeClassifier(), n_features_to_select = 5)
fit_RFE = model_RFE.fit(X_values,Y_values)
Run Code Online (Sandbox Code Playgroud)
不幸的是,当我查看我的任务管理器时,我可以看到所有工作人员都在冷漠地无所事事,只有 1 个新的 Python 任务正在完成所有工作:

即使在客户端上的 Dask 可视化中,我也看到工作人员什么也没做:
joblib我会欢迎任何其他想法。我的整个代码尝试遵循文档中的本教程:
import pandas as pd
import dask.dataframe as df
from dask.distributed import Client
import sklearn
from sklearn.feature_selection import RFE
from sklearn.tree import DecisionTreeClassifier
import joblib
#Create cluset on local PC
client = Client(n_workers …Run Code Online (Sandbox Code Playgroud) 我正在尝试在(使用 Ionic 组件,但这是不相关的)内部使用 Tensorflow 的DANFO.js库。Angular web app
npm install danfojs --save并且npm install @tensorflow/tfjs-node --saveService例如:import 'danfojs';,import { DataFrame } from 'danfojs';甚至根据我能找到的与此主题相关的唯一问题:import { DataFrame } from 'danfojs/dist/core/frame';app.module我什至尝试在不进行任何更改的情况下导入 DANFO.js我总是收到此错误消息(其余错误正在编辑中):
Build at: 2021-11-21T21:38:12.984Z - Hash: 5f05ff4be188e54ccaaf - Time: 10137ms
[ng] Error: node_modules/danfojs/types/core/generic.d.ts:75:26 - error TS2307: Cannot find module '@tensorflow/tfjs-node' or its corresponding type declarations.
[ng] 75 get tensor(): import("@tensorflow/tfjs-node").Tensor1D | import("@tensorflow/tfjs-node").Tensor2D;
[ng] …Run Code Online (Sandbox Code Playgroud) 我正在使用什么数据库?
我需要什么?
.update({ name: 'Middle Earth' })我还需要自动更新表中的时间戳。我想将没有时区的当前时间戳插入 Supabase。
我知道我可以将时间戳列的默认值设置为NOW(),但时间可能会有一些延迟,我需要它精确。
我已经尝试过Date.now()但收到错误:date/time field value out of range
如何才能做到这一点?
postgresql ×3
python ×3
supabase ×3
javascript ×2
pandas ×2
angular ×1
danfojs ×1
dask ×1
joblib ×1
langchain ×1
nbformat ×1
openai-api ×1
plotly ×1
scikit-learn ×1
sql ×1
tensorflow ×1
typescript ×1