oceanprotocol / pm

Zenhub needs each issue associated with one repo. This repo is a workaround, to mark issues that span >1 repos.
4 stars 0 forks source link

Enhance C2D (provider Fees, enviroments) #127

Closed alexcos20 closed 2 years ago

alexcos20 commented 2 years ago

In the current v4 setup, C2D resources, prices, flow are very unclear. How do you define compute resources? How can you have multiple environments (cpu, ram , disk setups) ?

Proposal:

Consume flow:

Downside:

In V4.1, we will separate the process in two, meaning that you would buy the DT to have access to data for a specific period, and purchase separate compute env for different period (IE: I buy access to data for one month. I will buy 10 mins of cheapest env to test my algo , then buy an expensive c2d env to run my algo several times. So I will pay once for the data, and multiple fees for compute)

How to separate data access & provider resources:

The logic for consume is the following:

kremalicious commented 2 years ago

For some UI context, tried to make the resource usage more clear, so exposing the hardcoded defaults we set. This is what we have in market v4 within the publish form, so that would be the use case to extend that, and in the end multiple services with multiple prices could be created in UI based on different resource types:

Screen Shot 2022-01-12 at 21 13 19
alexcos20 commented 2 years ago

The desired compute environment is going to be selected by consumer, before ordering the service. It doesn't make any sense to have this enforced by the publisher.

It's up to the consumer. If I'm short on money, I will choose an environment with 1 cpu, and by paying less I'm assuming a longer duration of the job. And vice-versa, if I'm in a hurry and the algorithm can use multiple cpus, I will pay for an environment with 128 cpus.

w1kke commented 2 years ago

There can be big problems if the consumer chooses the compute environment instead of the provider - especially for more complex machine learning algorithms.

In the case of deep learning an algorithm can be run on CPUs but in that case it can take 45x longer. So it is possible but then instead of running a day it runs 45 days and a blocked CPU for a long time is also not really that cheap. Other deep learning algorithms need a certain amount of GPU memory or they won't work properly. A configuration chosen by the consumer can be not feasibly. As there is no way to revoke a job after the consumer paid this would create problems that can only be solved manually e.g. by the provider sending back the funds to the consumer.

alexcos20 commented 2 years ago

We could define in the DDO a list of minimal requirements and display only envs that fullfill that minimal requirements