为什么我购买了弹性插槽,但仍无法在BigQuery中训练矩阵分解模型?

huangapple go评论61阅读模式
英文:

Why I can not train Matrix Factorization model with BigQuery even though I have purchased flex slots?

问题

我已经翻译好了您的内容,如下:

我已经与BigQuery纠缠了两个多星期。所有文档都只是在宣传该产品,没有提供任何帮助。

首先,我不想使用企业版或企业增强版。我目前正在评估BigQuery是否可以作为解决我的机器学习问题的可能解决方案。也就是说,我现在处于开发概念验证阶段。

如文档所述:

注意:矩阵分解模型仅适用于按固定费率计费的客户或具有预订的客户。建议按需客户使用灵活的插槽来进行矩阵分解。

也就是说,作为普通客户(不是购买企业版或企业增强版的客户),我必须购买灵活的插槽,然后进行预订设置吗?

我购买了100个灵活的插槽,只是想看看它如何运作,以及是否对我的情况有帮助。

然后,我从“创建预订”页面创建了一个预订。在“版本”下拉菜单中,我有3个选项:标准、企业和企业增强。

据我了解,“标准”是我可以用于我的概念验证的唯一选项,也就是说,我可以设置一个“标准”预订,运行SQL查询,看看模型是否适合我,然后删除预订。我没有选择“企业”或“企业增强”,因为它们按年计费,显然不符合我的要求。

创建了预订后,我运行了来自官方教程页面的SQL查询1

#standardSQL
CREATE OR REPLACE MODEL bqml_tutorial.my_explicit_mf_model
OPTIONS
  (model_type='matrix_factorization',
   user_col='user_id',
   item_col='item_id',
   l2_reg=9.83,
   num_factors=34) AS
SELECT
  user_id,
  item_id,
  rating
FROM movielens.movielens_1m

这给了我以下错误:

“对于按需使用,不支持训练矩阵分解模型。要进行训练,请根据BigQuery公共文档中的说明设置预订(灵活或常规)。”

我做错了什么?我不应该购买会按年计费的东西,只是运行官方文档中的查询,对吗?我应该如何测试该产品,而不会陷入年度合同?我只想测试一个查询并仅支付一个查询的费用,而不是购买一年的合同?

英文:

I am strugguling for more than two weeks with BigQuery. All the docs are just ad ertizing the product, without any help.

First thing first, I dont want to use Enterprise Edition or Enterprise Plus Edition. I am currently evaluating BigQuery as a possible solution to my machine learning problem. That is, right now I am ate the stage of developing proof of conept.

As written on the docs:

> Note: Matrix factorization models are only available to flat-rate
> customers or customers with reservations. On-demand customers are
> encouraged to use flex slots to use matrix factorization.

That is, me as a regular customer (not one who purchased Enterprice or Enterprice Plus editions) have to by flex slots and then set up a reservation with it?

I bought 100 flex slots, with the idea just to see how it works and if it will be helpful for my case.

Then I created a reservation from the create reservation page. From the Edition dropdown I had 3 options: Standard, Enterprise and Enterprise Plus.

As far as I understand, Standard is the only option which I can use for my proof of a concept, that is, I can set up a Standard reservation, run the SQL query, see if the model works for me, and then delete the reservation. I did not choose Enerprice or Enterprise Plus because they are billed annually which obviously I dont want.

After I created the reservation, I run the SQL query which is from the official tutorial page

#standardSQL
CREATE OR REPLACE MODEL bqml_tutorial.my_explicit_mf_model
OPTIONS
  (model_type='matrix_factorization',
   user_col='user_id',
   item_col='item_id',
   l2_reg=9.83,
   num_factors=34) AS
SELECT
  user_id,
  item_id,
  rating
FROM movielens.movielens_1m 

Which gives me the following error:

Training Matrix Factorization models is not available for on-demand usage. To train, please set up a reservation (flex or regular) based on instructions in BigQuery public docs.

What I am doing wrong? I am not supposed to buy something which will be billed annually so I just run a query from the official docs, am I? How am I supposed to test the product, without getting into an annual contract? I want just to test that one query and pay for that one query only, not to buy one year contract?

答案1

得分: 1

在创建预留后,允许您的项目使用该预留。通常,它包括创建插槽、预留和分配。

bq mk --reservation_assignment \
      --reservation_id=${PROJECT}:${LOCATION}.${RESERVATION} \
      --job_type=QUERY --assignee_type=PROJECT \
      --assignee_id=${PROJECT}

有关更多信息,请参阅:使用 BigQuery Flex Slots 更高效地运行机器学习工作负载

英文:

After creating the reservation, allow your project to use the reservation.<br><br>Usually, it's create slots, reserve, assign.

bq mk --reservation_assignment \
      --reservation_id=${PROJECT}:${LOCATION}.${RESERVATION} \
      --job_type=QUERY --assignee_type=PROJECT \
      --assignee_id=${PROJECT}

For more info: Using BigQuery Flex Slots to run machine learning workloads more efficiently<br>

huangapple
  • 本文由 发表于 2023年6月19日 23:15:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507957.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定