7
$\begingroup$

If I use CopyFile to copy a large file to the wolfram cloud (say 100MB), and got say 10 downloads per day (for 1GB/day of download activity), does this consume cloud credits (or cost extra money against most Wolfram/Mathematica subscriptions)?

$\endgroup$
  • 4
    $\begingroup$ Credits are not deducted for file operations like CopyFile, FileExistsQ and fetching cloud objects like CloudGet etc. For evaluating dynamic cloud objects like APIFunction/FormFunction and CloudEvaluate the user credits are deducted. $\endgroup$ – dsingh Jan 8 at 22:46
  • 2
    $\begingroup$ @dsingh That looks like an answer! Could you post it as such? It would also be nice if you could point us to a reference that supports that, or show us how you tested it. $\endgroup$ – MarcoB Jan 9 at 7:10
8
$\begingroup$

Credits are not deducted for file operations like CopyFile, FileExistsQ and fetching cloud objects like CloudGet etc.

In[137]:= $CloudCreditsAvailable

Out[137]= 5849525

In[138]:= CopyFile[$InstallationDirectory <> 
  "/Documentation/English/System/ExampleData/coneflower.jpg", 
 CloudObject[]]

Out[138]= \
CloudObject["https://www.wolframcloud.com/obj/0fb031a3-ea72-413b-9b84-\
29667ef289f0"]

In[139]:= $CloudCreditsAvailable

Out[139]= 5849525

For evaluating dynamic cloud objects like APIFunction/FormFunction, running deployed Manipulates and CloudEvaluate the user credits are deducted.

e.g. Below evaluations will deduct credits.

CloudDeploy[Manipulate[a, {a, 1, 20}]] (* Using interactions in deployed objects. *)

In[129]:= api = 
 CloudDeploy[APIFunction[{"c" -> "Integer"}, #c! &], "factAPI"];

In[128]:= $CloudCreditsAvailable

Out[128]= 5849527

(* Evaluating APIFunction/FormFunction *)
In[130]:= URLExecute[api, {"c" -> 59}]

Out[130]= \
"138683118545689835737939019720389406345902876772687432540821294940160\
000000000000"

In[133]:= $CloudCreditsAvailable

Out[133]= 5849526

(* Using CloudEvaluate *)
In[134]:= CloudEvaluate[159!];

In[137]:= $CloudCreditsAvailable

Out[137]= 5849525

We are working on documenting cloud-specific functions extensively. I think its good to specify which functions will deduct credits. I will discuss with my team about it. Thanks

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for posting it as an answer! Looking forward to more detailed documentation of cloud functions as well. $\endgroup$ – MarcoB Jan 11 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.